freebsd-ports/editors/lfhex/files/patch-src::reader.cpp
Kirill Ponomarev 09c23c8eff - Update to version 0.3.4
- Unbreak on -current

PR:		58126
Submitted by:	Ports Fury
2003-10-16 20:27:06 +00:00

28 lines
943 B
C++

--- src/reader.cpp.orig Sat Jul 7 11:16:01 2001
+++ src/reader.cpp Thu Oct 16 20:54:13 2003
@@ -13,6 +13,7 @@
#include <stdexcept>
#include <algorithm>
#include <new>
+#include <cassert>
// for stat:
#include <sys/types.h>
@@ -227,7 +228,7 @@
// free the page which is the furthest away from the page we are loading
// this could be trouble if off_t is unsigned!
- if( abs(_firstPage - pageIdx) > abs(_lastPage - pageIdx) )
+ if( abs((long int)(_firstPage - pageIdx)) > abs((long int)(_lastPage - pageIdx)) )
while(!freePage(_firstPage++));
else
while(!freePage(_lastPage--));
@@ -285,7 +286,7 @@
#ifdef LFHEX_IOS_BASE_FMTFLAGS
ostream& operator<< (ostream&out, const ReadBuffer& buff)
{
- ios_base::fmtflags old_flags = out.flags();
+ ios::fmtflags old_flags = out.flags();
out.flags(old_flags | ios::hex | ios::showbase);
for(size_t i = 0; i < buff.size(); i++)
out << buff[i];