3 char *strtok(char *s1, const char *s2) {
4 static char *tmp = NULL;
11 /* old string continued */
13 /* No old string, no new string, nothing to do */
19 /* skipping leading s2 characters */
22 /* found seperator; skip and start over */
31 /* no more to parse */
32 return ( tmp = NULL );
35 /* skipping non-s2 characters */
41 /* found seperator; overwrite with '\0', position tmp, return */
49 /* parsed to end of string */