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
60c56244
Commit
60c56244
authored
Oct 12, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Get rid of the NLS_RegOpenSubKey function, its behavior is broken.
parent
997bb894
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
22 deletions
+23
-22
locale.c
dlls/kernel32/locale.c
+23
-22
No files found.
dlls/kernel32/locale.c
View file @
60c56244
...
...
@@ -62,7 +62,6 @@ static const union cptable *mac_cptable;
static
const
union
cptable
*
unix_cptable
;
/* NULL if UTF8 */
static
HANDLE
NLS_RegOpenKey
(
HANDLE
hRootKey
,
LPCWSTR
szKeyName
);
static
HANDLE
NLS_RegOpenSubKey
(
HANDLE
hRootKey
,
LPCWSTR
szKeyName
);
static
const
WCHAR
szNlsKeyName
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
...
...
@@ -70,6 +69,25 @@ static const WCHAR szNlsKeyName[] = {
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'N'
,
'l'
,
's'
,
'\0'
};
static
const
WCHAR
szLocaleKeyName
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'N'
,
'l'
,
's'
,
'\\'
,
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
szCodepageKeyName
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'N'
,
'l'
,
's'
,
'\\'
,
'C'
,
'o'
,
'd'
,
'e'
,
'p'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
szLangGroupsKeyName
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'N'
,
'l'
,
's'
,
'\\'
,
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
' '
,
'G'
,
'r'
,
'o'
,
'u'
,
'p'
,
's'
,
0
};
/* Charset to codepage map, sorted by name. */
static
const
struct
charset_entry
{
...
...
@@ -630,7 +648,6 @@ static BOOL locale_update_registry( HKEY hkey, const WCHAR *name, LCID lcid,
*/
void
LOCALE_InitRegistry
(
void
)
{
static
const
WCHAR
CodepageW
[]
=
{
'C'
,
'o'
,
'd'
,
'e'
,
'p'
,
'a'
,
'g'
,
'e'
,
0
};
static
const
WCHAR
acpW
[]
=
{
'A'
,
'C'
,
'P'
,
0
};
static
const
WCHAR
oemcpW
[]
=
{
'O'
,
'E'
,
'M'
,
'C'
,
'P'
,
0
};
static
const
WCHAR
maccpW
[]
=
{
'M'
,
'A'
,
'C'
,
'C'
,
'P'
,
0
};
...
...
@@ -720,7 +737,7 @@ void LOCALE_InitRegistry(void)
if
(
locale_update_registry
(
hkey
,
lc_ctypeW
,
lcid_LC_CTYPE
,
NULL
,
0
))
{
HKEY
nls_key
=
NLS_RegOpen
SubKey
(
NLS_RegOpenKey
(
0
,
szNlsKeyName
),
CodepageW
);
HKEY
nls_key
=
NLS_RegOpen
Key
(
0
,
szCodepageKeyName
);
for
(
i
=
0
;
i
<
sizeof
(
update_cp_values
)
/
sizeof
(
update_cp_values
[
0
]);
i
++
)
{
...
...
@@ -2928,16 +2945,6 @@ static HANDLE NLS_RegOpenKey(HANDLE hRootKey, LPCWSTR szKeyName)
return
hkey
;
}
static
HANDLE
NLS_RegOpenSubKey
(
HANDLE
hRootKey
,
LPCWSTR
szKeyName
)
{
HANDLE
hKey
=
NLS_RegOpenKey
(
hRootKey
,
szKeyName
);
if
(
hRootKey
)
NtClose
(
hRootKey
);
return
hKey
;
}
static
BOOL
NLS_RegEnumSubKey
(
HANDLE
hKey
,
UINT
ulIndex
,
LPWSTR
szKeyName
,
ULONG
keyNameSize
)
{
...
...
@@ -3051,9 +3058,6 @@ static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSiz
}
/* Registry keys for NLS related information */
static
const
WCHAR
szLangGroupsKeyName
[]
=
{
'L'
,
'a'
,
'n'
,
'g'
,
'u'
,
'a'
,
'g'
,
'e'
,
' '
,
'G'
,
'r'
,
'o'
,
'u'
,
'p'
,
's'
,
'\0'
};
static
const
WCHAR
szCountryListName
[]
=
{
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
...
...
@@ -3101,7 +3105,7 @@ static BOOL NLS_EnumSystemLanguageGroups(ENUMLANGUAGEGROUP_CALLBACKS *lpProcs)
return
FALSE
;
}
hKey
=
NLS_RegOpen
SubKey
(
NLS_RegOpenKey
(
0
,
szNlsKeyName
)
,
szLangGroupsKeyName
);
hKey
=
NLS_RegOpen
Key
(
0
,
szLangGroupsKeyName
);
if
(
!
hKey
)
FIXME
(
"NLS registry key not found. Please apply the default registry file 'wine.inf'
\n
"
);
...
...
@@ -3234,7 +3238,7 @@ BOOL WINAPI IsValidLanguageGroup(LGRPID lgrpid, DWORD dwFlags)
case
LGRPID_INSTALLED
:
case
LGRPID_SUPPORTED
:
hKey
=
NLS_RegOpen
SubKey
(
NLS_RegOpenKey
(
0
,
szNlsKeyName
)
,
szLangGroupsKeyName
);
hKey
=
NLS_RegOpen
Key
(
0
,
szLangGroupsKeyName
);
sprintfW
(
szValueName
,
szFormat
,
lgrpid
);
...
...
@@ -3272,9 +3276,6 @@ typedef struct
/* Internal implementation of EnumLanguageGrouplocalesA/W */
static
BOOL
NLS_EnumLanguageGroupLocales
(
ENUMLANGUAGEGROUPLOCALE_CALLBACKS
*
lpProcs
)
{
static
const
WCHAR
szLocaleKeyName
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
'l'
,
'e'
,
'\0'
};
static
const
WCHAR
szAlternateSortsKeyName
[]
=
{
'A'
,
'l'
,
't'
,
'e'
,
'r'
,
'n'
,
'a'
,
't'
,
'e'
,
' '
,
'S'
,
'o'
,
'r'
,
't'
,
's'
,
'\0'
};
...
...
@@ -3296,7 +3297,7 @@ static BOOL NLS_EnumLanguageGroupLocales(ENUMLANGUAGEGROUPLOCALE_CALLBACKS *lpPr
return
FALSE
;
}
hKey
=
NLS_RegOpen
SubKey
(
NLS_RegOpenKey
(
0
,
szNlsKeyName
)
,
szLocaleKeyName
);
hKey
=
NLS_RegOpen
Key
(
0
,
szLocaleKeyName
);
if
(
!
hKey
)
WARN
(
"NLS registry key not found. Please apply the default registry file 'wine.inf'
\n
"
);
...
...
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