diff options
Diffstat (limited to 'decompress.cc')
-rw-r--r-- | decompress.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/decompress.cc b/decompress.cc index 4c6b946..3511921 100644 --- a/decompress.cc +++ b/decompress.cc @@ -1,6 +1,6 @@ /* Plzip - Parallel compressor compatible with lzip Copyright (C) 2009 Laszlo Ersek. - Copyright (C) 2009-2015 Antonio Diaz Diaz. + Copyright (C) 2009-2016 Antonio Diaz Diaz. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@ void Pretty_print::operator()( const char * const msg ) const { first_post = false; std::fprintf( stderr, " %s: ", name_.c_str() ); - for( unsigned i = 0; i < longest_name - name_.size(); ++i ) + for( unsigned i = name_.size(); i < longest_name; ++i ) std::fputc( ' ', stderr ); if( !msg ) std::fflush( stderr ); } @@ -213,16 +213,16 @@ extern "C" void * dworker( void * arg ) // start the workers and wait for them to finish. int decompress( int num_workers, const int infd, const int outfd, const Pretty_print & pp, const int debug_level, - const bool infd_isreg ) + const bool ignore_trailing, const bool infd_isreg ) { if( !infd_isreg ) - return dec_stream( num_workers, infd, outfd, pp, debug_level ); + return dec_stream( num_workers, infd, outfd, pp, debug_level, ignore_trailing ); - const File_index file_index( infd ); + const File_index file_index( infd, ignore_trailing ); if( file_index.retval() == 1 ) { lseek( infd, 0, SEEK_SET ); - return dec_stream( num_workers, infd, outfd, pp, debug_level ); + return dec_stream( num_workers, infd, outfd, pp, debug_level, ignore_trailing ); } if( file_index.retval() != 0 ) { pp( file_index.error().c_str() ); return file_index.retval(); } |