From 585fba50b00b5716bbde7a1b05cbab114af8cdb0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 12:53:03 +0100 Subject: Adding upstream version 1.18~pre2. Signed-off-by: Daniel Baumann --- mtester.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mtester.cc') diff --git a/mtester.cc b/mtester.cc index a9ac06e..92de2e0 100644 --- a/mtester.cc +++ b/mtester.cc @@ -56,7 +56,7 @@ void LZ_mtester::flush_data() { const int size = pos - stream_pos; crc32.update_buf( crc_, buffer + stream_pos, size ); - if( pos >= buffer_size ) { partial_data_pos += pos; pos = 0; } + if( pos >= dictionary_size ) { partial_data_pos += pos; pos = 0; } stream_pos = pos; } } @@ -89,11 +89,11 @@ void LZ_mtester::print_block( const int len ) void LZ_mtester::duplicate_buffer() { - uint8_t * const tmp = new uint8_t[buffer_size]; + uint8_t * const tmp = new uint8_t[dictionary_size]; if( data_position() > 0 ) std::memcpy( tmp, buffer, std::min( data_position(), - (unsigned long long)buffer_size ) ); - else tmp[buffer_size-1] = 0; // prev_byte of first byte + (unsigned long long)dictionary_size ) ); + else tmp[dictionary_size-1] = 0; // prev_byte of first byte buffer = tmp; } @@ -232,7 +232,7 @@ int LZ_mtester::debug_decode_member( const long long dpos, const long long mpos, format_byte( match_byte ) ); } } - else /* match or repeated match */ + else // match or repeated match { int len; if( rdec.decode_bit( bm_rep[state()] ) != 0 ) // 2nd bit @@ -271,7 +271,7 @@ int LZ_mtester::debug_decode_member( const long long dpos, const long long mpos, std::printf( "%6llu %6llu rep%c %6u,%3d (%6llu)", mp, dp, rep + '0', rep0 + 1, len, dp - rep0 - 1 ); } - else /* match */ + else // match { const unsigned rep0_saved = rep0; len = min_match_len + rdec.decode_len( match_len_model, pos_state ); -- cgit v1.2.3