diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-06-11 07:31:52 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-06-11 07:31:52 +0000 |
commit | 408aca47fd423e7c4c38665b892a13c1c9fb1e9a (patch) | |
tree | 604f994d615af891c2373f0dd4ac14c22ea772f7 /src/tests | |
parent | 5f39066a4f561e9a94a6cc9293ab9b978ebf1f81 (diff) | |
download | libbu++-408aca47fd423e7c4c38665b892a13c1c9fb1e9a.tar.gz libbu++-408aca47fd423e7c4c38665b892a13c1c9fb1e9a.tar.bz2 libbu++-408aca47fd423e7c4c38665b892a13c1c9fb1e9a.tar.xz libbu++-408aca47fd423e7c4c38665b892a13c1c9fb1e9a.zip |
Few minor tweaks to bzip2, it reports errors now...and there's a bug in odpm
that could be in this, but it's going to be hard to tell...
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/bzip2.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/bzip2.cpp b/src/tests/bzip2.cpp index ef9328f..683d3d7 100644 --- a/src/tests/bzip2.cpp +++ b/src/tests/bzip2.cpp | |||
@@ -6,17 +6,17 @@ int main( int argc, char *argv[] ) | |||
6 | char buf[1024]; | 6 | char buf[1024]; |
7 | size_t nRead; | 7 | size_t nRead; |
8 | 8 | ||
9 | Bu::File f( "test.bz2", "rb" ); | 9 | Bu::File f( "test.bz2", "wb" ); |
10 | Bu::BZip2 bz2( f ); | 10 | Bu::BZip2 bz2( f ); |
11 | 11 | ||
12 | Bu::File fin( argv[1], "wb"); | 12 | Bu::File fin( argv[1], "rb"); |
13 | 13 | ||
14 | for(;;) | 14 | for(;;) |
15 | { | 15 | { |
16 | nRead = bz2.read( buf, 1024 ); | 16 | nRead = fin.read( buf, 1024 ); |
17 | if( nRead > 0 ) | 17 | if( nRead > 0 ) |
18 | fin.write( buf, nRead ); | 18 | bz2.write( buf, nRead ); |
19 | if( bz2.isEOS() ) | 19 | if( fin.isEOS() ) |
20 | break; | 20 | break; |
21 | } | 21 | } |
22 | } | 22 | } |