1 #include <msvcrt/string.h>
2 #include <msvcrt/internal/tls.h>
4 wchar_t** _wlasttoken(); /* wlasttok.c */
9 wchar_t *wcstok(wchar_t *s, const wchar_t *ct)
15 wchar_t ** wlasttoken = _wlasttoken();
17 PTHREADDATA ThreadData = GetThreadData();
18 wchar_t ** wlasttoken = &ThreadData->wlasttoken;
21 if (s == NULL && (s = *wlasttoken) == NULL)
25 * Skip (span) leading ctiters (s += strspn(s, ct), sort of).
30 for (spanp = ct; (sc = *spanp) != 0;spanp++) {
35 if (c == 0) { /* no non-ctiter characters */
42 * Scan token (scan for ctiters: s += strcspn(s, ct), sort of).
43 * Note that ct must have one NUL; we stop if we see that, too.
50 if ((sc = *spanp) == c) {