projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add fast path for normal mutexes back to pthread_mutex_lock
[oweals/musl.git]
/
src
/
string
/
strtok.c
1
#include <string.h>
2
3
char *strtok(char *s, const char *sep)
4
{
5
static char *p;
6
if (!s && !(s = p)) return NULL;
7
s += strspn(s, sep);
8
if (!*s) return p = 0;
9
p = s + strcspn(s, sep);
10
if (*p) *p++ = 0;
11
else p = 0;
12
return s;
13
}