Commit f48ea297 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Use _strnicmp instead of strncasecmp.

parent 462caf8f
......@@ -142,7 +142,7 @@ static int compare_info(LCID lcid, DWORD flags, char* buff, const char* cmp, BOO
if(exact || len<=3)
return !MSVCRT__stricmp(cmp, buff);
else
return !strncasecmp(cmp, buff, len);
return !MSVCRT__strnicmp(cmp, buff, len);
}
static BOOL CALLBACK
......
......@@ -133,7 +133,7 @@ static inline int u_strncmp( const unsigned char *s1, const unsigned char *s2, M
static inline int u_strncasecmp( const unsigned char *s1, const unsigned char *s2, MSVCRT_size_t len )
{
return strncasecmp( (const char*)s1, (const char*)s2, len );
return MSVCRT__strnicmp( (const char*)s1, (const char*)s2, len );
}
static inline unsigned char *u_strchr( const unsigned char *s, unsigned char x )
......
......@@ -694,7 +694,7 @@ int CDECL MSVCRT__strnicoll_l( const char* str1, const char* str2, MSVCRT_size_t
locinfo = locale->locinfo;
if(!locinfo->lc_handle[MSVCRT_LC_COLLATE])
return strncasecmp(str1, str2, count);
return MSVCRT__strnicmp(str1, str2, count);
return CompareStringA(locinfo->lc_handle[MSVCRT_LC_COLLATE], NORM_IGNORECASE,
str1, MSVCRT_strnlen(str1, count),
str2, MSVCRT_strnlen(str2, count))-CSTR_EQUAL;
......@@ -1960,7 +1960,6 @@ int __cdecl MSVCRT_strncmp(const char *str1, const char *str2, MSVCRT_size_t len
int __cdecl MSVCRT__strnicmp_l(const char *s1, const char *s2,
MSVCRT_size_t count, MSVCRT__locale_t locale)
{
MSVCRT_pthreadlocinfo locinfo;
int c1, c2;
if(s1==NULL || s2==NULL)
......@@ -1969,14 +1968,6 @@ int __cdecl MSVCRT__strnicmp_l(const char *s1, const char *s2,
if(!count)
return 0;
if(!locale)
locinfo = get_locinfo();
else
locinfo = locale->locinfo;
if(!locinfo->lc_handle[MSVCRT_LC_CTYPE])
return strncasecmp(s1, s2, count);
do {
c1 = MSVCRT__tolower_l(*s1++, locale);
c2 = MSVCRT__tolower_l(*s2++, locale);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment