Adding upstream version 1.18~pre2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
cf6c2d1d59
commit
ed1b0d872f
18 changed files with 427 additions and 220 deletions
38
split.cc
38
split.cc
|
@ -62,25 +62,6 @@ bool next_filename( std::string & output_filename, const int max_digits )
|
|||
}
|
||||
|
||||
|
||||
bool verify_header( const File_header & header, const Pretty_print & pp )
|
||||
{
|
||||
if( !header.verify_magic() )
|
||||
{
|
||||
pp( "Bad magic number (file not in lzip format)." );
|
||||
return false;
|
||||
}
|
||||
if( !header.verify_version() )
|
||||
{
|
||||
if( pp.verbosity() >= 0 )
|
||||
{ pp();
|
||||
std::fprintf( stderr, "Version %d member format not supported.\n",
|
||||
header.version() ); }
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Search forward from 'pos' for "LZIP" (Boyer-Moore algorithm)
|
||||
// Returns pos of found string or 'pos+size' if not found.
|
||||
//
|
||||
|
@ -205,6 +186,25 @@ int do_split_file( const std::string & input_filename, uint8_t * & base_buffer,
|
|||
} // end namespace
|
||||
|
||||
|
||||
bool verify_header( const File_header & header, const Pretty_print & pp )
|
||||
{
|
||||
if( !header.verify_magic() )
|
||||
{
|
||||
pp( "Bad magic number (file not in lzip format)." );
|
||||
return false;
|
||||
}
|
||||
if( !header.verify_version() )
|
||||
{
|
||||
if( pp.verbosity() >= 0 )
|
||||
{ pp();
|
||||
std::fprintf( stderr, "Version %d member format not supported.\n",
|
||||
header.version() ); }
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int split_file( const std::string & input_filename,
|
||||
const std::string & default_output_filename,
|
||||
const int verbosity, const bool force )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue