Adding upstream version 1.15~pre1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
c78d56fd7a
commit
0ff20a5602
36 changed files with 793 additions and 495 deletions
19
range_dec.cc
19
range_dec.cc
|
@ -101,13 +101,6 @@ void parse_range( const char * const ptr, Block & range )
|
|||
}
|
||||
|
||||
|
||||
bool safe_seek( const int fd, const long long pos )
|
||||
{
|
||||
if( lseek( fd, pos, SEEK_SET ) == pos ) return true;
|
||||
show_error( "Seek error", errno ); return false;
|
||||
}
|
||||
|
||||
|
||||
int decompress_member( const int infd, const int outfd,
|
||||
const Pretty_print & pp,
|
||||
const unsigned long long mpos,
|
||||
|
@ -170,7 +163,7 @@ int list_file( const std::string & input_filename, const Pretty_print & pp )
|
|||
const int infd = open_instream( input_filename, &in_stats, true, true );
|
||||
if( infd < 0 ) return 1;
|
||||
|
||||
File_index file_index( infd );
|
||||
const File_index file_index( infd );
|
||||
close( infd );
|
||||
if( file_index.retval() != 0 )
|
||||
{ show_error( file_index.error().c_str() ); return file_index.retval(); }
|
||||
|
@ -208,6 +201,13 @@ int list_file( const std::string & input_filename, const Pretty_print & pp )
|
|||
} // end namespace
|
||||
|
||||
|
||||
bool safe_seek( const int fd, const long long pos )
|
||||
{
|
||||
if( lseek( fd, pos, SEEK_SET ) == pos ) return true;
|
||||
show_error( "Seek error", errno ); return false;
|
||||
}
|
||||
|
||||
|
||||
int list_files( const std::vector< std::string > & filenames,
|
||||
const int verbosity )
|
||||
{
|
||||
|
@ -234,7 +234,7 @@ int range_decompress( const std::string & input_filename,
|
|||
const int infd = open_instream( input_filename, &in_stats, true, true );
|
||||
if( infd < 0 ) return 1;
|
||||
|
||||
File_index file_index( infd );
|
||||
const File_index file_index( infd );
|
||||
if( file_index.retval() != 0 )
|
||||
{ show_error( file_index.error().c_str() ); return file_index.retval(); }
|
||||
|
||||
|
@ -259,6 +259,7 @@ int range_decompress( const std::string & input_filename,
|
|||
else
|
||||
{ outfd = open_outstream_rw( output_filename, force );
|
||||
if( outfd < 0 ) return 1; }
|
||||
|
||||
Pretty_print pp( input_filename, verbosity );
|
||||
int retval = 0;
|
||||
for( int i = 0; i < file_index.members(); ++i )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue