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
8f534055
Commit
8f534055
authored
Apr 19, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Remove the string index parameter from msi_addstringW.
parent
fc15e565
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
30 deletions
+15
-30
msipriv.h
dlls/msi/msipriv.h
+1
-2
storages.c
dlls/msi/storages.c
+1
-1
streams.c
dlls/msi/streams.c
+1
-1
string.c
dlls/msi/string.c
+11
-25
table.c
dlls/msi/table.c
+1
-1
No files found.
dlls/msi/msipriv.h
View file @
8f534055
...
...
@@ -660,8 +660,7 @@ enum StringPersistence
StringNonPersistent
=
1
};
extern
BOOL
msi_addstringW
(
string_table
*
st
,
UINT
string_no
,
const
WCHAR
*
data
,
int
len
,
USHORT
refcount
,
enum
StringPersistence
persistence
);
extern
BOOL
msi_addstringW
(
string_table
*
st
,
const
WCHAR
*
data
,
int
len
,
USHORT
refcount
,
enum
StringPersistence
persistence
);
extern
UINT
msi_string2idW
(
const
string_table
*
st
,
LPCWSTR
buffer
,
UINT
*
id
);
extern
VOID
msi_destroy_stringtable
(
string_table
*
st
);
extern
const
WCHAR
*
msi_string_lookup_id
(
const
string_table
*
st
,
UINT
id
);
...
...
dlls/msi/storages.c
View file @
8f534055
...
...
@@ -77,7 +77,7 @@ static STORAGE *create_storage(MSISTORAGESVIEW *sv, LPCWSTR name, IStorage *stg)
if
(
!
storage
)
return
NULL
;
storage
->
str_index
=
msi_addstringW
(
sv
->
db
->
strings
,
0
,
name
,
-
1
,
1
,
StringNonPersistent
);
storage
->
str_index
=
msi_addstringW
(
sv
->
db
->
strings
,
name
,
-
1
,
1
,
StringNonPersistent
);
storage
->
storage
=
stg
;
if
(
storage
->
storage
)
...
...
dlls/msi/streams.c
View file @
8f534055
...
...
@@ -84,7 +84,7 @@ static STREAM *create_stream(MSISTREAMSVIEW *sv, LPCWSTR name, BOOL encoded, ISt
name
=
decoded
;
}
stream
->
str_index
=
msi_addstringW
(
sv
->
db
->
strings
,
0
,
name
,
-
1
,
1
,
StringNonPersistent
);
stream
->
str_index
=
msi_addstringW
(
sv
->
db
->
strings
,
name
,
-
1
,
1
,
StringNonPersistent
);
stream
->
stream
=
stm
;
return
stream
;
}
...
...
dlls/msi/string.c
View file @
8f534055
...
...
@@ -288,42 +288,28 @@ static int msi_addstring( string_table *st, UINT n, const CHAR *data, int len, U
return
n
;
}
int
msi_addstringW
(
string_table
*
st
,
UINT
n
,
const
WCHAR
*
data
,
int
len
,
USHORT
refcount
,
enum
StringPersistence
persistence
)
int
msi_addstringW
(
string_table
*
st
,
const
WCHAR
*
data
,
int
len
,
USHORT
refcount
,
enum
StringPersistence
persistence
)
{
UINT
n
;
LPWSTR
str
;
/* TRACE("[%2d] = %s\n", string_no, debugstr_an(data,len) ); */
if
(
!
data
)
return
0
;
if
(
!
data
[
0
]
)
return
0
;
if
(
n
>
0
)
{
if
(
st
->
strings
[
n
].
persistent_refcount
||
st
->
strings
[
n
].
nonpersistent_refcount
)
return
-
1
;
}
else
if
(
msi_string2idW
(
st
,
data
,
&
n
)
==
ERROR_SUCCESS
)
{
if
(
ERROR_SUCCESS
==
msi_string2idW
(
st
,
data
,
&
n
)
)
{
if
(
persistence
==
StringPersistent
)
st
->
strings
[
n
].
persistent_refcount
+=
refcount
;
else
st
->
strings
[
n
].
nonpersistent_refcount
+=
refcount
;
return
n
;
}
n
=
st_find_free_entry
(
st
);
if
(
n
==
-
1
)
return
-
1
;
if
(
persistence
==
StringPersistent
)
st
->
strings
[
n
].
persistent_refcount
+=
refcount
;
else
st
->
strings
[
n
].
nonpersistent_refcount
+=
refcount
;
return
n
;
}
if
(
n
<
1
)
{
ERR
(
"invalid index adding %s (%d)
\n
"
,
debugstr_w
(
data
),
n
);
n
=
st_find_free_entry
(
st
);
if
(
n
==
-
1
)
return
-
1
;
}
/* allocate a new string */
if
(
len
<
0
)
...
...
dlls/msi/table.c
View file @
8f534055
...
...
@@ -1383,7 +1383,7 @@ static UINT TABLE_set_row( struct tagMSIVIEW *view, UINT row, MSIRECORD *rec, UI
if
(
r
!=
ERROR_SUCCESS
)
{
LPCWSTR
sval
=
MSI_RecordGetString
(
rec
,
i
+
1
);
val
=
msi_addstringW
(
tv
->
db
->
strings
,
0
,
sval
,
-
1
,
1
,
val
=
msi_addstringW
(
tv
->
db
->
strings
,
sval
,
-
1
,
1
,
persistent
?
StringPersistent
:
StringNonPersistent
);
}
...
...
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