Implemented msvcrt._mbspbrk.

This commit is contained in:
Mike McCormack 2001-08-10 22:24:54 +00:00 committed by Alexandre Julliard
parent 78a4134e51
commit 0dae258385
2 changed files with 21 additions and 1 deletions

View File

@ -650,3 +650,23 @@ char *_mbsrev(char *str)
return str;
}
/*********************************************************************
* _mbspbrk (MSVCRT.@)
*/
const char *_mbspbrk(const char *str, const char *accept)
{
const char *p;
while(*str)
{
for(p = accept; *p; p += (MSVCRT_isleadbyte(*p)?2:1) )
{
if (*p == *str)
if( !MSVCRT_isleadbyte(*p) || ( *(p+1) == *(str+1) ) )
return str;
}
str += (MSVCRT_isleadbyte(*str)?2:1);
}
return NULL;
}

View File

@ -383,7 +383,7 @@ debug_channels (msvcrt)
@ stub _mbsnicoll #(str str long)
@ cdecl _mbsninc(str long) _mbsninc
@ cdecl _mbsnset(str long long) _mbsnset
@ stub _mbspbrk #(str str)
@ cdecl _mbspbrk(str str) _mbspbrk
@ cdecl _mbsrchr(str long) _mbsrchr
@ cdecl _mbsrev(str) _mbsrev
@ cdecl _mbsset(str long) _mbsset