ReactOS 0.4.15-dev-8100-g1887773
strtok.c
Go to the documentation of this file.
1/* Taken from Wine Staging msvcrt/string.c */
2
3#include <precomp.h>
5
6/*********************************************************************
7 * strtok (MSVCRT.@)
8 */
9char * CDECL strtok( char *str, const char *delim )
10{
12 char *ret;
13
14 if (!str)
15 if (!(str = data->strtok_next)) return NULL;
16
17 while (*str && strchr( delim, *str )) str++;
18 if (!*str) return NULL;
19 ret = str++;
20 while (*str && !strchr( delim, *str )) str++;
21 if (*str) *str++ = 0;
22 data->strtok_next = str;
23 return ret;
24}
char * strchr(const char *String, int ch)
Definition: utclib.c:501
#define NULL
Definition: types.h:112
#define CDECL
Definition: compat.h:29
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
thread_data_t * msvcrt_get_thread_data(void)
Definition: tls.c:31
const WCHAR * str
char *CDECL strtok(char *str, const char *delim)
Definition: strtok.c:9
int ret