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
667fbe87
Commit
667fbe87
authored
Mar 31, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use wcspbrk() instead of strpbrkW().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6de0ab27
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
locale.c
dlls/ntdll/locale.c
+5
-5
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
No files found.
dlls/ntdll/locale.c
View file @
667fbe87
...
...
@@ -845,7 +845,7 @@ static LCID unix_locale_to_lcid( const char *unix_name )
if
(
len
==
ARRAY_SIZE
(
buffer
))
return
0
;
buffer
[
len
]
=
0
;
if
(
!
(
p
=
strpbrkW
(
buffer
,
sepW
)))
if
(
!
(
p
=
wcspbrk
(
buffer
,
sepW
)))
{
if
(
!
strcmpW
(
buffer
,
posixW
)
||
!
strcmpW
(
buffer
,
cW
))
return
MAKELCID
(
MAKELANGID
(
LANG_ENGLISH
,
SUBLANG_DEFAULT
),
SORT_DEFAULT
);
...
...
@@ -857,7 +857,7 @@ static LCID unix_locale_to_lcid( const char *unix_name )
{
*
p
++
=
0
;
country
=
p
;
p
=
strpbrkW
(
p
,
sepW
+
1
);
p
=
wcspbrk
(
p
,
sepW
+
1
);
}
if
(
p
&&
*
p
==
'.'
)
{
...
...
@@ -1674,16 +1674,16 @@ NTSTATUS WINAPI RtlLocaleNameToLcid( const WCHAR *name, LCID *lcid, ULONG flags
if
(
strlenW
(
name
)
>=
LOCALE_NAME_MAX_LENGTH
)
return
STATUS_INVALID_PARAMETER_1
;
wcscpy
(
lang
,
name
);
if
((
p
=
strpbrkW
(
lang
,
sepW
))
&&
*
p
==
'-'
)
if
((
p
=
wcspbrk
(
lang
,
sepW
))
&&
*
p
==
'-'
)
{
*
p
++
=
0
;
country
=
p
;
if
((
p
=
strpbrkW
(
p
,
sepW
))
&&
*
p
==
'-'
)
if
((
p
=
wcspbrk
(
p
,
sepW
))
&&
*
p
==
'-'
)
{
*
p
++
=
0
;
script
=
country
;
country
=
p
;
p
=
strpbrkW
(
p
,
sepW
);
p
=
wcspbrk
(
p
,
sepW
);
}
if
(
p
)
*
p
=
0
;
/* FIXME: modifier is ignored */
/* second value can be script or country, check length to resolve the ambiguity */
...
...
dlls/ntdll/ntdll_misc.h
View file @
667fbe87
...
...
@@ -305,6 +305,7 @@ int WINAPIV NTDLL_swprintf( WCHAR *str, const WCHAR *format, ... );
#define wcscpy(d,s) NTDLL_wcscpy(d,s)
#define wcscat(d,s) NTDLL_wcscat(d,s)
#define wcschr(s,c) NTDLL_wcschr(s,c)
#define wcspbrk(s,a) NTDLL_wcspbrk(s,a)
#define wcstoul(s,e,b) NTDLL_wcstoul(s,e,b)
/* convert from straight ASCII to Unicode without depending on the current codepage */
...
...
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