Module: wine Branch: master Commit: 7a9b3894652c5b7520512899847b34b0c35c5db8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7a9b3894652c5b752051289984...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Feb 4 12:31:29 2011 +0100
cabinet: Move internal FDI definitions to fdi.c.
---
dlls/cabinet/cabinet.h | 37 ------------------------------------- dlls/cabinet/fdi.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 37 deletions(-)
diff --git a/dlls/cabinet/cabinet.h b/dlls/cabinet/cabinet.h index edb94ea..b84c3a7 100644 --- a/dlls/cabinet/cabinet.h +++ b/dlls/cabinet/cabinet.h @@ -306,48 +306,11 @@ typedef struct cds_forward { } methods; } cab_decomp_state;
-/* _Int as in "Internal" fyi */ - -typedef struct { - unsigned int magic; - PFNALLOC alloc; - PFNFREE free; - PFNOPEN open; - PFNREAD read; - PFNWRITE write; - PFNCLOSE close; - PFNSEEK seek; - PERF perf; -} FDI_Int; - -#define FDI_INT_MAGIC 0xfdfdfd05 - /* * the rest of these are somewhat kludgy macros which are shared between fdi.c * and cabextract.c. */
-#define ZIPNEEDBITS(n) {while(k<(n)){cab_LONG c=*(ZIP(inpos)++);\ - b|=((cab_ULONG)c)<<k;k+=8;}} -#define ZIPDUMPBITS(n) {b>>=(n);k-=(n);} - -/* endian-neutral reading of little-endian data */ -#define EndGetI32(a) ((((a)[3])<<24)|(((a)[2])<<16)|(((a)[1])<<8)|((a)[0])) -#define EndGetI16(a) ((((a)[1])<<8)|((a)[0])) - -#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) -#define DECR_NOMEMORY (3) -#define DECR_CHECKSUM (4) -#define DECR_INPUT (5) -#define DECR_OUTPUT (6) -#define DECR_USERABORT (7) - /* Bitstream reading macros (Quantum / normal byte order) * * Q_INIT_BITSTREAM should be used first to set up the system diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c index 661a6ec..b5dc29d 100644 --- a/dlls/cabinet/fdi.c +++ b/dlls/cabinet/fdi.c @@ -110,6 +110,21 @@ typedef struct { cab_UBYTE block_resv; } MORE_ISCAB_INFO, *PMORE_ISCAB_INFO;
+typedef struct +{ + unsigned int magic; + PFNALLOC alloc; + PFNFREE free; + PFNOPEN open; + PFNREAD read; + PFNWRITE write; + PFNCLOSE close; + PFNSEEK seek; + PERF perf; +} FDI_Int; + +#define FDI_INT_MAGIC 0xfdfdfd05 + /* * ugh, well, this ended up being pretty damn silly... * now that I've conceded to build equivalent structures to struct cab.*, @@ -148,6 +163,26 @@ typedef struct fdi_cds_fwd { struct fdi_cds_fwd *next; } fdi_decomp_state;
+#define ZIPNEEDBITS(n) {while(k<(n)){cab_LONG c=*(ZIP(inpos)++);\ + b|=((cab_ULONG)c)<<k;k+=8;}} +#define ZIPDUMPBITS(n) {b>>=(n);k-=(n);} + +/* endian-neutral reading of little-endian data */ +#define EndGetI32(a) ((((a)[3])<<24)|(((a)[2])<<16)|(((a)[1])<<8)|((a)[0])) +#define EndGetI16(a) ((((a)[1])<<8)|((a)[0])) + +#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) +#define DECR_NOMEMORY (3) +#define DECR_CHECKSUM (4) +#define DECR_INPUT (5) +#define DECR_OUTPUT (6) +#define DECR_USERABORT (7)
static void set_error( FDI_Int *fdi, int oper, int err ) {