Implemented _mbsnbicmp.
This commit is contained in:
parent
79313d371a
commit
7ccf8bc87d
|
@ -411,6 +411,51 @@ int _mbsnicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t
|
|||
return strncasecmp(str, cmp, len); /* ASCII CP */
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _mbsnbicmp(MSVCRT.@)
|
||||
*/
|
||||
int _mbsnbicmp(const unsigned char* str, const unsigned char* cmp, MSVCRT_size_t len)
|
||||
{
|
||||
if (!len)
|
||||
return 0;
|
||||
if(MSVCRT___mb_cur_max > 1)
|
||||
{
|
||||
unsigned int strc, cmpc;
|
||||
while (len)
|
||||
{
|
||||
int clen;
|
||||
if(!*str)
|
||||
return *cmp ? -1 : 0;
|
||||
if(!*cmp)
|
||||
return 1;
|
||||
if (MSVCRT_isleadbyte(*str))
|
||||
{
|
||||
strc=(len>=2)?_mbsnextc(str):0;
|
||||
clen=2;
|
||||
}
|
||||
else
|
||||
{
|
||||
strc=*str;
|
||||
clen=1;
|
||||
}
|
||||
if (MSVCRT_isleadbyte(*cmp))
|
||||
cmpc=(len>=2)?_mbsnextc(cmp):0;
|
||||
else
|
||||
cmpc=*str;
|
||||
strc = _mbctolower(strc);
|
||||
cmpc = _mbctolower(cmpc);
|
||||
if(strc != cmpc)
|
||||
return strc < cmpc ? -1 : 1;
|
||||
len -= clen;
|
||||
str += clen;
|
||||
cmp += clen;
|
||||
}
|
||||
return 0; /* Matched len bytes */
|
||||
FIXME("%s %s %d\n",str,cmp,len);
|
||||
}
|
||||
return strncmp(str,cmp,len);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _mbschr(MSVCRT.@)
|
||||
*
|
||||
|
|
|
@ -370,7 +370,7 @@ debug_channels (msvcrt)
|
|||
@ cdecl _mbsnbcnt(ptr long) _mbsnbcnt
|
||||
@ stub _mbsnbcoll #(str str long)
|
||||
@ cdecl _mbsnbcpy(ptr str long) _mbsnbcpy
|
||||
@ stub _mbsnbicmp #(str str long)
|
||||
@ cdecl _mbsnbicmp(str str long) _mbsnbicmp
|
||||
@ stub _mbsnbicoll #(str str long)
|
||||
@ stub _mbsnbset #(str long long)
|
||||
@ cdecl _mbsncat(str str long) _mbsncat
|
||||
|
|
Loading…
Reference in New Issue