PatchworkOS
Loading...
Searching...
No Matches
strtok.c
Go to the documentation of this file.
2#include <string.h>
3
4char* strtok(char* _RESTRICT s1, const char* _RESTRICT s2)
5{
6 static char* tmp = NULL;
7 static rsize_t max;
8
9 if (s1 != NULL)
10 {
11 tmp = s1;
12 max = strlen(tmp);
13 }
14
15 return strtok_s(s1, &max, s2, &tmp);
16}
#define NULL
Pointer error value.
Definition NULL.h:23
#define _RESTRICT
Definition config.h:17
__SIZE_TYPE__ rsize_t
Definition rsize_t.h:4
_PUBLIC size_t strlen(const char *s)
Definition strlen.c:3
char * strtok(char *_RESTRICT s1, const char *_RESTRICT s2)
Definition strtok.c:4
char * strtok_s(char *_RESTRICT s1, rsize_t *_RESTRICT s1max, const char *_RESTRICT s2, char **_RESTRICT ptr)
Definition strtok_s.c:8