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
a71fbe16
Commit
a71fbe16
authored
Feb 04, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Move the internal FCI structure to fci.c.
parent
b18b5966
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
56 deletions
+58
-56
cabinet.h
dlls/cabinet/cabinet.h
+0
-53
fci.c
dlls/cabinet/fci.c
+58
-3
No files found.
dlls/cabinet/cabinet.h
View file @
a71fbe16
...
...
@@ -309,58 +309,6 @@ typedef struct cds_forward {
/* _Int as in "Internal" fyi */
typedef
struct
{
unsigned
int
FCI_Intmagic
;
PERF
perf
;
PFNFCIFILEPLACED
fileplaced
;
PFNFCIALLOC
alloc
;
PFNFCIFREE
free
;
PFNFCIOPEN
open
;
PFNFCIREAD
read
;
PFNFCIWRITE
write
;
PFNFCICLOSE
close
;
PFNFCISEEK
seek
;
PFNFCIDELETE
delete
;
PFNFCIGETTEMPFILE
gettemp
;
PCCAB
pccab
;
BOOL
fPrevCab
;
BOOL
fNextCab
;
BOOL
fSplitFolder
;
cab_ULONG
statusFolderCopied
;
cab_ULONG
statusFolderTotal
;
BOOL
fGetNextCabInVain
;
void
*
pv
;
char
szPrevCab
[
CB_MAX_CABINET_NAME
];
/* previous cabinet name */
char
szPrevDisk
[
CB_MAX_DISK_NAME
];
/* disk name of previous cabinet */
CCAB
oldCCAB
;
char
*
data_in
;
/* uncompressed data blocks */
cab_UWORD
cdata_in
;
char
*
data_out
;
/* compressed data blocks */
ULONG
cCompressedBytesInFolder
;
cab_UWORD
cFolders
;
cab_UWORD
cFiles
;
cab_ULONG
cDataBlocks
;
cab_ULONG
cbFileRemainer
;
/* uncompressed, yet to be written data */
/* of spanned file of a spanning folder of a spanning cabinet */
char
szFileNameCFDATA1
[
CB_MAX_FILENAME
];
int
handleCFDATA1
;
char
szFileNameCFFILE1
[
CB_MAX_FILENAME
];
int
handleCFFILE1
;
char
szFileNameCFDATA2
[
CB_MAX_FILENAME
];
int
handleCFDATA2
;
char
szFileNameCFFILE2
[
CB_MAX_FILENAME
];
int
handleCFFILE2
;
char
szFileNameCFFOLDER
[
CB_MAX_FILENAME
];
int
handleCFFOLDER
;
cab_ULONG
sizeFileCFDATA1
;
cab_ULONG
sizeFileCFFILE1
;
cab_ULONG
sizeFileCFDATA2
;
cab_ULONG
sizeFileCFFILE2
;
cab_ULONG
sizeFileCFFOLDER
;
BOOL
fNewPrevious
;
cab_ULONG
estimatedCabinetSize
;
}
FCI_Int
,
*
PFCI_Int
;
typedef
struct
{
unsigned
int
FDI_Intmagic
;
PFNALLOC
pfnalloc
;
PFNFREE
pfnfree
;
...
...
@@ -384,7 +332,6 @@ typedef struct {
#define PFDI_CLOSE(hfdi, hf) ((*PFDI_INT(hfdi)->pfnclose) (hf))
#define PFDI_SEEK(hfdi, hf, dist, type) ((*PFDI_INT(hfdi)->pfnseek) (hf, dist, type))
#define FCI_INT_MAGIC 0xfcfcfc05
#define FDI_INT_MAGIC 0xfdfdfd05
#define REALLY_IS_FDI(hfdi) ( \
...
...
dlls/cabinet/fci.c
View file @
a71fbe16
...
...
@@ -102,6 +102,61 @@ typedef struct {
}
CFDATA
;
typedef
struct
{
unsigned
int
magic
;
PERF
perf
;
PFNFCIFILEPLACED
fileplaced
;
PFNFCIALLOC
alloc
;
PFNFCIFREE
free
;
PFNFCIOPEN
open
;
PFNFCIREAD
read
;
PFNFCIWRITE
write
;
PFNFCICLOSE
close
;
PFNFCISEEK
seek
;
PFNFCIDELETE
delete
;
PFNFCIGETTEMPFILE
gettemp
;
PCCAB
pccab
;
BOOL
fPrevCab
;
BOOL
fNextCab
;
BOOL
fSplitFolder
;
cab_ULONG
statusFolderCopied
;
cab_ULONG
statusFolderTotal
;
BOOL
fGetNextCabInVain
;
void
*
pv
;
char
szPrevCab
[
CB_MAX_CABINET_NAME
];
/* previous cabinet name */
char
szPrevDisk
[
CB_MAX_DISK_NAME
];
/* disk name of previous cabinet */
CCAB
oldCCAB
;
char
*
data_in
;
/* uncompressed data blocks */
cab_UWORD
cdata_in
;
char
*
data_out
;
/* compressed data blocks */
ULONG
cCompressedBytesInFolder
;
cab_UWORD
cFolders
;
cab_UWORD
cFiles
;
cab_ULONG
cDataBlocks
;
cab_ULONG
cbFileRemainer
;
/* uncompressed, yet to be written data */
/* of spanned file of a spanning folder of a spanning cabinet */
char
szFileNameCFDATA1
[
CB_MAX_FILENAME
];
int
handleCFDATA1
;
char
szFileNameCFFILE1
[
CB_MAX_FILENAME
];
int
handleCFFILE1
;
char
szFileNameCFDATA2
[
CB_MAX_FILENAME
];
int
handleCFDATA2
;
char
szFileNameCFFILE2
[
CB_MAX_FILENAME
];
int
handleCFFILE2
;
char
szFileNameCFFOLDER
[
CB_MAX_FILENAME
];
int
handleCFFOLDER
;
cab_ULONG
sizeFileCFDATA1
;
cab_ULONG
sizeFileCFFILE1
;
cab_ULONG
sizeFileCFDATA2
;
cab_ULONG
sizeFileCFFILE2
;
cab_ULONG
sizeFileCFFOLDER
;
BOOL
fNewPrevious
;
cab_ULONG
estimatedCabinetSize
;
}
FCI_Int
;
#define FCI_INT_MAGIC 0xfcfcfc05
static
void
set_error
(
FCI_Int
*
fci
,
int
oper
,
int
err
)
{
fci
->
perf
->
erfOper
=
oper
;
...
...
@@ -114,7 +169,7 @@ static FCI_Int *get_fci_ptr( HFCI hfci )
{
FCI_Int
*
fci
=
(
FCI_Int
*
)
hfci
;
if
(
!
fci
||
!
fci
->
FCI_Int
magic
==
FCI_INT_MAGIC
)
if
(
!
fci
||
!
fci
->
magic
==
FCI_INT_MAGIC
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
NULL
;
...
...
@@ -209,7 +264,7 @@ HFCI __cdecl FCICreate(
return
NULL
;
}
p_fci_internal
->
FCI_Int
magic
=
FCI_INT_MAGIC
;
p_fci_internal
->
magic
=
FCI_INT_MAGIC
;
p_fci_internal
->
perf
=
perf
;
p_fci_internal
->
fileplaced
=
pfnfiledest
;
p_fci_internal
->
alloc
=
pfnalloc
;
...
...
@@ -2827,7 +2882,7 @@ BOOL __cdecl FCIDestroy(HFCI hfci)
/* before hfci can be removed all temporary files must be closed */
/* and deleted */
p_fci_internal
->
FCI_Int
magic
=
0
;
p_fci_internal
->
magic
=
0
;
p_fci_internal
->
close
(
p_fci_internal
->
handleCFDATA1
,
&
err
,
p_fci_internal
->
pv
);
/* TODO error handling of 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