Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/string/strsep.c')
-rw-r--r--newlib/libc/string/strsep.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/newlib/libc/string/strsep.c b/newlib/libc/string/strsep.c
new file mode 100644
index 000000000..d3d0ad0a9
--- /dev/null
+++ b/newlib/libc/string/strsep.c
@@ -0,0 +1,19 @@
+/* BSD strsep function */
+
+/* Copyright 2002, Red Hat Inc. */
+
+/* undef STRICT_ANSI so that strsep prototype will be defined */
+#undef __STRICT_ANSI__
+#include <string.h>
+#include <_ansi.h>
+#include <reent.h>
+
+extern char *__strtok_r (char *, const char *, char **, int);
+
+char *
+_DEFUN (strsep, (source_ptr, delim),
+ register char **source_ptr _AND
+ register const char *delim)
+{
+ return __strtok_r (*source_ptr, delim, source_ptr, 0);
+}