summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strsep.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-08-20 04:28:13 +0000
committermillert <millert@openbsd.org>1997-08-20 04:28:13 +0000
commit0d242b05f29529798c0e771a85da9cf3c48f50e3 (patch)
treebbf440d8cebaa2d868a27005fd900cee0423583e /lib/libc/string/strsep.c
parentUpdate man page and sccs tags from lite2. Minor cleanup by me as well. (diff)
downloadwireguard-openbsd-0d242b05f29529798c0e771a85da9cf3c48f50e3.tar.xz
wireguard-openbsd-0d242b05f29529798c0e771a85da9cf3c48f50e3.zip
Update from lite2.
Diffstat (limited to 'lib/libc/string/strsep.c')
-rw-r--r--lib/libc/string/strsep.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/libc/string/strsep.c b/lib/libc/string/strsep.c
index 09f187b62d8..b69b715fc5f 100644
--- a/lib/libc/string/strsep.c
+++ b/lib/libc/string/strsep.c
@@ -1,6 +1,8 @@
+/* $OpenBSD: strsep.c,v 1.3 1997/08/20 04:28:14 millert Exp $ */
+
/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,14 +33,19 @@
* SUCH DAMAGE.
*/
+#include <string.h>
+#include <stdio.h>
+
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strsep.c,v 1.2 1996/08/19 08:34:24 tholo Exp $";
+#if 0
+static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93";
+#else
+static char *rcsid = "$OpenBSD: strsep.c,v 1.3 1997/08/20 04:28:14 millert Exp $";
+#endif
#endif /* LIBC_SCCS and not lint */
-#include <string.h>
-
/*
- * Get next token from string *stringp, where tokens are nonempty
+ * Get next token from string *stringp, where tokens are possibly-empty
* strings separated by characters from delim.
*
* Writes NULs into the string at *stringp to end tokens.
@@ -46,7 +53,7 @@ static char *rcsid = "$OpenBSD: strsep.c,v 1.2 1996/08/19 08:34:24 tholo Exp $";
* On return, *stringp points past the last NUL written (if there might
* be further tokens), or is NULL (if there are definitely no more tokens).
*
- * If *stringp is NULL, strtoken returns NULL.
+ * If *stringp is NULL, strsep returns NULL.
*/
char *
strsep(stringp, delim)