reactos/lib/sdk/crt/signal/xcptinfo.c # Synced to WineStaging-1.7.37
reactos/lib/sdk/crt/string/scanf.c/h # Synced to Wine-1.7.17
reactos/lib/sdk/crt/string/strtoi64.c # Synced to WineStaging-1.9.9
+ reactos/lib/sdk/crt/string/strtok.c # Synced to WineStaging-1.9.16
+ reactos/lib/sdk/crt/string/strtok_s.c # Synced to WineStaging-1.9.16
reactos/lib/sdk/crt/string/strtoul.c # Synced to WineStaging-1.9.9
reactos/lib/sdk/crt/strings/wcs.c # Synced at 20080611
reactos/lib/sdk/crt/wine/heap.c # Synced at 20080529
string/strtod.c
string/strtoi64.c
string/strtok.c
+ #string/strtok_s.c
string/strtol.c
string/strtoul.c
string/strtoull.c
-/* taken from wine string.c */
+/* Taken from Wine Staging msvcrt/string.c */
#include <precomp.h>
#include <internal/wine/msvcrt.h>
data->strtok_next = str;
return ret;
}
-
-/*********************************************************************
- * strtok_s (MSVCRT.@)
- */
-char * CDECL strtok_s(char *str, const char *delim, char **ctx)
-{
- if (!MSVCRT_CHECK_PMT(delim != NULL) || !MSVCRT_CHECK_PMT(ctx != NULL) ||
- !MSVCRT_CHECK_PMT(str != NULL || *ctx != NULL)) {
- *_errno() = EINVAL;
- return NULL;
- }
-
- if(!str)
- str = *ctx;
-
- while(*str && strchr(delim, *str))
- str++;
- if(!*str)
- return NULL;
-
- *ctx = str+1;
- while(**ctx && !strchr(delim, **ctx))
- (*ctx)++;
- if(**ctx)
- *(*ctx)++ = 0;
-
- return str;
-}
--- /dev/null
+/* Taken from Wine Staging msvcrt/string.c */
+
+#include <precomp.h>
+#include <internal/wine/msvcrt.h>
+
+/*********************************************************************
+ * strtok_s (MSVCRT.@)
+ */
+char * CDECL strtok_s(char *str, const char *delim, char **ctx)
+{
+ if (!MSVCRT_CHECK_PMT(delim != NULL)) return NULL;
+ if (!MSVCRT_CHECK_PMT(ctx != NULL)) return NULL;
+ if (!MSVCRT_CHECK_PMT(str != NULL || *ctx != NULL)) return NULL;
+
+ if(!str)
+ str = *ctx;
+
+ while(*str && strchr(delim, *str))
+ str++;
+ if(!*str)
+ return NULL;
+
+ *ctx = str+1;
+ while(**ctx && !strchr(delim, **ctx))
+ (*ctx)++;
+ if(**ctx)
+ *(*ctx)++ = 0;
+
+ return str;
+}