summaryrefslogtreecommitdiffstats
path: root/decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'decoder.c')
-rw-r--r--decoder.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/decoder.c b/decoder.c
index b9eb2cd..f39aa80 100644
--- a/decoder.c
+++ b/decoder.c
@@ -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