ReactOS  0.4.14-dev-115-g4576127
memchr.c
Go to the documentation of this file.
1 
2 #include <string.h>
3 
4 #if defined(_MSC_VER) && defined(_M_ARM)
5 #pragma function(memchr)
6 #endif /* _MSC_VER */
7 
8 void* __cdecl memchr(const void *s, int c, size_t n)
9 {
10  if (n)
11  {
12  const char *p = s;
13  do {
14  if (*p++ == c)
15  return (void *)(p-1);
16  } while (--n != 0);
17  }
18  return 0;
19 }
#define __cdecl
Definition: accygwin.h:79
GLdouble n
Definition: glext.h:7729
void *__cdecl memchr(const void *s, int c, size_t n)
Definition: memchr.c:8
const GLubyte * c
Definition: glext.h:8905
GLdouble s
Definition: gl.h:2039
GLfloat GLfloat p
Definition: glext.h:8902