about summary refs log tree commit diff
path: root/string/strtok.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/strtok.c')
-rw-r--r--string/strtok.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/string/strtok.c b/string/strtok.c
index 0b95084f53..954471322b 100644
--- a/string/strtok.c
+++ b/string/strtok.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -13,10 +13,9 @@ Library General Public License for more details.
 
 You should have received a copy of the GNU Library General Public
 License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
 
-#include <ansidecl.h>
 #include <errno.h>
 #include <string.h>
 
@@ -26,15 +25,16 @@ static char *olds = NULL;
 /* Parse S into tokens separated by characters in DELIM.
    If S is NULL, the last string strtok() was called with is
    used.  For example:
-	char s[] = "-abc=-def";
+	char s[] = "-abc-=-def";
 	x = strtok(s, "-");		// x = "abc"
-	x = strtok(NULL, "=-");		// x = "def"
+	x = strtok(NULL, "-=");		// x = "def"
 	x = strtok(NULL, "=");		// x = NULL
 		// s = "abc\0-def\0"
 */
 char *
-DEFUN(strtok, (s, delim),
-      register char *s AND register CONST char *delim)
+strtok (s, delim)
+     char *s;
+     const char *delim;
 {
   char *token;
 
@@ -50,7 +50,7 @@ DEFUN(strtok, (s, delim),
     }
 
   /* Scan leading delimiters.  */
-  s += strspn(s, delim);
+  s += strspn (s, delim);
   if (*s == '\0')
     {
       olds = NULL;
@@ -59,7 +59,7 @@ DEFUN(strtok, (s, delim),
 
   /* Find the end of the token.  */
   token = s;
-  s = strpbrk(token, delim);
+  s = strpbrk (token, delim);
   if (s == NULL)
     /* This token finishes the string.  */
     olds = NULL;