summaryrefslogtreecommitdiffstats
path: root/decompress.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:15:38 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:15:38 +0000
commitb74ecd2cc2094c9644123e48ac3e2400fd8a3674 (patch)
tree8dbdba84d3f38fb2ea33a5f18fea7d42d16e3f8d /decompress.cc
parentAdding upstream version 1.4. (diff)
downloadplzip-b74ecd2cc2094c9644123e48ac3e2400fd8a3674.tar.xz
plzip-b74ecd2cc2094c9644123e48ac3e2400fd8a3674.zip
Adding upstream version 1.5.upstream/1.5
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--decompress.cc12
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(); }