ReactOS  0.4.13-dev-563-g0561610
mbspbrk.c File Reference
#include <stdlib.h>
#include <mbstring.h>
Include dependency graph for mbspbrk.c:

Go to the source code of this file.

Functions

int isleadbyte (int byte)
 
unsigned char_mbspbrk (const unsigned char *s1, const unsigned char *s2)
 

Function Documentation

◆ _mbspbrk()

unsigned char* _mbspbrk ( const unsigned char s1,
const unsigned char s2 
)

Definition at line 11 of file mbspbrk.c.

12 {
13  const unsigned char* p;
14 
15  while (*s1)
16  {
17  for (p = s2; *p; p += (isleadbyte(*p) ? 2 : 1))
18  {
19  if (*p == *s1)
20  if (!isleadbyte(*p) || (*(p+1) == *(s1 + 1)))
21  return (unsigned char*)s1;
22  }
23  s1 += (isleadbyte(*s1) ? 2 : 1);
24  }
25  return NULL;
26 }
struct S2 s2
smooth NULL
Definition: ftsmooth.c:416
struct S1 s1
int isleadbyte(int byte)
Definition: islead.c:7
GLfloat GLfloat p
Definition: glext.h:8902

◆ isleadbyte()

int isleadbyte ( int  byte)

Definition at line 7 of file islead.c.

8 {
9  return _isctype( c, _LEADBYTE );
10 
11 }
#define _LEADBYTE
Definition: ctype.h:75
const GLubyte * c
Definition: glext.h:8905
_Check_return_ _CRTIMP int __cdecl _isctype(_In_ int _C, _In_ int _Type)

Referenced by _mbspbrk().