This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes

svn path=/branches/shell32_new-bringup/; revision=51893
This commit is contained in:
Ged Murphy 2011-05-24 18:40:34 +00:00
parent 4596e5e59b
commit 4019caae75
23116 changed files with 0 additions and 1109022 deletions

View file

@ -0,0 +1,35 @@
#include <mbstring.h>
/*
* @implemented
*/
size_t _mbsnccnt(const unsigned char *str, size_t n)
{
unsigned char *s = (unsigned char *)str;
size_t cnt = 0;
while(*s != 0 && n > 0) {
if (_ismbblead(*s) )
s++;
else
n--;
s++;
cnt++;
}
return cnt;
}
/*
* @implemented
*/
size_t _mbsnbcnt(const unsigned char *str, size_t n)
{
unsigned char *s = (unsigned char *)str;
while(*s != 0 && n > 0) {
if (!_ismbblead(*s) )
n--;
s++;
}
return (size_t)(s - str);
}