Merging upstream version 0.26.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
7185f44b62
commit
180f99b04d
44 changed files with 610 additions and 505 deletions
|
@ -20,7 +20,7 @@
|
|||
#include <cerrno>
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
#include <stdint.h> // for lzlib.h
|
||||
#include <stdint.h> // for lzlib.h
|
||||
#include <unistd.h>
|
||||
#include <utime.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -134,7 +134,7 @@ bool archive_write( const uint8_t * const buf, const int size,
|
|||
static bool flushed = true; // avoid flushing empty lzip members
|
||||
|
||||
if( size <= 0 && flushed ) return true;
|
||||
flushed = ( size <= 0 );
|
||||
flushed = size <= 0;
|
||||
enum { obuf_size = 65536 };
|
||||
uint8_t obuf[obuf_size];
|
||||
int sz = 0;
|
||||
|
@ -150,7 +150,8 @@ bool archive_write( const uint8_t * const buf, const int size,
|
|||
if( rd < 0 ) internal_error( "library error (LZ_compress_read)." );
|
||||
if( rd == 0 && sz >= size ) break;
|
||||
if( writeblock( outfd, obuf, rd ) != rd )
|
||||
{ show_file_error( ne_output_filename(), werr_msg, errno ); return false; }
|
||||
{ show_file_error( ne_output_filename(), wr_err_msg, errno );
|
||||
return false; }
|
||||
}
|
||||
if( LZ_compress_finished( encoder ) == 1 &&
|
||||
LZ_compress_restart_member( encoder, LLONG_MAX ) < 0 )
|
||||
|
@ -166,7 +167,7 @@ bool tail_compress( const Cl_options & cl_opts,
|
|||
if( cl_opts.solidity != solid && !archive_write( 0, 0, encoder ) )
|
||||
return false; // flush encoder before compressing EOA blocks
|
||||
int size = header_size;
|
||||
bool zero = true; // true until non-zero data found after EOA blocks
|
||||
bool zero = true; // true until nonzero data found after EOA blocks
|
||||
while( true )
|
||||
{
|
||||
if( size > 0 && !archive_write( header, size, encoder ) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue