mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:36:11 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
26
sdk/lib/crt/mbstring/mbspbrk.c
Normal file
26
sdk/lib/crt/mbstring/mbspbrk.c
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue