summaryrefslogtreecommitdiffstats
path: root/split.cc
diff options
context:
space:
mode:
Diffstat (limited to 'split.cc')
-rw-r--r--split.cc38
1 files changed, 19 insertions, 19 deletions
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 )