Skip to content

Commit

Permalink
libclamunrar - realign structs - see bb#474
Browse files Browse the repository at this point in the history
git-svn: trunk@3534
  • Loading branch information
aCaB committed Jan 23, 2008
1 parent 5a3aeff commit a6bf7fd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Wed Jan 23 17:45:12 CET 2008 (acab)
-----------------------------------
* libclamunrar: realign structs (related to bb#474)

Wed Jan 23 17:15:28 CET 2008 (tk)
---------------------------------
* shared/output.c: fix handling of special characters in mprintf/logg (bb#360)
Expand Down
2 changes: 1 addition & 1 deletion libclamunrar/unrar.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ typedef struct unpack_data_tag
int last_filter, old_filter_lengths_size;
int64_t written_size;
int64_t dest_unp_size;
uint32_t pack_size;
rarvm_data_t rarvm_data;
unsigned int unp_crc;
uint32_t pack_size;

/* RAR2 variables */
int unp_cur_channel, unp_channel_delta, unp_audio_block, unp_channels;
Expand Down
29 changes: 15 additions & 14 deletions libclamunrar/unrarppm.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

typedef struct rar_mem_blk_tag
{
uint16_t stamp, nu;
struct rar_mem_blk_tag *next, *prev;
uint16_t stamp, nu;
} rar_mem_blk_t;

struct rar_node
Expand All @@ -38,12 +38,11 @@ struct rar_node

typedef struct sub_allocator_tag
{
long sub_allocator_size;
int16_t indx2units[N_INDEXES], units2indx[128], glue_count;
uint8_t *ptext, *units_start, *heap_end, *fake_units_start;
uint8_t *heap_start, *lo_unit, *hi_unit;
long sub_allocator_size;
struct rar_node free_list[N_INDEXES];

uint8_t *ptext, *units_start, *heap_end, *fake_units_start;
int16_t indx2units[N_INDEXES], units2indx[128], glue_count;
} sub_allocator_t;

typedef struct range_coder_tag
Expand All @@ -62,37 +61,39 @@ struct see2_context_tag

struct state_tag
{
struct ppm_context *successor;
uint8_t symbol;
uint8_t freq;
struct ppm_context *successor;
};

struct freq_data_tag
{
uint16_t summ_freq;
struct state_tag *stats;
uint16_t summ_freq;
};

struct ppm_context {
uint16_t num_stats;
struct ppm_context *suffix;
union {
struct freq_data_tag u;
struct state_tag one_state;
} con_ut;
struct ppm_context *suffix;
uint16_t num_stats;
};

typedef struct ppm_data_tag
{
struct state_tag *found_state;
struct ppm_context *min_context, *max_context;
struct see2_context_tag see2cont[25][16], dummy_sse2cont;
int num_masked;
sub_allocator_t sub_alloc;
range_coder_t coder;
int num_masked, init_esc, order_fall, max_order, run_length, init_rl;
struct ppm_context *min_context, *max_context;
struct state_tag *found_state;
int init_esc, order_fall, max_order, run_length, init_rl;
uint8_t char_mask[256], ns2indx[256], ns2bsindx[256], hb2flag[256];
uint8_t esc_count, prev_success, hi_bits_flag;
struct see2_context_tag see2cont[25][16], dummy_sse2cont;
uint16_t bin_summ[128][64];
uint8_t esc_count, prev_success, hi_bits_flag;

} ppm_data_t;

int ppm_decode_init(ppm_data_t *ppm_data, int fd, struct unpack_data_tag *unpack_data, int *EscChar);
Expand Down
6 changes: 3 additions & 3 deletions libclamunrar/unrarvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ enum rarvm_op_type {
};

struct rarvm_prepared_operand {
unsigned int *addr;
enum rarvm_op_type type;
unsigned int data;
unsigned int base;
unsigned int *addr;
};

struct rarvm_prepared_command {
Expand All @@ -79,12 +79,12 @@ struct rarvm_prepared_command {
struct rarvm_prepared_program {
rar_cmd_array_t cmd;
struct rarvm_prepared_command *alt_cmd;
int cmd_count;
unsigned char *global_data;
unsigned char *static_data;
uint8_t *filtered_data;
long global_size, static_size;
int cmd_count;
unsigned int init_r[7];
uint8_t *filtered_data;
unsigned int filtered_data_size;
};

Expand Down

0 comments on commit a6bf7fd

Please sign in to comment.