Add missed _mbscoll function.
This commit is contained in:
parent
9306cc527b
commit
442c253a01
|
@ -408,6 +408,34 @@ int _mbsicoll(const unsigned char* str, const unsigned char* cmp)
|
||||||
return u_strcasecmp(str, cmp); /* ASCII CP */
|
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.@)
|
* _mbsicmp(MSVCRT.@)
|
||||||
|
|
|
@ -349,7 +349,7 @@
|
||||||
@ cdecl _mbscat(str str) strcat
|
@ cdecl _mbscat(str str) strcat
|
||||||
@ cdecl _mbschr(str long)
|
@ cdecl _mbschr(str long)
|
||||||
@ cdecl _mbscmp(str str)
|
@ cdecl _mbscmp(str str)
|
||||||
@ stub _mbscoll #(str str)
|
@ cdecl _mbscoll(str str)
|
||||||
@ cdecl _mbscpy(ptr str) strcpy
|
@ cdecl _mbscpy(ptr str) strcpy
|
||||||
@ cdecl _mbscspn (str str)
|
@ cdecl _mbscspn (str str)
|
||||||
@ cdecl _mbsdec(ptr ptr)
|
@ cdecl _mbsdec(ptr ptr)
|
||||||
|
|
Loading…
Reference in New Issue