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
db334624
Commit
db334624
authored
Feb 13, 2015
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Get rid of the refcount parameter to msi_addstringW.
parent
d954fbf8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
msipriv.h
dlls/msi/msipriv.h
+1
-1
storages.c
dlls/msi/storages.c
+1
-1
streams.c
dlls/msi/streams.c
+1
-1
string.c
dlls/msi/string.c
+11
-11
table.c
dlls/msi/table.c
+3
-3
No files found.
dlls/msi/msipriv.h
View file @
db334624
...
...
@@ -750,7 +750,7 @@ enum StringPersistence
StringNonPersistent
=
1
};
extern
BOOL
msi_add
stringW
(
string_table
*
st
,
const
WCHAR
*
data
,
int
len
,
USHORT
refcount
,
enum
StringPersistence
persistence
)
DECLSPEC_HIDDEN
;
extern
BOOL
msi_add
_string
(
string_table
*
st
,
const
WCHAR
*
data
,
int
len
,
enum
StringPersistence
persistence
)
DECLSPEC_HIDDEN
;
extern
UINT
msi_string2id
(
const
string_table
*
st
,
const
WCHAR
*
data
,
int
len
,
UINT
*
id
)
DECLSPEC_HIDDEN
;
extern
VOID
msi_destroy_stringtable
(
string_table
*
st
)
DECLSPEC_HIDDEN
;
extern
const
WCHAR
*
msi_string_lookup
(
const
string_table
*
st
,
UINT
id
,
int
*
len
)
DECLSPEC_HIDDEN
;
...
...
dlls/msi/storages.c
View file @
db334624
...
...
@@ -77,7 +77,7 @@ static STORAGE *create_storage(MSISTORAGESVIEW *sv, LPCWSTR name, IStorage *stg)
if
(
!
storage
)
return
NULL
;
storage
->
str_index
=
msi_add
stringW
(
sv
->
db
->
strings
,
name
,
-
1
,
1
,
StringNonPersistent
);
storage
->
str_index
=
msi_add
_string
(
sv
->
db
->
strings
,
name
,
-
1
,
StringNonPersistent
);
storage
->
storage
=
stg
;
if
(
storage
->
storage
)
...
...
dlls/msi/streams.c
View file @
db334624
...
...
@@ -83,7 +83,7 @@ static STREAM *create_stream(MSISTREAMSVIEW *sv, LPCWSTR name, BOOL encoded, ISt
name
=
decoded
;
}
stream
->
str_index
=
msi_add
stringW
(
sv
->
db
->
strings
,
name
,
-
1
,
1
,
StringNonPersistent
);
stream
->
str_index
=
msi_add
_string
(
sv
->
db
->
strings
,
name
,
-
1
,
StringNonPersistent
);
stream
->
stream
=
stm
;
return
stream
;
}
...
...
dlls/msi/string.c
View file @
db334624
...
...
@@ -231,7 +231,7 @@ static void set_st_entry( string_table *st, UINT n, WCHAR *str, int len, USHORT
st
->
freeslot
=
n
+
1
;
}
static
UINT
msi_string2idA
(
const
string_table
*
st
,
LPCSTR
buffer
,
UINT
*
id
)
static
UINT
string2id
(
const
string_table
*
st
,
const
char
*
buffer
,
UINT
*
id
)
{
DWORD
sz
;
UINT
r
=
ERROR_INVALID_PARAMETER
;
...
...
@@ -258,7 +258,7 @@ static UINT msi_string2idA( const string_table *st, LPCSTR buffer, UINT *id )
return
r
;
}
static
int
msi_add
string
(
string_table
*
st
,
UINT
n
,
const
char
*
data
,
UINT
len
,
USHORT
refcount
,
enum
StringPersistence
persistence
)
static
int
add_
string
(
string_table
*
st
,
UINT
n
,
const
char
*
data
,
UINT
len
,
USHORT
refcount
,
enum
StringPersistence
persistence
)
{
LPWSTR
str
;
int
sz
;
...
...
@@ -273,7 +273,7 @@ static int msi_addstring( string_table *st, UINT n, const char *data, UINT len,
}
else
{
if
(
ERROR_SUCCESS
==
msi_string2idA
(
st
,
data
,
&
n
)
)
if
(
string2id
(
st
,
data
,
&
n
)
==
ERROR_SUCCESS
)
{
if
(
persistence
==
StringPersistent
)
st
->
strings
[
n
].
persistent_refcount
+=
refcount
;
...
...
@@ -304,7 +304,7 @@ static int msi_addstring( string_table *st, UINT n, const char *data, UINT len,
return
n
;
}
int
msi_add
stringW
(
string_table
*
st
,
const
WCHAR
*
data
,
int
len
,
USHORT
refcount
,
enum
StringPersistence
persistence
)
int
msi_add
_string
(
string_table
*
st
,
const
WCHAR
*
data
,
int
len
,
enum
StringPersistence
persistence
)
{
UINT
n
;
LPWSTR
str
;
...
...
@@ -320,9 +320,9 @@ int msi_addstringW( string_table *st, const WCHAR *data, int len, USHORT refcoun
if
(
msi_string2id
(
st
,
data
,
len
,
&
n
)
==
ERROR_SUCCESS
)
{
if
(
persistence
==
StringPersistent
)
st
->
strings
[
n
].
persistent_refcount
+=
refcount
;
st
->
strings
[
n
].
persistent_refcount
++
;
else
st
->
strings
[
n
].
nonpersistent_refcount
+=
refcount
;
st
->
strings
[
n
].
nonpersistent_refcount
++
;
return
n
;
}
...
...
@@ -339,7 +339,7 @@ int msi_addstringW( string_table *st, const WCHAR *data, int len, USHORT refcoun
memcpy
(
str
,
data
,
len
*
sizeof
(
WCHAR
)
);
str
[
len
]
=
0
;
set_st_entry
(
st
,
n
,
str
,
len
,
refcount
,
persistence
);
set_st_entry
(
st
,
n
,
str
,
len
,
1
,
persistence
);
return
n
;
}
...
...
@@ -363,7 +363,7 @@ const WCHAR *msi_string_lookup( const string_table *st, UINT id, int *len )
}
/*
*
msi_id2stringA
*
id2string
*
* [in] st - pointer to the string table
* [in] id - id of the string to retrieve
...
...
@@ -373,7 +373,7 @@ const WCHAR *msi_string_lookup( const string_table *st, UINT id, int *len )
*
* Returned string is not nul terminated.
*/
static
UINT
msi_id2stringA
(
const
string_table
*
st
,
UINT
id
,
LPSTR
buffer
,
UINT
*
sz
)
static
UINT
id2string
(
const
string_table
*
st
,
UINT
id
,
char
*
buffer
,
UINT
*
sz
)
{
int
len
,
lenW
;
const
WCHAR
*
str
;
...
...
@@ -546,7 +546,7 @@ string_table *msi_load_string_table( IStorage *stg, UINT *bytes_per_strref )
break
;
}
r
=
msi_add
string
(
st
,
n
,
data
+
offset
,
len
,
refs
,
StringPersistent
);
r
=
add_
string
(
st
,
n
,
data
+
offset
,
len
,
refs
,
StringPersistent
);
if
(
r
!=
n
)
ERR
(
"Failed to add string %d
\n
"
,
n
);
n
++
;
...
...
@@ -616,7 +616,7 @@ UINT msi_save_string_table( const string_table *st, IStorage *storage, UINT *byt
}
sz
=
datasize
-
used
;
r
=
msi_id2stringA
(
st
,
i
,
data
+
used
,
&
sz
);
r
=
id2string
(
st
,
i
,
data
+
used
,
&
sz
);
if
(
r
!=
ERROR_SUCCESS
)
{
ERR
(
"failed to fetch string
\n
"
);
...
...
dlls/msi/table.c
View file @
db334624
...
...
@@ -760,8 +760,8 @@ UINT msi_create_table( MSIDATABASE *db, LPCWSTR name, column_info *col_info,
for
(
i
=
0
,
col
=
col_info
;
col
;
i
++
,
col
=
col
->
next
)
{
UINT
table_id
=
msi_add
stringW
(
db
->
strings
,
col
->
table
,
-
1
,
1
,
string_persistence
);
UINT
col_id
=
msi_add
stringW
(
db
->
strings
,
col
->
column
,
-
1
,
1
,
string_persistence
);
UINT
table_id
=
msi_add
_string
(
db
->
strings
,
col
->
table
,
-
1
,
string_persistence
);
UINT
col_id
=
msi_add
_string
(
db
->
strings
,
col
->
column
,
-
1
,
string_persistence
);
table
->
colinfo
[
i
].
tablename
=
msi_string_lookup
(
db
->
strings
,
table_id
,
NULL
);
table
->
colinfo
[
i
].
number
=
i
+
1
;
...
...
@@ -1369,7 +1369,7 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
{
int
len
;
const
WCHAR
*
sval
=
msi_record_get_string
(
rec
,
i
+
1
,
&
len
);
val
=
msi_add
stringW
(
tv
->
db
->
strings
,
sval
,
len
,
1
,
val
=
msi_add
_string
(
tv
->
db
->
strings
,
sval
,
len
,
persistent
?
StringPersistent
:
StringNonPersistent
);
}
else
...
...
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