Commit af39862f authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Implemented mbsicoll (without locale handling).

parent c1a4cead
......@@ -307,6 +307,32 @@ int _mbscmp(const unsigned char* str, const unsigned char* cmp)
}
/*********************************************************************
* _mbsicoll(MSVCRT.@)
* FIXME: handle locales.
*/
int _mbsicoll(const unsigned char* str, const unsigned char* cmp)
{
if(MSVCRT___mb_cur_max > 1)
{
unsigned int strc, cmpc;
do {
if(!*str)
return *cmp ? -1 : 0;
if(!*cmp)
return 1;
strc = _mbctolower(_mbsnextc(str));
cmpc = _mbctolower(_mbsnextc(cmp));
if(strc != cmpc)
return strc < cmpc ? -1 : 1;
str +=(strc > 255) ? 2 : 1;
cmp +=(strc > 255) ? 2 : 1; /* equal, use same increment */
} while(1);
}
return strcasecmp(str, cmp); /* ASCII CP */
}
/*********************************************************************
* _mbsicmp(MSVCRT.@)
*/
int _mbsicmp(const unsigned char* str, const unsigned char* cmp)
......
......@@ -355,7 +355,7 @@
@ cdecl _mbsdec(ptr ptr) _mbsdec
@ cdecl _mbsdup(str) _strdup
@ cdecl _mbsicmp(str str) _mbsicmp
@ stub _mbsicoll #(str str)
@ cdecl _mbsicoll(str str) _mbsicoll
@ cdecl _mbsinc(str) _mbsinc
@ cdecl _mbslen(str) _mbslen
@ cdecl _mbslwr(str) _mbslwr
......
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