Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
5e1f92d2a0
commit
66060d80f9
20 changed files with 632 additions and 272 deletions
|
@ -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(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue