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
5c812a14
Commit
5c812a14
authored
Mar 14, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Mar 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Constify some variables.
parent
4b445124
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
22 deletions
+21
-22
cabinet.h
dlls/cabinet/cabinet.h
+2
-2
cabinet_main.c
dlls/cabinet/cabinet_main.c
+2
-2
fci.c
dlls/cabinet/fci.c
+5
-5
fdi.c
dlls/cabinet/fdi.c
+12
-13
No files found.
dlls/cabinet/cabinet.h
View file @
5c812a14
...
...
@@ -640,7 +640,7 @@ typedef struct {
/* from fdi.c */
void
QTMupdatemodel
(
struct
QTMmodel
*
model
,
int
sym
);
int
make_decode_table
(
cab_ULONG
nsyms
,
cab_ULONG
nbits
,
cab_UBYTE
*
length
,
cab_UWORD
*
table
);
cab_ULONG
checksum
(
cab_UBYTE
*
data
,
cab_UWORD
bytes
,
cab_ULONG
csum
);
int
make_decode_table
(
cab_ULONG
nsyms
,
cab_ULONG
nbits
,
c
onst
c
ab_UBYTE
*
length
,
cab_UWORD
*
table
);
cab_ULONG
checksum
(
c
onst
c
ab_UBYTE
*
data
,
cab_UWORD
bytes
,
cab_ULONG
csum
);
#endif
/* __WINE_CABINET_H */
dlls/cabinet/cabinet_main.c
View file @
5c812a14
...
...
@@ -154,7 +154,7 @@ static long fdi_seek(INT_PTR hf, long dist, int seektype)
return
SetFilePointer
(
handle
,
dist
,
NULL
,
seektype
);
}
static
void
fill_file_node
(
struct
ExtractFileList
*
pNode
,
LPSTR
szFilename
)
static
void
fill_file_node
(
struct
ExtractFileList
*
pNode
,
LP
C
STR
szFilename
)
{
pNode
->
next
=
NULL
;
pNode
->
flag
=
FALSE
;
...
...
@@ -163,7 +163,7 @@ static void fill_file_node(struct ExtractFileList *pNode, LPSTR szFilename)
lstrcpyA
(
pNode
->
filename
,
szFilename
);
}
static
BOOL
file_in_list
(
struct
ExtractFileList
*
pNode
,
LP
STR
szFilename
)
static
BOOL
file_in_list
(
const
struct
ExtractFileList
*
pNode
,
LPC
STR
szFilename
)
{
while
(
pNode
)
{
...
...
dlls/cabinet/fci.c
View file @
5c812a14
...
...
@@ -430,12 +430,12 @@ static BOOL fci_flush_data_block (HFCI hfci, int* err,
static
cab_ULONG
fci_get_checksum
(
void
*
pv
,
UINT
cb
,
CHECKSUM
seed
)
static
cab_ULONG
fci_get_checksum
(
const
void
*
pv
,
UINT
cb
,
CHECKSUM
seed
)
{
cab_ULONG
csum
;
cab_ULONG
ul
;
int
cUlong
;
BYTE
*
pb
;
cab_ULONG
csum
;
cab_ULONG
ul
;
int
cUlong
;
const
BYTE
*
pb
;
csum
=
seed
;
cUlong
=
cb
/
4
;
...
...
dlls/cabinet/fdi.c
View file @
5c812a14
...
...
@@ -220,7 +220,7 @@ void QTMupdatemodel(struct QTMmodel *model, int sym) {
* OK: 0
* error: 1
*/
int
make_decode_table
(
cab_ULONG
nsyms
,
cab_ULONG
nbits
,
cab_UBYTE
*
length
,
cab_UWORD
*
table
)
{
int
make_decode_table
(
cab_ULONG
nsyms
,
cab_ULONG
nbits
,
c
onst
c
ab_UBYTE
*
length
,
cab_UWORD
*
table
)
{
register
cab_UWORD
sym
;
register
cab_ULONG
leaf
;
register
cab_UBYTE
bit_num
=
1
;
...
...
@@ -293,7 +293,7 @@ int make_decode_table(cab_ULONG nsyms, cab_ULONG nbits, cab_UBYTE *length, cab_U
/*************************************************************************
* checksum (internal)
*/
cab_ULONG
checksum
(
cab_UBYTE
*
data
,
cab_UWORD
bytes
,
cab_ULONG
csum
)
{
cab_ULONG
checksum
(
c
onst
c
ab_UBYTE
*
data
,
cab_UWORD
bytes
,
cab_ULONG
csum
)
{
int
len
;
cab_ULONG
ul
=
0
;
...
...
@@ -1132,16 +1132,16 @@ struct Ziphuft **t, cab_LONG *m, fdi_decomp_state *decomp_state)
/*********************************************************
* fdi_Zipinflate_codes (internal)
*/
static
cab_LONG
fdi_Zipinflate_codes
(
struct
Ziphuft
*
tl
,
struct
Ziphuft
*
td
,
static
cab_LONG
fdi_Zipinflate_codes
(
const
struct
Ziphuft
*
tl
,
const
struct
Ziphuft
*
td
,
cab_LONG
bl
,
cab_LONG
bd
,
fdi_decomp_state
*
decomp_state
)
{
register
cab_ULONG
e
;
/* table entry flag/number of extra bits */
cab_ULONG
n
,
d
;
/* length and index for copy */
cab_ULONG
w
;
/* current window position */
struct
Ziphuft
*
t
;
/* pointer to table entry */
cab_ULONG
ml
,
md
;
/* masks for bl and bd bits */
register
cab_ULONG
b
;
/* bit buffer */
register
cab_ULONG
k
;
/* number of bits in bit buffer */
register
cab_ULONG
e
;
/* table entry flag/number of extra bits */
cab_ULONG
n
,
d
;
/* length and index for copy */
cab_ULONG
w
;
/* current window position */
const
struct
Ziphuft
*
t
;
/* pointer to table entry */
cab_ULONG
ml
,
md
;
/* masks for bl and bd bits */
register
cab_ULONG
b
;
/* bit buffer */
register
cab_ULONG
k
;
/* number of bits in bit buffer */
/* make local copies of globals */
b
=
ZIP
(
bb
);
/* initialize bit buffer */
...
...
@@ -1507,7 +1507,6 @@ static int QTMfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
cab_UBYTE
*
inpos
=
CAB
(
inbuf
);
cab_UBYTE
*
window
=
QTM
(
window
);
cab_UBYTE
*
runsrc
,
*
rundest
;
cab_ULONG
window_posn
=
QTM
(
window_posn
);
cab_ULONG
window_size
=
QTM
(
window_size
);
...
...
@@ -1677,7 +1676,7 @@ static int fdi_lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG last, s
*/
static
int
LZXfdi_decomp
(
int
inlen
,
int
outlen
,
fdi_decomp_state
*
decomp_state
)
{
cab_UBYTE
*
inpos
=
CAB
(
inbuf
);
cab_UBYTE
*
endinp
=
inpos
+
inlen
;
c
onst
c
ab_UBYTE
*
endinp
=
inpos
+
inlen
;
cab_UBYTE
*
window
=
LZX
(
window
);
cab_UBYTE
*
runsrc
,
*
rundest
;
cab_UWORD
*
hufftbl
;
/* used in READ_HUFFSYM macro as chosen decoding table */
...
...
@@ -2007,7 +2006,7 @@ static int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
* is also where we jump to additional cabinets in the case of split
* cab's, and provide (some of) the NEXT_CABINET notification semantics.
*/
static
int
fdi_decomp
(
struct
fdi_file
*
fi
,
int
savemode
,
fdi_decomp_state
*
decomp_state
,
static
int
fdi_decomp
(
const
struct
fdi_file
*
fi
,
int
savemode
,
fdi_decomp_state
*
decomp_state
,
char
*
pszCabPath
,
PFNFDINOTIFY
pfnfdin
,
void
*
pvUser
)
{
cab_ULONG
bytes
=
savemode
?
fi
->
length
:
fi
->
offset
-
CAB
(
offset
);
...
...
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