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
72b9acd9
Commit
72b9acd9
authored
Jan 24, 2017
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Don't care about case when finding matching locale.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3da1616e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
locale.c
dlls/kernel32/locale.c
+3
-3
locale.c
dlls/kernel32/tests/locale.c
+5
-0
No files found.
dlls/kernel32/locale.c
View file @
72b9acd9
...
...
@@ -390,7 +390,7 @@ static BOOL CALLBACK find_locale_id_callback( HMODULE hModule, LPCWSTR type,
GetLocaleInfoW
(
lcid
,
LOCALE_SNAME
|
LOCALE_NOUSEROVERRIDE
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
))
{
if
(
!
strcmpW
(
data
->
win_name
,
buffer
))
if
(
!
strcmp
i
W
(
data
->
win_name
,
buffer
))
{
matches
=
4
;
/* everything matches */
goto
done
;
...
...
@@ -400,7 +400,7 @@ static BOOL CALLBACK find_locale_id_callback( HMODULE hModule, LPCWSTR type,
if
(
!
GetLocaleInfoW
(
lcid
,
LOCALE_SISO639LANGNAME
|
LOCALE_NOUSEROVERRIDE
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
))
return
TRUE
;
if
(
strcmpW
(
buffer
,
data
->
lang
))
return
TRUE
;
if
(
strcmp
i
W
(
buffer
,
data
->
lang
))
return
TRUE
;
matches
++
;
/* language name matched */
if
(
data
->
country
)
...
...
@@ -408,7 +408,7 @@ static BOOL CALLBACK find_locale_id_callback( HMODULE hModule, LPCWSTR type,
if
(
GetLocaleInfoW
(
lcid
,
LOCALE_SISO3166CTRYNAME
|
LOCALE_NOUSEROVERRIDE
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
))
{
if
(
strcmpW
(
buffer
,
data
->
country
))
goto
done
;
if
(
strcmp
i
W
(
buffer
,
data
->
country
))
goto
done
;
matches
++
;
/* country name matched */
}
}
...
...
dlls/kernel32/tests/locale.c
View file @
72b9acd9
...
...
@@ -2704,6 +2704,7 @@ static void test_LocaleNameToLCID(void)
INT
ret
;
WCHAR
buffer
[
LOCALE_NAME_MAX_LENGTH
];
static
const
WCHAR
enW
[]
=
{
'e'
,
'n'
,
0
};
static
const
WCHAR
esesW
[]
=
{
'e'
,
's'
,
'-'
,
'e'
,
's'
,
0
};
if
(
!
pLocaleNameToLCID
)
{
...
...
@@ -2744,6 +2745,10 @@ static void test_LocaleNameToLCID(void)
ok
(
!
lcid
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected lcid == 0, got %08x, error %d
\n
"
,
lcid
,
GetLastError
());
/* lower-case */
lcid
=
pLocaleNameToLCID
(
esesW
,
0
);
ok
(
lcid
==
MAKELCID
(
MAKELANGID
(
LANG_SPANISH
,
SUBLANG_SPANISH_MODERN
),
SORT_DEFAULT
),
"Got wrong lcid for es-es: 0x%x
\n
"
,
lcid
);
/* english neutral name */
lcid
=
pLocaleNameToLCID
(
enW
,
0
);
ok
(
lcid
==
MAKELCID
(
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_ENGLISH_US
),
SORT_DEFAULT
)
||
...
...
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