Commit 442c253a authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Alexandre Julliard

Add missed _mbscoll function.

parent 9306cc52
......@@ -408,6 +408,34 @@ int _mbsicoll(const unsigned char* str, const unsigned char* cmp)
return u_strcasecmp(str, cmp); /* ASCII CP */
}
/*********************************************************************
* _mbscoll(MSVCRT.@)
* Performs a case-sensitive comparison according to the current code page
* RETURN
* _NLSCMPERROR if error
* FIXME: handle locales.
*/
int _mbscoll(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 = _mbsnextc(str);
cmpc = _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 u_strcmp(str, cmp); /* ASCII CP */
}
/*********************************************************************
* _mbsicmp(MSVCRT.@)
......
......@@ -349,7 +349,7 @@
@ cdecl _mbscat(str str) strcat
@ cdecl _mbschr(str long)
@ cdecl _mbscmp(str str)
@ stub _mbscoll #(str str)
@ cdecl _mbscoll(str str)
@ cdecl _mbscpy(ptr str) strcpy
@ cdecl _mbscspn (str str)
@ cdecl _mbsdec(ptr ptr)
......
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