diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 12:52:43 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-06 12:52:43 +0000 |
commit | 73f5ce5a1a7ef15a0e889bf2416e401db59f8c28 (patch) | |
tree | 7bf509a1fbb746c7c77b3a7dce30d192729be136 /main.c | |
parent | Adding debian version 1.7~pre1-1. (diff) | |
download | clzip-73f5ce5a1a7ef15a0e889bf2416e401db59f8c28.tar.xz clzip-73f5ce5a1a7ef15a0e889bf2416e401db59f8c28.zip |
Merging upstream version 1.7~rc1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -223,7 +223,7 @@ static unsigned long long getnum( const char * const ptr, static int get_dict_size( const char * const arg ) { char * tail; - int bits = strtol( arg, &tail, 0 ); + const int bits = strtol( arg, &tail, 0 ); if( bits >= min_dictionary_bits && bits <= max_dictionary_bits && *tail == 0 ) return ( 1 << bits ); @@ -469,11 +469,11 @@ static int compress( const unsigned long long member_size, else { File_header header; - if( !Fh_set_dictionary_size( header, encoder_options->dictionary_size ) || - encoder_options->match_len_limit < min_match_len_limit || - encoder_options->match_len_limit > max_match_len ) - internal_error( "invalid argument to encoder." ); - encoder.e = (struct LZ_encoder *)malloc( sizeof (struct LZ_encoder) ); + if( Fh_set_dictionary_size( header, encoder_options->dictionary_size ) && + encoder_options->match_len_limit >= min_match_len_limit && + encoder_options->match_len_limit <= max_match_len ) + encoder.e = (struct LZ_encoder *)malloc( sizeof (struct LZ_encoder) ); + else internal_error( "invalid argument to encoder." ); if( !encoder.e || !LZe_init( encoder.e, Fh_get_dictionary_size( header ), encoder_options->match_len_limit, infd, outfd ) ) error = true; @@ -700,7 +700,7 @@ int main( const int argc, const char * const argv[] ) { 3 << 23, 132 }, /* -8 */ { 1 << 25, 273 } }; /* -9 */ struct Lzma_options encoder_options = option_mapping[6]; /* default = "-6" */ - const unsigned long long max_member_size = 0x0100000000000000ULL; + const unsigned long long max_member_size = 0x0008000000000000ULL; const unsigned long long max_volume_size = 0x4000000000000000ULL; unsigned long long member_size = max_member_size; unsigned long long volume_size = 0; |