update for HEAD-2003091401
[reactos.git] / lib / msvcrt / string / lasttok.c
diff --git a/lib/msvcrt/string/lasttok.c b/lib/msvcrt/string/lasttok.c
new file mode 100644 (file)
index 0000000..fbe0cc9
--- /dev/null
@@ -0,0 +1,15 @@
+#include <msvcrt/internal/tls.h>
+#include <msvcrt/assert.h>
+
+/*
+ * This is an MSVCRT internal function to return the lasttoken
+ * bit of data used by strtok. The reason for it's existence is
+ * so that CRTDLL can use the strtok source code in the same
+ * file.
+ */
+char** _lasttoken()
+{
+       PTHREADDATA ptd = GetThreadData();
+       assert(ptd);
+       return &(ptd->lasttoken);
+}