strtok.c 613 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (C) 2002 Manuel Novoa III
  3. * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. *
  5. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. */
  7. #include "_string.h"
  8. #if 0 /*def WANT_WIDE*/
  9. # define Wstrtok wcstok
  10. # define Wstrtok_r wcstok_r
  11. #else
  12. # define Wstrtok strtok
  13. # define Wstrtok_r strtok_r
  14. #endif
  15. /* Experimentally off - libc_hidden_proto(Wstrtok_r) */
  16. Wchar *Wstrtok(Wchar * __restrict s1, const Wchar * __restrict s2)
  17. {
  18. static Wchar *next_start; /* Initialized to 0 since in bss. */
  19. return Wstrtok_r(s1, s2, &next_start);
  20. }
  21. libc_hidden_def(Wstrtok)