Create a branch for network fixes.

svn path=/branches/aicom-network-fixes/; revision=34994
This commit is contained in:
Art Yerkes 2008-08-01 11:32:26 +00:00
parent 0e213bbc00
commit c501d8112c
18148 changed files with 0 additions and 860488 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;
}