5 /* strtok( char *, const char * )
7 This file is part of the Public Domain C Library (PDCLib).
8 Permission is granted to use, modify, and / or redistribute at will.
11 #include <_PDCLIB_aux.h>
14 char * strtok( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
16 static char * tmp = NULL;
27 /* old string continued */
30 /* No old string, no new string, nothing to do */
36 /* skipping leading s2 characters */
41 /* found seperator; skip and start over */
51 /* no more to parse */
52 return ( tmp = NULL );
55 /* skipping non-s2 characters */
64 /* found seperator; overwrite with '\0', position tmp, return */
72 /* parsed to end of string */
73 return ( tmp = NULL );
76 #warning Test driver missing.