summaryrefslogtreecommitdiff
path: root/lib/libc/string/strsep.3
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-06-04 19:14:57 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-06-04 19:14:57 +0000
commitea3aa758f0613eb4538aa90000b1fefafcdc6976 (patch)
tree6c58fae8633b1642bfe1f4b5f0ea28f071694465 /lib/libc/string/strsep.3
parente288cb3c3b2f3f37b0ec44648cf15b3ce1fa3299 (diff)
some repairs, add example to strdup(3) page
Diffstat (limited to 'lib/libc/string/strsep.3')
-rw-r--r--lib/libc/string/strsep.312
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/string/strsep.3 b/lib/libc/string/strsep.3
index 5af262a074e..dfd835bce89 100644
--- a/lib/libc/string/strsep.3
+++ b/lib/libc/string/strsep.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strsep.3,v 1.4 1998/06/15 17:55:14 mickey Exp $
+.\" $OpenBSD: strsep.3,v 1.5 1999/06/04 19:14:56 aaron Exp $
.\"
.\" Copyright (c) 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -58,13 +58,17 @@ the first occurrence of any character in the string
character) and replaces it with a
.Ql \e0 .
The location of the next character after the delimiter character
-(or NULL, if the end of the string was reached) is stored in
+(or
+.Dv NULL ,
+if the end of the string was reached) is stored in
.Fa *stringp .
The original value of
.Fa *stringp
is returned.
.Pp
-An ``empty'' field, i.e. one caused by two adjacent delimiter characters,
+An
+.Dq empty
+field, i.e., one caused by two adjacent delimiter characters,
can be detected by comparing the location referenced by the pointer returned
in
.Fa *stringp
@@ -101,7 +105,7 @@ While the
.Fn strtok
function should be preferred for portability reasons (it conforms to
.St -ansiC )
-it is unable to handle empty fields, i.e. detect fields delimited by
+it is unable to handle empty fields, i.e., detect fields delimited by
two adjacent delimiter characters, or to be used for more than a single
string at a time.
The