diff --git a/btreeidx.cc b/btreeidx.cc index bd8a3d07..cd6e5b18 100644 --- a/btreeidx.cc +++ b/btreeidx.cc @@ -49,7 +49,7 @@ using std::pair; enum { BtreeMinElements = 64, - BtreeMaxElements = 5120 + BtreeMaxElements = 8192 }; BtreeIndex::BtreeIndex(): diff --git a/file.cc b/file.cc index cbbc7035..12ddbdbb 100644 --- a/file.cc +++ b/file.cc @@ -239,7 +239,7 @@ std::string Class::gets( bool stripNl ) THROW_SPEC( exReadError, exWriteError ) return std::string( buf ); } -void Class::seek( long offset ) THROW_SPEC( exSeekError, exWriteError ) +void Class::seek( qint64 offset ) THROW_SPEC( exSeekError, exWriteError ) { if ( writeBuffer ) flushWriteBuffer(); @@ -248,7 +248,7 @@ void Class::seek( long offset ) THROW_SPEC( exSeekError, exWriteError ) throw exSeekError(); } -void Class::seekCur( long offset ) THROW_SPEC( exSeekError, exWriteError ) +void Class::seekCur( qint64 offset ) THROW_SPEC( exSeekError, exWriteError ) { if ( writeBuffer ) flushWriteBuffer(); @@ -257,7 +257,7 @@ void Class::seekCur( long offset ) THROW_SPEC( exSeekError, exWriteError ) throw exSeekError(); } -void Class::seekEnd( long offset ) THROW_SPEC( exSeekError, exWriteError ) +void Class::seekEnd( qint64 offset ) THROW_SPEC( exSeekError, exWriteError ) { if ( writeBuffer ) flushWriteBuffer(); @@ -271,7 +271,7 @@ void Class::rewind() THROW_SPEC( exSeekError, exWriteError ) seek( 0 ); } -size_t Class::tell() THROW_SPEC( exSeekError ) +qint64 Class::tell() THROW_SPEC( exSeekError ) { qint64 result = f.pos(); @@ -281,7 +281,7 @@ size_t Class::tell() THROW_SPEC( exSeekError ) if ( writeBuffer ) result += ( WriteBufferSize - writeBufferLeft ); - return ( size_t ) result; + return result; } bool Class::eof() THROW_SPEC( exWriteError ) diff --git a/file.hh b/file.hh index 72e8b56d..5bcd2ec1 100644 --- a/file.hh +++ b/file.hh @@ -95,17 +95,17 @@ public: std::string gets( bool stripNl = true ) THROW_SPEC( exReadError, exWriteError ); /// Seeks in the file, relative to its beginning. - void seek( long offset ) THROW_SPEC( exSeekError, exWriteError ); + void seek( qint64 offset ) THROW_SPEC( exSeekError, exWriteError ); /// Seeks in the file, relative to the current position. - void seekCur( long offset ) THROW_SPEC( exSeekError, exWriteError ); + void seekCur( qint64 offset ) THROW_SPEC( exSeekError, exWriteError ); /// Seeks in the file, relative to the end of file. - void seekEnd( long offset = 0 ) THROW_SPEC( exSeekError, exWriteError ); + void seekEnd( qint64 offset = 0 ) THROW_SPEC( exSeekError, exWriteError ); /// Seeks to the beginning of file void rewind() THROW_SPEC( exSeekError, exWriteError ); /// Tells the current position within the file, relative to its beginning. - size_t tell() THROW_SPEC( exSeekError ); + qint64 tell() THROW_SPEC( exSeekError ); /// Returns true if end-of-file condition is set. bool eof() THROW_SPEC( exWriteError );