summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2001-03-01 19:49:41 +0000
committerManuel Novoa III <mjn3@codepoet.org>2001-03-01 19:49:41 +0000
commit9aed53cc26d900ab64f49c38df535cf10518aa51 (patch)
tree7adebf35513bee04d390a3eb258a64059b22b085 /include
parent57e9510d983d40d7ad26cfaa27f7f285d090bf3f (diff)
Added __strtok_r function. Change strtok to a wrapper around __strtok_r and
add a weak alias of __strtok_r for strtok_r since optional. Also reduced code size.
Diffstat (limited to 'include')
-rw-r--r--include/string.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h
index 7d284e5d6..58614b291 100644
--- a/include/string.h
+++ b/include/string.h
@@ -92,6 +92,16 @@ extern char *strstr __P ((__const char *__haystack, __const char *__needle));
/* Divide S into tokens separated by characters in DELIM. */
extern char *strtok __P ((char *__restrict __s,
__const char *__restrict __delim));
+/* Divide S into tokens separated by characters in DELIM. Information
+ passed between calls are stored in SAVE_PTR. */
+extern char *__strtok_r __P ((char *__restrict __s,
+ __const char *__restrict __delim,
+ char **__restrict __save_ptr));
+#if defined __USE_POSIX || defined __USE_MISC
+extern char *strtok_r __P ((char *__restrict __s,
+ __const char *__restrict __delim,
+ char **__restrict __save_ptr));
+#endif
/* Return the length of the initial segment of S which
consists entirely of characters not in REJECT. */
extern size_t strcspn __P ((__const char *__s, __const char *__reject));