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
60f34485
Commit
60f34485
authored
Jun 21, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Get rid of the last parameter to PROFILE_CopyEntry().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e4b2482e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
profile.c
dlls/kernel32/profile.c
+6
-7
No files found.
dlls/kernel32/profile.c
View file @
60f34485
...
...
@@ -101,14 +101,13 @@ static const char hex[16] = "0123456789ABCDEF";
* Copy the content of an entry into a buffer, removing quotes, and possibly
* translating environment variables.
*/
static
void
PROFILE_CopyEntry
(
LPWSTR
buffer
,
LPCWSTR
value
,
int
len
,
BOOL
strip_quote
)
static
void
PROFILE_CopyEntry
(
LPWSTR
buffer
,
LPCWSTR
value
,
int
len
)
{
WCHAR
quote
=
'\0'
;
if
(
!
buffer
)
return
;
if
(
strip_quote
&&
((
*
value
==
'\''
)
||
(
*
value
==
'\"'
))
)
if
(
*
value
==
'\''
||
*
value
==
'\"'
)
{
if
(
value
[
1
]
&&
(
value
[
strlenW
(
value
)
-
1
]
==
*
value
))
quote
=
*
value
++
;
}
...
...
@@ -877,14 +876,14 @@ static INT PROFILE_GetSection( PROFILESECTION *section, LPCWSTR section_name,
if
(
!*
key
->
name
&&
!
key
->
value
)
continue
;
/* Skip empty lines */
if
(
IS_ENTRY_COMMENT
(
key
->
name
))
continue
;
/* Skip comments */
if
(
!
return_values
&&
!
key
->
value
)
continue
;
/* Skip lines w.o. '=' */
PROFILE_CopyEntry
(
buffer
,
key
->
name
,
len
-
1
,
0
);
lstrcpynW
(
buffer
,
key
->
name
,
len
-
1
);
len
-=
strlenW
(
buffer
)
+
1
;
buffer
+=
strlenW
(
buffer
)
+
1
;
if
(
len
<
2
)
break
;
if
(
return_values
&&
key
->
value
)
{
buffer
[
-
1
]
=
'='
;
PROFILE_CopyEntry
(
buffer
,
key
->
value
,
len
-
1
,
0
);
lstrcpynW
(
buffer
,
key
->
value
,
len
-
1
);
len
-=
strlenW
(
buffer
)
+
1
;
buffer
+=
strlenW
(
buffer
)
+
1
;
}
...
...
@@ -1063,7 +1062,7 @@ INT WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
if
(
entry
)
{
PROFILEKEY
*
key
=
PROFILE_Find
(
&
CurProfile
->
section
,
section
,
entry
,
FALSE
,
FALSE
);
PROFILE_CopyEntry
(
buffer
,
(
key
&&
key
->
value
)
?
key
->
value
:
def_val
,
len
,
TRUE
);
PROFILE_CopyEntry
(
buffer
,
(
key
&&
key
->
value
)
?
key
->
value
:
def_val
,
len
);
TRACE
(
"-> %s
\n
"
,
debugstr_w
(
buffer
));
ret
=
strlenW
(
buffer
);
}
...
...
@@ -1072,7 +1071,7 @@ INT WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry,
ret
=
PROFILE_GetSection
(
CurProfile
->
section
,
section
,
buffer
,
len
,
FALSE
);
if
(
!
buffer
[
0
])
{
PROFILE_CopyEntry
(
buffer
,
def_val
,
len
,
TRUE
);
PROFILE_CopyEntry
(
buffer
,
def_val
,
len
);
ret
=
strlenW
(
buffer
);
}
}
...
...
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