ntdll: Use wcspbrk() instead of strpbrkW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6de0ab276b
commit
667fbe8791
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue