Merging upstream version 1.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e7ec20d178
commit
ecbd7abcdc
6 changed files with 19 additions and 28 deletions
10
main.c
10
main.c
|
@ -98,8 +98,8 @@ static void show_help()
|
|||
static void show_version()
|
||||
{
|
||||
printf( "%s %s\n", Program_name, PROGVERSION );
|
||||
printf( "Public Domain 2009 Igor Pavlov.\n" );
|
||||
printf( "Copyright (C) %s Antonio Diaz Diaz.\n", program_year );
|
||||
printf( "Public Domain 2009 Igor Pavlov.\n" );
|
||||
printf( "This is free software: you are free to change and redistribute it.\n" );
|
||||
printf( "There is NO WARRANTY, to the extent permitted by law.\n" );
|
||||
}
|
||||
|
@ -205,7 +205,8 @@ static bool read_inbuf( ISeqInStream * const inStream, Byte inBuf[],
|
|||
|
||||
static int Decode2( CLzmaDec *state, ISeqOutStream *outStream,
|
||||
ISeqInStream *inStream, Byte inBuf[], size_t * const inPos,
|
||||
size_t * const inSize, const int version, const bool testing )
|
||||
size_t * const inSize, const int member_version,
|
||||
const bool testing )
|
||||
{
|
||||
long long total_in = Fh_size, total_out = 0;
|
||||
Byte outBuf[OUT_BUF_SIZE];
|
||||
|
@ -246,7 +247,7 @@ static int Decode2( CLzmaDec *state, ISeqOutStream *outStream,
|
|||
{ show_error( "data error", 0, false ); return 1; }
|
||||
bool error = false;
|
||||
File_trailer trailer;
|
||||
const size_t trailer_size = Ft_versioned_size( version );
|
||||
const size_t trailer_size = Ft_versioned_size( member_version );
|
||||
if( *inSize - *inPos < trailer_size &&
|
||||
!read_inbuf( inStream, inBuf, inPos, inSize ) ) return 1;
|
||||
if( *inSize - *inPos < trailer_size )
|
||||
|
@ -261,7 +262,7 @@ static int Decode2( CLzmaDec *state, ISeqOutStream *outStream,
|
|||
for( size_t i = 0; i < trailer_size; ++i )
|
||||
trailer[i] = inBuf[(*inPos)++];
|
||||
total_in += trailer_size;
|
||||
if( version == 0 ) Ft_set_member_size( trailer, total_in );
|
||||
if( member_version == 0 ) Ft_set_member_size( trailer, total_in );
|
||||
if( Ft_get_data_crc( trailer ) != ( crc ^ 0xFFFFFFFFU ) )
|
||||
{
|
||||
error = true;
|
||||
|
@ -563,7 +564,6 @@ int main( const int argc, const char * const argv[] )
|
|||
case 'k': keep_input_files = true; break;
|
||||
case 'm': encoder_options.match_len_limit =
|
||||
getnum( arg, 0, min_match_len_limit, max_match_len ); break;
|
||||
// case 'o': default_output_filename = arg; break;
|
||||
case 'q': verbosity = -1; break;
|
||||
case 's': encoder_options.dictionary_size = get_dict_size( arg );
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue