update for HEAD-2003091401
[reactos.git] / lib / crtdll / wchar / wcstok.c
index 3afd717..a495e43 100644 (file)
@@ -1,5 +1,8 @@
-#include <crtdll/wchar.h>
+#include <msvcrt/string.h>
 
+/*
+ * @implemented
+ */
 wchar_t *wcstok(wchar_t *s, const wchar_t *ct)
 {
        const wchar_t *spanp;
@@ -7,7 +10,6 @@ wchar_t *wcstok(wchar_t *s, const wchar_t *ct)
        wchar_t *tok;
        static wchar_t *last;
 
-
        if (s == NULL && (s = last) == NULL)
                return (NULL);
 
@@ -19,12 +21,12 @@ wchar_t *wcstok(wchar_t *s, const wchar_t *ct)
        s++;
        for (spanp = ct; (sc = *spanp) != 0;spanp++) {
                if (c == sc)
-                       goto cont;
+                       goto cont;
        }
 
        if (c == 0) {                   /* no non-ctiter characters */
                last = NULL;
-               return (NULL);
+       return (NULL);
        }
        tok = s - 2;
 
@@ -33,7 +35,6 @@ wchar_t *wcstok(wchar_t *s, const wchar_t *ct)
    * Note that ct must have one NUL; we stop if we see that, too.
    */
        for (;;) {
-
                c = *s;
                s+=2;
                spanp = ct;
@@ -48,7 +49,6 @@ wchar_t *wcstok(wchar_t *s, const wchar_t *ct)
                        }
                        spanp+=2;
                } while (sc != 0);
-
        }
   /* NOTREACHED */
 }