From 585fba50b00b5716bbde7a1b05cbab114af8cdb0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 12:53:03 +0100 Subject: Adding upstream version 1.18~pre2. Signed-off-by: Daniel Baumann --- split.cc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'split.cc') diff --git a/split.cc b/split.cc index 2ffb359..fc92ea4 100644 --- a/split.cc +++ b/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 ) -- cgit v1.2.3