diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/mingw.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/win32/mingw.c b/win32/mingw.c index eccd37cc3..937e9422c 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -348,3 +348,21 @@ int link(const char *oldpath, const char *newpath) | |||
348 | } | 348 | } |
349 | return 0; | 349 | return 0; |
350 | } | 350 | } |
351 | |||
352 | char *strsep(char **stringp, const char *delim) | ||
353 | { | ||
354 | char *s, *old_stringp; | ||
355 | if (!*stringp) | ||
356 | return NULL; | ||
357 | old_stringp = s = *stringp; | ||
358 | while (*s) { | ||
359 | if (strchr(delim, *s)) { | ||
360 | *s = '\0'; | ||
361 | *stringp = s+1; | ||
362 | return old_stringp; | ||
363 | } | ||
364 | s++; | ||
365 | } | ||
366 | *stringp = NULL; | ||
367 | return old_stringp; | ||
368 | } | ||