summaryrefslogtreecommitdiffstats
path: root/decompress.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:15:42 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2016-06-01 14:15:56 +0000
commit4eb895adce37d5080310984546faf00db136d4ef (patch)
treeaa5e387425ea1b8f34ada52747cbca077a5047e7 /decompress.cc
parentReleasing debian version 1.4-2. (diff)
downloadplzip-4eb895adce37d5080310984546faf00db136d4ef.tar.xz
plzip-4eb895adce37d5080310984546faf00db136d4ef.zip
Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'decompress.cc')
-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(); }