Commit 2378305c authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Implemented mbsnbcnt, added stubs for _Gettnames and __lc_collate_cp.

parent 91fc3572
...@@ -446,6 +446,7 @@ unsigned char* _mbschr(const unsigned char* str, unsigned int c) ...@@ -446,6 +446,7 @@ unsigned char* _mbschr(const unsigned char* str, unsigned int c)
/********************************************************************* /*********************************************************************
* _mbsnccnt(MSVCRT.@) * _mbsnccnt(MSVCRT.@)
* 'c' is for 'character'.
*/ */
unsigned int _mbsnccnt(const unsigned char *str, unsigned int len) unsigned int _mbsnccnt(const unsigned char *str, unsigned int len)
{ {
...@@ -468,6 +469,30 @@ unsigned int _mbsnccnt(const unsigned char *str, unsigned int len) ...@@ -468,6 +469,30 @@ unsigned int _mbsnccnt(const unsigned char *str, unsigned int len)
return min(strlen(str), len); /* ASCII CP */ return min(strlen(str), len); /* ASCII CP */
} }
/*********************************************************************
* _mbsnbcnt(MSVCRT.@)
* 'b' is for byte count.
*/
unsigned int _mbsnbcnt(const unsigned char *str, unsigned int len)
{
const unsigned char *xstr = str;
if(MSVCRT___mb_cur_max > 1)
{
while(*xstr && len-- > 0)
{
if(MSVCRT_isleadbyte(*xstr))
{
xstr++;
len--;
}
xstr++;
}
return xstr-str;
}
return min(strlen(str), len); /* ASCII CP */
}
/********************************************************************* /*********************************************************************
* _mbsncat(MSVCRT.@) * _mbsncat(MSVCRT.@)
......
...@@ -367,7 +367,7 @@ debug_channels (msvcrt) ...@@ -367,7 +367,7 @@ debug_channels (msvcrt)
@ cdecl _mbslwr(str) _mbslwr @ cdecl _mbslwr(str) _mbslwr
@ stub _mbsnbcat #(str str long) @ stub _mbsnbcat #(str str long)
@ cdecl _mbsnbcmp(str str long) _mbsnbcmp @ cdecl _mbsnbcmp(str str long) _mbsnbcmp
@ stub _mbsnbcnt #(ptr long) @ cdecl _mbsnbcnt(ptr long) _mbsnbcnt
@ stub _mbsnbcoll #(str str long) @ stub _mbsnbcoll #(str str long)
@ cdecl _mbsnbcpy(ptr str long) _mbsnbcpy @ cdecl _mbsnbcpy(ptr str long) _mbsnbcpy
@ stub _mbsnbicmp #(str str long) @ stub _mbsnbicmp #(str str long)
...@@ -768,3 +768,5 @@ debug_channels (msvcrt) ...@@ -768,3 +768,5 @@ debug_channels (msvcrt)
@ cdecl wctomb(ptr long) MSVCRT_wctomb @ cdecl wctomb(ptr long) MSVCRT_wctomb
@ varargs wprintf(wstr) MSVCRT_wprintf @ varargs wprintf(wstr) MSVCRT_wprintf
@ stub wscanf #(wstr) varargs @ stub wscanf #(wstr) varargs
@ stub _Gettnames
@ stub __lc_collate_cp
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