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
f89722db
Commit
f89722db
authored
Jul 20, 2001
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jul 20, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 'undocumented' behaviour of GetPrivateProfileString.
parent
a5f510f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
profile.c
files/profile.c
+7
-5
No files found.
files/profile.c
View file @
f89722db
...
...
@@ -1154,13 +1154,15 @@ UINT WINAPI GetProfileIntW( LPCWSTR section, LPCWSTR entry, INT def_val )
}
/*
* undoc_feature means:
* return section names string list if both section and entry are NULL.
* if allow_section_name_copy is TRUE, allow the copying :
* - of Section names if 'section' is NULL
* - of Keys in a Section if 'entry' is NULL
* (see MSDN doc for GetPrivateProfileString)
*/
static
int
PROFILE_GetPrivateProfileString
(
LPCSTR
section
,
LPCSTR
entry
,
LPCSTR
def_val
,
LPSTR
buffer
,
UINT16
len
,
LPCSTR
filename
,
BOOL
undoc_feature
)
BOOL
allow_section_name_copy
)
{
int
ret
;
LPSTR
pDefVal
=
NULL
;
...
...
@@ -1193,10 +1195,10 @@ static int PROFILE_GetPrivateProfileString( LPCSTR section, LPCSTR entry,
EnterCriticalSection
(
&
PROFILE_CritSect
);
if
(
PROFILE_Open
(
filename
))
{
if
((
undoc_feature
)
&&
(
section
==
NULL
)
&&
(
entry
==
NULL
))
/* undocumented; both section and entry are NULL */
if
((
allow_section_name_copy
)
&&
(
section
==
NULL
))
ret
=
PROFILE_GetSectionNames
(
buffer
,
len
);
else
/* PROFILE_GetString already handles the 'entry == NULL' case */
ret
=
PROFILE_GetString
(
section
,
entry
,
pDefVal
,
buffer
,
len
);
}
else
{
lstrcpynA
(
buffer
,
pDefVal
,
len
);
...
...
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