2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
11 static char *___strtok
= NULL
;
15 strtok_r(char *s
, char const *ct
, char **save_ptr
)
22 sbegin
= s
? s
: *save_ptr
;
26 sbegin
+= strspn(sbegin
, ct
);
27 if (*sbegin
== '\0') {
33 send
= strpbrk(sbegin
, ct
);
34 if (send
&& *send
!= '\0')
44 strtok(char *s
, char const *ct
)
46 return strtok_r(s
, ct
, &___strtok
);