diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:48:19 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:48:19 +0000 |
commit | f84d656826e79b4c73e42656005c34a80c9bff86 (patch) | |
tree | 445c47ac2fbbf07c76f30ef998e1ff653a99dd2c /main.c | |
parent | Adding upstream version 1.4~rc2. (diff) | |
download | lzlib-f84d656826e79b4c73e42656005c34a80c9bff86.tar.xz lzlib-f84d656826e79b4c73e42656005c34a80c9bff86.zip |
Adding upstream version 1.4.upstream/1.4
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | main.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -15,7 +15,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* - Return values: 0 for a normal exit, 1 for environmental problems + Exit status: 0 for a normal exit, 1 for environmental problems (file not found, invalid flags, I/O errors, etc), 2 to indicate a corrupt or invalid input file, 3 for an internal consistency error (eg, bug) which caused minilzip to panic. @@ -176,6 +176,10 @@ static void show_help( void ) "scale optimal for all files. If your files are large, very repetitive,\n" "etc, you may need to use the --match-length and --dictionary-size\n" "options directly to achieve optimal performance.\n" + "\nExit status: 0 for a normal exit, 1 for environmental problems (file\n" + "not found, invalid flags, I/O errors, etc), 2 to indicate a corrupt or\n" + "invalid input file, 3 for an internal consistency error (eg, bug) which\n" + "caused minilzip to panic.\n" "\nReport bugs to lzip-bug@nongnu.org\n" "Lzlib home page: http://www.nongnu.org/lzip/lzlib.html\n" ); } @@ -205,8 +209,9 @@ void show_header( struct LZ_Decoder * const decoder ) for( i = 0; i < 8 && ( num > 9999 || ( exact && num >= factor ) ); ++i ) { num /= factor; if( num % factor != 0 ) exact = false; p = prefix[i]; np = ""; } - fprintf( stderr, "version %d, dictionary size %s%4u %sB. ", - LZ_decompress_member_version( decoder ), np, num, p ); + if( verbosity >= 4 ) + fprintf( stderr, "version %d, ", LZ_decompress_member_version( decoder ) ); + fprintf( stderr, "dictionary size %s%4u %sB. ", np, num, p ); } @@ -687,8 +692,8 @@ int do_decompress( struct LZ_Decoder * const decoder, const int infd, const unsigned long long data_position = LZ_decompress_data_position( decoder ); const unsigned long long member_size = LZ_decompress_member_position( decoder ); Pp_show_msg( pp, 0 ); - if( verbosity >= 2 ) show_header( decoder ); - if( verbosity >= 3 && data_position > 0 && member_size > 0 ) + if( verbosity >= 3 ) show_header( decoder ); + if( verbosity >= 2 && data_position > 0 && member_size > 0 ) fprintf( stderr, "%6.3f:1, %6.3f bits/byte, %5.2f%% saved. ", (double)data_position / member_size, ( 8.0 * member_size ) / data_position, @@ -697,8 +702,7 @@ int do_decompress( struct LZ_Decoder * const decoder, const int infd, fprintf( stderr, "data CRC %08X, data size %9llu, member size %8llu. ", LZ_decompress_data_crc( decoder ), data_position, member_size ); - if( testing ) fprintf( stderr, "ok\n" ); - else fprintf( stderr, "done\n" ); + fprintf( stderr, testing ? "ok\n" : "done\n" ); } first_member = false; Pp_reset( pp ); } @@ -874,6 +878,7 @@ int main( const int argc, const char * const argv[] ) { 'h', "help", ap_no }, { 'k', "keep", ap_no }, { 'm', "match-length", ap_yes }, + { 'n', "threads", ap_yes }, { 'o', "output", ap_yes }, { 'q', "quiet", ap_no }, { 's', "dictionary-size", ap_yes }, @@ -918,6 +923,7 @@ int main( const int argc, const char * const argv[] ) case 'm': encoder_options.match_len_limit = getnum( arg, LZ_min_match_len_limit(), LZ_max_match_len_limit() ); break; + case 'n': break; case 'o': default_output_filename = arg; break; case 'q': verbosity = -1; break; case 's': encoder_options.dictionary_size = get_dict_size( arg ); |