diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 05:06:11 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 05:06:11 +0000 |
commit | 287887ae1eaaa75243f2adbff20b816b8fc7a381 (patch) | |
tree | 0b08eefdcd7bb8040d948877c6322397ff8f840e /decoder.c | |
parent | Adding debian version 1.5~rc2-2. (diff) | |
download | lunzip-287887ae1eaaa75243f2adbff20b816b8fc7a381.tar.xz lunzip-287887ae1eaaa75243f2adbff20b816b8fc7a381.zip |
Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | decoder.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -45,7 +45,7 @@ void Pp_show_msg( struct Pretty_print * const pp, const char * const msg ) for( i = 0; i < len; ++i ) fprintf( stderr, " " ); if( !msg ) fflush( stderr ); } - if( msg ) fprintf( stderr, "%s.\n", msg ); + if( msg ) fprintf( stderr, "%s\n", msg ); } } @@ -127,8 +127,8 @@ void LZd_flush_data( struct LZ_decoder * const d ) } -bool LZd_verify_trailer( struct LZ_decoder * const d, - struct Pretty_print * const pp ) +static bool LZd_verify_trailer( struct LZ_decoder * const d, + struct Pretty_print * const pp ) { File_trailer trailer; const unsigned long long member_size = Rd_member_position( d->rdec ) + Ft_size; @@ -153,7 +153,7 @@ bool LZd_verify_trailer( struct LZ_decoder * const d, if( d->rdec->code != 0 ) { error = true; - Pp_show_msg( pp, "Range decoder final code is not zero" ); + Pp_show_msg( pp, "Range decoder final code is not zero." ); } trailer_crc = Ft_get_data_crc( trailer ); if( trailer_crc != LZd_crc( d ) ) @@ -208,7 +208,7 @@ int LZd_decode_member( struct LZ_decoder * const d, struct Range_decoder * const rdec = d->rdec; void (* const copy_block) ( struct LZ_decoder * const d, const int distance, int len ) = - ( d->buffer_size >= (int)d->dictionary_size ) ? + ( (unsigned)d->buffer_size >= d->dictionary_size ) ? &LZd_copy_block : &LZd_copy_block2; unsigned rep0 = 0; /* rep[0-3] latest four distances */ unsigned rep1 = 0; /* used for efficient coding of */ @@ -227,14 +227,14 @@ int LZd_decode_member( struct LZ_decoder * const d, { state -= ( state < 4 ) ? state : 3; LZd_put_byte( d, Rd_decode_tree( rdec, - d->bm_literal[get_lit_state(prev_byte)], 8 ) ); + d->bm_literal[get_lit_state(prev_byte)], 8 ) ); } else { state -= ( state < 10 ) ? 3 : 6; LZd_put_byte( d, Rd_decode_matched( rdec, - d->bm_literal[get_lit_state(prev_byte)], - LZd_get_byte( d, rep0 ) ) ); + d->bm_literal[get_lit_state(prev_byte)], + LZd_get_byte( d, rep0 ) ) ); } } else |