msvcrt: Use _stricmp instead of strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3f675c1a9d
commit
462caf8fbd
|
@ -97,7 +97,7 @@ static void remap_synonym(char *name)
|
|||
unsigned int i;
|
||||
for (i = 0; i < ARRAY_SIZE(_country_synonyms); i += 2)
|
||||
{
|
||||
if (!strcasecmp(_country_synonyms[i],name))
|
||||
if (!MSVCRT__stricmp(_country_synonyms[i],name))
|
||||
{
|
||||
TRACE(":Mapping synonym %s to %s\n",name,_country_synonyms[i+1]);
|
||||
strcpy(name, _country_synonyms[i+1]);
|
||||
|
@ -140,7 +140,7 @@ static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp, BOO
|
|||
/* Partial matches are only allowed on language/country names */
|
||||
len = strlen(cmp);
|
||||
if(exact || len<=3)
|
||||
return !strcasecmp(cmp, buff);
|
||||
return !MSVCRT__stricmp(cmp, buff);
|
||||
else
|
||||
return !strncasecmp(cmp, buff, len);
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s
|
|||
if(!search.search_country[0] && !search.search_codepage[0])
|
||||
remap_synonym(search.search_language);
|
||||
|
||||
if(!strcasecmp(search.search_country, "China"))
|
||||
if(!MSVCRT__stricmp(search.search_country, "China"))
|
||||
strcpy(search.search_country, "People's Republic of China");
|
||||
|
||||
EnumResourceLanguagesA(GetModuleHandleA("KERNEL32"), (LPSTR)RT_STRING,
|
||||
|
@ -291,10 +291,10 @@ LCID MSVCRT_locale_to_LCID(const char *locale, unsigned short *codepage, BOOL *s
|
|||
memcpy(search.found_codepage,search.search_codepage,MAX_ELEM_LEN);
|
||||
else {
|
||||
/* Special codepage values: OEM & ANSI */
|
||||
if (!strcasecmp(search.search_codepage,"OCP")) {
|
||||
if (!MSVCRT__stricmp(search.search_codepage,"OCP")) {
|
||||
GetLocaleInfoA(lcid, LOCALE_IDEFAULTCODEPAGE,
|
||||
search.found_codepage, MAX_ELEM_LEN);
|
||||
} else if (!strcasecmp(search.search_codepage,"ACP")) {
|
||||
} else if (!MSVCRT__stricmp(search.search_codepage,"ACP")) {
|
||||
GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE,
|
||||
search.found_codepage, MAX_ELEM_LEN);
|
||||
} else
|
||||
|
|
|
@ -123,7 +123,7 @@ static inline int u_strcmp( const unsigned char *s1, const unsigned char *s2 )
|
|||
|
||||
static inline int u_strcasecmp( const unsigned char *s1, const unsigned char *s2 )
|
||||
{
|
||||
return strcasecmp( (const char*)s1, (const char*)s2 );
|
||||
return MSVCRT__stricmp( (const char*)s1, (const char*)s2 );
|
||||
}
|
||||
|
||||
static inline int u_strncmp( const unsigned char *s1, const unsigned char *s2, MSVCRT_size_t len )
|
||||
|
|
|
@ -1148,6 +1148,7 @@ int __cdecl MSVCRT__toupper_l(int,MSVCRT__locale_t);
|
|||
int __cdecl MSVCRT__tolower_l(int,MSVCRT__locale_t);
|
||||
int __cdecl MSVCRT__towupper_l(MSVCRT_wint_t,MSVCRT__locale_t);
|
||||
int __cdecl MSVCRT__towlower_l(MSVCRT_wint_t,MSVCRT__locale_t);
|
||||
int __cdecl MSVCRT__stricmp(const char*, const char*);
|
||||
int __cdecl MSVCRT__strnicmp(const char*, const char*, MSVCRT_size_t);
|
||||
int __cdecl MSVCRT__strnicoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
|
||||
int __cdecl MSVCRT__strncoll_l(const char*, const char*, MSVCRT_size_t, MSVCRT__locale_t);
|
||||
|
|
|
@ -641,7 +641,7 @@ int CDECL MSVCRT__stricoll_l( const char* str1, const char* str2, MSVCRT__locale
|
|||
locinfo = locale->locinfo;
|
||||
|
||||
if(!locinfo->lc_handle[MSVCRT_LC_COLLATE])
|
||||
return strcasecmp(str1, str2);
|
||||
return MSVCRT__stricmp(str1, str2);
|
||||
return CompareStringA(locinfo->lc_handle[MSVCRT_LC_COLLATE], NORM_IGNORECASE,
|
||||
str1, -1, str2, -1)-CSTR_EQUAL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue