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,26 @@
#include <stdlib.h>
#include <mbstring.h>
int isleadbyte(int byte);
/*
* not correct
*
* @implemented
*/
unsigned char * _mbspbrk(const unsigned char *s1, const unsigned char *s2)
{
const unsigned char* p;
while (*s1)
{
for (p = s2; *p; p += (isleadbyte(*p) ? 2 : 1))
{
if (*p == *s1)
if (!isleadbyte(*p) || (*(p+1) == *(s1 + 1)))
return (unsigned char*)s1;
}
s1 += (isleadbyte(*s1) ? 2 : 1);
}
return NULL;
}