2 * Copyright (C) 2002 Manuel Novoa III
3 * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
5 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
11 libc_hidden_proto(wcsspn)
12 libc_hidden_proto(wcspbrk)
13 # define Wstrtok_r wcstok
14 # define Wstrspn wcsspn
15 # define Wstrpbrk wcspbrk
17 libc_hidden_proto(strtok_r)
18 libc_hidden_proto(strspn)
19 libc_hidden_proto(strpbrk)
20 # define Wstrtok_r strtok_r
21 # define Wstrspn strspn
22 # define Wstrpbrk strpbrk
25 Wchar *Wstrtok_r(Wchar * __restrict s1, const Wchar * __restrict s2,
26 Wchar ** __restrict next_start)
32 if (((s = s1) != NULL) || ((s = *next_start) != NULL)) {
33 if (*(s += Wstrspn(s, s2))) {
34 if ((p = Wstrpbrk(s, s2)) != NULL) {
47 if (s && *(s += Wstrspn(s, s2))) {
48 if (*(p = s + Wstrcspn(s, s2))) {
54 return NULL; /* TODO: set *next_start = NULL for safety? */
59 libc_hidden_def(strtok_r)