1
0
Fork 0

Merging upstream version 1.15~rc1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 22:33:04 +01:00
parent 03e700319c
commit dc06553bd5
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
24 changed files with 472 additions and 466 deletions

34
lzip.h
View file

@ -91,16 +91,16 @@ static inline void Bm_init( Bit_model * const probability )
static inline void Bm_array_init( Bit_model bm[], const int size )
{ int i; for( i = 0; i < size; ++i ) Bm_init( &bm[i] ); }
struct Len_model
typedef struct Len_model
{
Bit_model choice1;
Bit_model choice2;
Bit_model bm_low[pos_states][len_low_symbols];
Bit_model bm_mid[pos_states][len_mid_symbols];
Bit_model bm_high[len_high_symbols];
};
} Len_model;
static inline void Lm_init( struct Len_model * const lm )
static inline void Lm_init( Len_model * const lm )
{
Bm_init( &lm->choice1 );
Bm_init( &lm->choice2 );
@ -236,17 +236,14 @@ static inline bool Lt_check_consistency( const Lzip_trailer data )
}
struct Cl_options /* command-line options */
typedef struct Cl_options /* command-line options */
{
bool ignore_empty;
bool ignore_marking;
bool ignore_trailing;
bool loose_trailing;
};
} Cl_options;
static inline void Cl_options_init( struct Cl_options * cl_opts )
{ cl_opts->ignore_empty = true; cl_opts->ignore_marking = true;
cl_opts->ignore_trailing = true; cl_opts->loose_trailing = false; }
static inline void Cl_options_init( Cl_options * cl_opts )
{ cl_opts->ignore_trailing = true; cl_opts->loose_trailing = false; }
static inline void set_retval( int * retval, const int new_val )
@ -256,23 +253,25 @@ static const char * const bad_magic_msg = "Bad magic number (file not in lzip fo
static const char * const bad_dict_msg = "Invalid dictionary size in member header.";
static const char * const corrupt_mm_msg = "Corrupt header in multimember file.";
static const char * const empty_msg = "Empty member not allowed.";
static const char * const marking_msg = "Marking data not allowed.";
static const char * const trailing_msg = "Trailing data not allowed.";
static const char * const mem_msg = "Not enough memory.";
static const char * const nonzero_msg = "Nonzero first LZMA byte.";
static const char * const trailing_msg = "Trailing data not allowed.";
static const char * const write_error_msg = "Write error";
/* defined in decoder.c */
int readblock( const int fd, uint8_t * const buf, const int size );
/* defined in list.c */
int list_files( const char * const filenames[], const int num_filenames,
const struct Cl_options * const cl_opts );
const Cl_options * const cl_opts );
/* defined in main.c */
struct stat;
struct Pretty_print;
typedef struct Pretty_print Pretty_print;
typedef struct Range_decoder Range_decoder;
extern int verbosity;
void * resize_buffer( void * buf, const unsigned min_size );
void Pp_show_msg( struct Pretty_print * const pp, const char * const msg );
void Pp_show_msg( Pretty_print * const pp, const char * const msg );
const char * bad_version( const unsigned version );
const char * format_ds( const unsigned dictionary_size );
void show_header( const unsigned dictionary_size );
@ -282,8 +281,7 @@ void cleanup_and_fail( const int retval );
void show_error( const char * const msg, const int errcode, const bool help );
void show_file_error( const char * const filename, const char * const msg,
const int errcode );
struct Range_decoder;
void show_dprogress( const unsigned long long cfile_size,
const unsigned long long partial_size,
const struct Range_decoder * const d,
struct Pretty_print * const p );
const Range_decoder * const d,
Pretty_print * const p );