Commit 03e0a496 authored by Gregory M. Turner's avatar Gregory M. Turner Committed by Alexandre Julliard

- paranoia: eliminate some global variables

- better reminder on how to fix memory leaks
parent a4a5e9ae
......@@ -211,10 +211,10 @@ struct LZXstate {
};
/* generic stuff */
#define CAB(x) (decomp_state.x)
#define ZIP(x) (decomp_state.methods.zip.x)
#define QTM(x) (decomp_state.methods.qtm.x)
#define LZX(x) (decomp_state.methods.lzx.x)
#define CAB(x) (decomp_state->x)
#define ZIP(x) (decomp_state->methods.zip.x)
#define QTM(x) (decomp_state->methods.qtm.x)
#define LZX(x) (decomp_state->methods.lzx.x)
#define DECR_OK (0)
#define DECR_DATAFORMAT (1)
#define DECR_ILLEGALDATA (2)
......@@ -269,13 +269,13 @@ struct cabinet {
cab_UBYTE flags; /* header flags */
};
typedef struct {
typedef struct cds_forward {
struct cab_folder *current; /* current folder we're extracting from */
cab_ULONG offset; /* uncompressed offset within folder */
cab_UBYTE *outpos; /* (high level) start of data to use up */
cab_UWORD outlen; /* (high level) amount of data to use up */
cab_UWORD split; /* at which split in current folder? */
int (*decompress)(int, int); /* the chosen compression func */
int (*decompress)(int, int, struct cds_forward *); /* the chosen compression func */
cab_UBYTE inbuf[CAB_INPUTMAX+2]; /* +2 for lzx bitbuffer overflows! */
cab_UBYTE outbuf[CAB_BLOCKMAX];
union {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment