aboutsummaryrefslogtreecommitdiff
path: root/src/file.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2009-09-23 23:19:38 +0000
committerMike Buland <eichlan@xagasoft.com>2009-09-23 23:19:38 +0000
commit1b7caf3368675eb6825e0dca77782a141dfa0392 (patch)
tree01fb357534875c7a69199e4dd3f0c9d8810810e2 /src/file.cpp
parent319a773dfcb187bc7e87ae6d64df3b6b6ec4831a (diff)
downloadlibbu++-1b7caf3368675eb6825e0dca77782a141dfa0392.tar.gz
libbu++-1b7caf3368675eb6825e0dca77782a141dfa0392.tar.bz2
libbu++-1b7caf3368675eb6825e0dca77782a141dfa0392.tar.xz
libbu++-1b7caf3368675eb6825e0dca77782a141dfa0392.zip
Wow, ok, file was broken on changing position in the stream, it wouldn't reset
the end of stream flag. Now it does reset it, and assumes that you've placed the position not at the end, if you have, it will detect it again immediately upon read. BZip2 now provides a method of getting the number of bytes written out, i.e. the compressed size of the output, I have to figure out the input side next...
Diffstat (limited to 'src/file.cpp')
-rw-r--r--src/file.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/file.cpp b/src/file.cpp
index 6228ba9..1c26001 100644
--- a/src/file.cpp
+++ b/src/file.cpp
@@ -93,6 +93,7 @@ void Bu::File::seek( long offset )
93 throw FileException("File not open."); 93 throw FileException("File not open.");
94 94
95 lseek( fd, offset, SEEK_CUR ); 95 lseek( fd, offset, SEEK_CUR );
96 bEos = false;
96} 97}
97 98
98void Bu::File::setPos( long pos ) 99void Bu::File::setPos( long pos )
@@ -101,6 +102,7 @@ void Bu::File::setPos( long pos )
101 throw FileException("File not open."); 102 throw FileException("File not open.");
102 103
103 lseek( fd, pos, SEEK_SET ); 104 lseek( fd, pos, SEEK_SET );
105 bEos = false;
104} 106}
105 107
106void Bu::File::setPosEnd( long pos ) 108void Bu::File::setPosEnd( long pos )
@@ -109,6 +111,7 @@ void Bu::File::setPosEnd( long pos )
109 throw FileException("File not open."); 111 throw FileException("File not open.");
110 112
111 lseek( fd, pos, SEEK_END ); 113 lseek( fd, pos, SEEK_END );
114 bEos = false;
112} 115}
113 116
114bool Bu::File::isEos() 117bool Bu::File::isEos()