Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8b362f7f
Commit
8b362f7f
authored
Jun 12, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Jun 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Constify some variables.
parent
ffc4a4f3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
28 deletions
+28
-28
msipriv.h
dlls/msi/msipriv.h
+7
-7
query.h
dlls/msi/query.h
+1
-1
select.c
dlls/msi/select.c
+2
-2
sql.y
dlls/msi/sql.y
+6
-6
string.c
dlls/msi/string.c
+8
-8
suminfo.c
dlls/msi/suminfo.c
+4
-4
No files found.
dlls/msi/msipriv.h
View file @
8b362f7f
...
@@ -548,17 +548,17 @@ enum StringPersistence
...
@@ -548,17 +548,17 @@ enum StringPersistence
};
};
extern
BOOL
msi_addstringW
(
string_table
*
st
,
UINT
string_no
,
const
WCHAR
*
data
,
int
len
,
UINT
refcount
,
enum
StringPersistence
persistence
);
extern
BOOL
msi_addstringW
(
string_table
*
st
,
UINT
string_no
,
const
WCHAR
*
data
,
int
len
,
UINT
refcount
,
enum
StringPersistence
persistence
);
extern
UINT
msi_id2stringW
(
string_table
*
st
,
UINT
string_no
,
LPWSTR
buffer
,
UINT
*
sz
);
extern
UINT
msi_id2stringW
(
const
string_table
*
st
,
UINT
string_no
,
LPWSTR
buffer
,
UINT
*
sz
);
extern
UINT
msi_id2stringA
(
string_table
*
st
,
UINT
string_no
,
LPSTR
buffer
,
UINT
*
sz
);
extern
UINT
msi_id2stringA
(
const
string_table
*
st
,
UINT
string_no
,
LPSTR
buffer
,
UINT
*
sz
);
extern
UINT
msi_string2idW
(
string_table
*
st
,
LPCWSTR
buffer
,
UINT
*
id
);
extern
UINT
msi_string2idW
(
const
string_table
*
st
,
LPCWSTR
buffer
,
UINT
*
id
);
extern
UINT
msi_string2idA
(
string_table
*
st
,
LPCSTR
str
,
UINT
*
id
);
extern
UINT
msi_string2idA
(
const
string_table
*
st
,
LPCSTR
str
,
UINT
*
id
);
extern
VOID
msi_destroy_stringtable
(
string_table
*
st
);
extern
VOID
msi_destroy_stringtable
(
string_table
*
st
);
extern
UINT
msi_strcmp
(
string_table
*
st
,
UINT
lval
,
UINT
rval
,
UINT
*
res
);
extern
UINT
msi_strcmp
(
const
string_table
*
st
,
UINT
lval
,
UINT
rval
,
UINT
*
res
);
extern
const
WCHAR
*
msi_string_lookup_id
(
string_table
*
st
,
UINT
id
);
extern
const
WCHAR
*
msi_string_lookup_id
(
const
string_table
*
st
,
UINT
id
);
extern
HRESULT
msi_init_string_table
(
IStorage
*
stg
);
extern
HRESULT
msi_init_string_table
(
IStorage
*
stg
);
extern
string_table
*
msi_load_string_table
(
IStorage
*
stg
,
UINT
*
bytes_per_strref
);
extern
string_table
*
msi_load_string_table
(
IStorage
*
stg
,
UINT
*
bytes_per_strref
);
extern
UINT
msi_save_string_table
(
string_table
*
st
,
IStorage
*
storage
);
extern
UINT
msi_save_string_table
(
const
string_table
*
st
,
IStorage
*
storage
);
extern
void
msi_table_set_strref
(
UINT
bytes_per_strref
);
extern
void
msi_table_set_strref
(
UINT
bytes_per_strref
);
...
...
dlls/msi/query.h
View file @
8b362f7f
...
@@ -98,7 +98,7 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview,
...
@@ -98,7 +98,7 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview,
UINT
TABLE_CreateView
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
MSIVIEW
**
view
);
UINT
TABLE_CreateView
(
MSIDATABASE
*
db
,
LPCWSTR
name
,
MSIVIEW
**
view
);
UINT
SELECT_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
,
UINT
SELECT_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
,
column_info
*
columns
);
co
nst
co
lumn_info
*
columns
);
UINT
DISTINCT_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
);
UINT
DISTINCT_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
);
...
...
dlls/msi/select.c
View file @
8b362f7f
...
@@ -310,7 +310,7 @@ static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name )
...
@@ -310,7 +310,7 @@ static UINT SELECT_AddColumn( MSISELECTVIEW *sv, LPCWSTR name )
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
static
int
select_count_columns
(
column_info
*
col
)
static
int
select_count_columns
(
co
nst
co
lumn_info
*
col
)
{
{
int
n
;
int
n
;
for
(
n
=
0
;
col
;
col
=
col
->
next
)
for
(
n
=
0
;
col
;
col
=
col
->
next
)
...
@@ -319,7 +319,7 @@ static int select_count_columns( column_info *col )
...
@@ -319,7 +319,7 @@ static int select_count_columns( column_info *col )
}
}
UINT
SELECT_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
,
UINT
SELECT_CreateView
(
MSIDATABASE
*
db
,
MSIVIEW
**
view
,
MSIVIEW
*
table
,
column_info
*
columns
)
co
nst
co
lumn_info
*
columns
)
{
{
MSISELECTVIEW
*
sv
=
NULL
;
MSISELECTVIEW
*
sv
=
NULL
;
UINT
count
=
0
,
r
=
ERROR_SUCCESS
;
UINT
count
=
0
,
r
=
ERROR_SUCCESS
;
...
...
dlls/msi/sql.y
View file @
8b362f7f
...
@@ -51,7 +51,7 @@ typedef struct tag_SQL_input
...
@@ -51,7 +51,7 @@ typedef struct tag_SQL_input
struct list *mem;
struct list *mem;
} SQL_input;
} SQL_input;
static LPWSTR SQL_getstring( void *info, struct sql_str *str );
static LPWSTR SQL_getstring( void *info,
const
struct sql_str *str );
static INT SQL_getint( void *info );
static INT SQL_getint( void *info );
static int sql_lex( void *SQL_lval, SQL_input *info );
static int sql_lex( void *SQL_lval, SQL_input *info );
...
@@ -62,9 +62,9 @@ static BOOL SQL_MarkPrimaryKeys( column_info *cols, column_info *keys);
...
@@ -62,9 +62,9 @@ static BOOL SQL_MarkPrimaryKeys( column_info *cols, column_info *keys);
static struct expr * EXPR_complex( void *info, struct expr *l, UINT op, struct expr *r );
static struct expr * EXPR_complex( void *info, struct expr *l, UINT op, struct expr *r );
static struct expr * EXPR_unary( void *info, struct expr *l, UINT op );
static struct expr * EXPR_unary( void *info, struct expr *l, UINT op );
static struct expr * EXPR_column( void *info, column_info *column );
static struct expr * EXPR_column( void *info, co
nst co
lumn_info *column );
static struct expr * EXPR_ival( void *info, int val );
static struct expr * EXPR_ival( void *info, int val );
static struct expr * EXPR_sval( void *info, struct sql_str * );
static struct expr * EXPR_sval( void *info,
const
struct sql_str * );
static struct expr * EXPR_wildcard( void *info );
static struct expr * EXPR_wildcard( void *info );
%}
%}
...
@@ -697,7 +697,7 @@ static int sql_lex( void *SQL_lval, SQL_input *sql )
...
@@ -697,7 +697,7 @@ static int sql_lex( void *SQL_lval, SQL_input *sql )
return token;
return token;
}
}
LPWSTR SQL_getstring( void *info, struct sql_str *strdata )
LPWSTR SQL_getstring( void *info,
const
struct sql_str *strdata )
{
{
LPCWSTR p = strdata->data;
LPCWSTR p = strdata->data;
UINT len = strdata->len;
UINT len = strdata->len;
...
@@ -779,7 +779,7 @@ static struct expr * EXPR_unary( void *info, struct expr *l, UINT op )
...
@@ -779,7 +779,7 @@ static struct expr * EXPR_unary( void *info, struct expr *l, UINT op )
return e;
return e;
}
}
static struct expr * EXPR_column( void *info, column_info *column )
static struct expr * EXPR_column( void *info, co
nst co
lumn_info *column )
{
{
struct expr *e = parser_alloc( info, sizeof *e );
struct expr *e = parser_alloc( info, sizeof *e );
if( e )
if( e )
...
@@ -801,7 +801,7 @@ static struct expr * EXPR_ival( void *info, int val )
...
@@ -801,7 +801,7 @@ static struct expr * EXPR_ival( void *info, int val )
return e;
return e;
}
}
static struct expr * EXPR_sval( void *info, struct sql_str *str )
static struct expr * EXPR_sval( void *info,
const
struct sql_str *str )
{
{
struct expr *e = parser_alloc( info, sizeof *e );
struct expr *e = parser_alloc( info, sizeof *e );
if( e )
if( e )
...
...
dlls/msi/string.c
View file @
8b362f7f
...
@@ -279,7 +279,7 @@ int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, UINT r
...
@@ -279,7 +279,7 @@ int msi_addstringW( string_table *st, UINT n, const WCHAR *data, int len, UINT r
}
}
/* find the string identified by an id - return null if there's none */
/* find the string identified by an id - return null if there's none */
const
WCHAR
*
msi_string_lookup_id
(
string_table
*
st
,
UINT
id
)
const
WCHAR
*
msi_string_lookup_id
(
const
string_table
*
st
,
UINT
id
)
{
{
static
const
WCHAR
zero
[]
=
{
0
};
static
const
WCHAR
zero
[]
=
{
0
};
if
(
id
==
0
)
if
(
id
==
0
)
...
@@ -306,7 +306,7 @@ const WCHAR *msi_string_lookup_id( string_table *st, UINT id )
...
@@ -306,7 +306,7 @@ const WCHAR *msi_string_lookup_id( string_table *st, UINT id )
* The size includes the terminating nul character. Short buffers
* The size includes the terminating nul character. Short buffers
* will be filled, but not nul terminated.
* will be filled, but not nul terminated.
*/
*/
UINT
msi_id2stringW
(
string_table
*
st
,
UINT
id
,
LPWSTR
buffer
,
UINT
*
sz
)
UINT
msi_id2stringW
(
const
string_table
*
st
,
UINT
id
,
LPWSTR
buffer
,
UINT
*
sz
)
{
{
UINT
len
;
UINT
len
;
const
WCHAR
*
str
;
const
WCHAR
*
str
;
...
@@ -345,7 +345,7 @@ UINT msi_id2stringW( string_table *st, UINT id, LPWSTR buffer, UINT *sz )
...
@@ -345,7 +345,7 @@ UINT msi_id2stringW( string_table *st, UINT id, LPWSTR buffer, UINT *sz )
* The size includes the terminating nul character. Short buffers
* The size includes the terminating nul character. Short buffers
* will be filled, but not nul terminated.
* will be filled, but not nul terminated.
*/
*/
UINT
msi_id2stringA
(
string_table
*
st
,
UINT
id
,
LPSTR
buffer
,
UINT
*
sz
)
UINT
msi_id2stringA
(
const
string_table
*
st
,
UINT
id
,
LPSTR
buffer
,
UINT
*
sz
)
{
{
UINT
len
;
UINT
len
;
const
WCHAR
*
str
;
const
WCHAR
*
str
;
...
@@ -387,7 +387,7 @@ UINT msi_id2stringA( string_table *st, UINT id, LPSTR buffer, UINT *sz )
...
@@ -387,7 +387,7 @@ UINT msi_id2stringA( string_table *st, UINT id, LPSTR buffer, UINT *sz )
* [in] str - string to find in the string table
* [in] str - string to find in the string table
* [out] id - id of the string, if found
* [out] id - id of the string, if found
*/
*/
UINT
msi_string2idW
(
string_table
*
st
,
LPCWSTR
str
,
UINT
*
id
)
UINT
msi_string2idW
(
const
string_table
*
st
,
LPCWSTR
str
,
UINT
*
id
)
{
{
UINT
n
,
hash
=
msistring_makehash
(
str
);
UINT
n
,
hash
=
msistring_makehash
(
str
);
msistring
*
se
=
st
->
strings
;
msistring
*
se
=
st
->
strings
;
...
@@ -404,7 +404,7 @@ UINT msi_string2idW( string_table *st, LPCWSTR str, UINT *id )
...
@@ -404,7 +404,7 @@ UINT msi_string2idW( string_table *st, LPCWSTR str, UINT *id )
return
ERROR_INVALID_PARAMETER
;
return
ERROR_INVALID_PARAMETER
;
}
}
UINT
msi_string2idA
(
string_table
*
st
,
LPCSTR
buffer
,
UINT
*
id
)
UINT
msi_string2idA
(
const
string_table
*
st
,
LPCSTR
buffer
,
UINT
*
id
)
{
{
DWORD
sz
;
DWORD
sz
;
UINT
r
=
ERROR_INVALID_PARAMETER
;
UINT
r
=
ERROR_INVALID_PARAMETER
;
...
@@ -432,7 +432,7 @@ UINT msi_string2idA( string_table *st, LPCSTR buffer, UINT *id )
...
@@ -432,7 +432,7 @@ UINT msi_string2idA( string_table *st, LPCSTR buffer, UINT *id )
return
r
;
return
r
;
}
}
UINT
msi_strcmp
(
string_table
*
st
,
UINT
lval
,
UINT
rval
,
UINT
*
res
)
UINT
msi_strcmp
(
const
string_table
*
st
,
UINT
lval
,
UINT
rval
,
UINT
*
res
)
{
{
const
WCHAR
*
l_str
,
*
r_str
;
const
WCHAR
*
l_str
,
*
r_str
;
...
@@ -450,7 +450,7 @@ UINT msi_strcmp( string_table *st, UINT lval, UINT rval, UINT *res )
...
@@ -450,7 +450,7 @@ UINT msi_strcmp( string_table *st, UINT lval, UINT rval, UINT *res )
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
static
void
string_totalsize
(
string_table
*
st
,
UINT
*
datasize
,
UINT
*
poolsize
)
static
void
string_totalsize
(
const
string_table
*
st
,
UINT
*
datasize
,
UINT
*
poolsize
)
{
{
UINT
i
,
len
,
max
,
holesize
;
UINT
i
,
len
,
max
,
holesize
;
...
@@ -595,7 +595,7 @@ end:
...
@@ -595,7 +595,7 @@ end:
return
st
;
return
st
;
}
}
UINT
msi_save_string_table
(
string_table
*
st
,
IStorage
*
storage
)
UINT
msi_save_string_table
(
const
string_table
*
st
,
IStorage
*
storage
)
{
{
UINT
i
,
datasize
=
0
,
poolsize
=
0
,
sz
,
used
,
r
,
codepage
,
n
;
UINT
i
,
datasize
=
0
,
poolsize
=
0
,
sz
,
used
,
r
,
codepage
,
n
;
UINT
ret
=
ERROR_FUNCTION_FAILED
;
UINT
ret
=
ERROR_FUNCTION_FAILED
;
...
...
dlls/msi/suminfo.c
View file @
8b362f7f
...
@@ -131,7 +131,7 @@ static UINT get_type( UINT uiProperty )
...
@@ -131,7 +131,7 @@ static UINT get_type( UINT uiProperty )
return
VT_EMPTY
;
return
VT_EMPTY
;
}
}
static
UINT
get_property_count
(
PROPVARIANT
*
property
)
static
UINT
get_property_count
(
const
PROPVARIANT
*
property
)
{
{
UINT
i
,
n
=
0
;
UINT
i
,
n
=
0
;
...
@@ -293,7 +293,7 @@ static DWORD write_dword( LPBYTE data, DWORD ofs, DWORD val )
...
@@ -293,7 +293,7 @@ static DWORD write_dword( LPBYTE data, DWORD ofs, DWORD val )
return
4
;
return
4
;
}
}
static
DWORD
write_filetime
(
LPBYTE
data
,
DWORD
ofs
,
LPFILETIME
ft
)
static
DWORD
write_filetime
(
LPBYTE
data
,
DWORD
ofs
,
const
FILETIME
*
ft
)
{
{
write_dword
(
data
,
ofs
,
ft
->
dwLowDateTime
);
write_dword
(
data
,
ofs
,
ft
->
dwLowDateTime
);
write_dword
(
data
,
ofs
+
4
,
ft
->
dwHighDateTime
);
write_dword
(
data
,
ofs
+
4
,
ft
->
dwHighDateTime
);
...
@@ -309,7 +309,7 @@ static DWORD write_string( LPBYTE data, DWORD ofs, LPCSTR str )
...
@@ -309,7 +309,7 @@ static DWORD write_string( LPBYTE data, DWORD ofs, LPCSTR str )
return
(
7
+
len
)
&
~
3
;
return
(
7
+
len
)
&
~
3
;
}
}
static
UINT
write_property_to_data
(
PROPVARIANT
*
prop
,
LPBYTE
data
)
static
UINT
write_property_to_data
(
const
PROPVARIANT
*
prop
,
LPBYTE
data
)
{
{
DWORD
sz
=
0
;
DWORD
sz
=
0
;
...
@@ -336,7 +336,7 @@ static UINT write_property_to_data( PROPVARIANT *prop, LPBYTE data )
...
@@ -336,7 +336,7 @@ static UINT write_property_to_data( PROPVARIANT *prop, LPBYTE data )
return
sz
;
return
sz
;
}
}
static
UINT
save_summary_info
(
MSISUMMARYINFO
*
si
,
IStream
*
stm
)
static
UINT
save_summary_info
(
const
MSISUMMARYINFO
*
si
,
IStream
*
stm
)
{
{
UINT
ret
=
ERROR_FUNCTION_FAILED
;
UINT
ret
=
ERROR_FUNCTION_FAILED
;
PROPERTYSETHEADER
set_hdr
;
PROPERTYSETHEADER
set_hdr
;
...
...
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