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
fc52a848
Commit
fc52a848
authored
Apr 18, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Apr 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Add the ability to set multiple keys on one line in set_ldid.
parent
b2a3ffd8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
5 deletions
+38
-5
advpack.c
dlls/advpack/advpack.c
+38
-5
No files found.
dlls/advpack/advpack.c
View file @
fc52a848
...
...
@@ -95,7 +95,7 @@ static void get_dest_dir(HINF hInf, PCWSTR pszSection, PWSTR pszBuffer, DWORD dw
static
void
set_ldids
(
HINF
hInf
,
LPCWSTR
pszInstallSection
)
{
WCHAR
field
[
MAX_FIELD_LENGTH
];
WCHAR
key
[
MAX_FIELD_LENGTH
];
WCHAR
line
[
MAX_FIELD_LENGTH
];
WCHAR
dest
[
MAX_PATH
];
INFCONTEXT
context
;
DWORD
size
;
...
...
@@ -114,13 +114,46 @@ static void set_ldids(HINF hInf, LPCWSTR pszInstallSection)
do
{
SetupGetIntField
(
&
context
,
0
,
&
ldid
);
LPWSTR
value
,
ptr
,
key
,
key_copy
=
NULL
;
SetupGetLineTextW
(
&
context
,
NULL
,
NULL
,
NULL
,
key
,
MAX_FIELD_LENGTH
,
&
size
);
line
,
MAX_FIELD_LENGTH
,
&
size
);
/* SetupGetLineTextW returns the value if there is only one key, but
* returns the whole line if there is more than one key
*/
if
(
!
(
value
=
strchrW
(
line
,
'='
)))
{
SetupGetStringFieldW
(
&
context
,
0
,
NULL
,
0
,
&
size
);
key
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
key_copy
=
key
;
SetupGetStringFieldW
(
&
context
,
0
,
key
,
size
,
&
size
);
value
=
line
;
}
else
{
key
=
line
;
*
(
value
++
)
=
'\0'
;
}
/* remove leading whitespace from the value */
while
(
*
value
==
' '
)
value
++
;
/* FIXME: need to check the query option */
ptr
=
strchrW
(
value
,
','
);
if
(
ptr
)
*
ptr
=
'\0'
;
get_dest_dir
(
hInf
,
key
,
dest
,
MAX_PATH
);
get_dest_dir
(
hInf
,
value
,
dest
,
MAX_PATH
);
SetupSetDirectoryIdW
(
hInf
,
ldid
,
dest
);
/* set all ldids to dest */
while
((
ptr
=
get_parameter
(
&
key
,
','
)))
{
ldid
=
atolW
(
ptr
);
SetupSetDirectoryIdW
(
hInf
,
ldid
,
dest
);
}
HeapFree
(
GetProcessHeap
(),
0
,
key_copy
);
}
while
(
SetupFindNextLine
(
&
context
,
&
context
));
}
...
...
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