mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 05:22:56 +00:00
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:
parent
4596e5e59b
commit
4019caae75
23116 changed files with 0 additions and 1109022 deletions
26
lib/sdk/crt/mbstring/mbspbrk.c
Normal file
26
lib/sdk/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