Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7a9b3894
Commit
7a9b3894
authored
Feb 04, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Move internal FDI definitions to fdi.c.
parent
05702c14
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
37 deletions
+35
-37
cabinet.h
dlls/cabinet/cabinet.h
+0
-37
fdi.c
dlls/cabinet/fdi.c
+35
-0
No files found.
dlls/cabinet/cabinet.h
View file @
7a9b3894
...
...
@@ -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
...
...
dlls/cabinet/fdi.c
View file @
7a9b3894
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment