Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/string Punctuation fixes; mark up NULL.



details:   https://anonhg.NetBSD.org/src/rev/f30db6ba7dcc
branches:  trunk
changeset: 565588:f30db6ba7dcc
user:      wiz <wiz%NetBSD.org@localhost>
date:      Tue Apr 13 23:02:28 2004 +0000

description:
Punctuation fixes; mark up NULL.

diffstat:

 lib/libc/string/strsep.3 |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r 4581e01778ae -r f30db6ba7dcc lib/libc/string/strsep.3
--- a/lib/libc/string/strsep.3  Tue Apr 13 22:36:36 2004 +0000
+++ b/lib/libc/string/strsep.3  Tue Apr 13 23:02:28 2004 +0000
@@ -29,7 +29,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     from: @(#)strsep.3     8.1 (Berkeley) 6/9/93
-.\"    $NetBSD: strsep.3,v 1.14 2003/08/07 16:43:52 agc Exp $
+.\"    $NetBSD: strsep.3,v 1.15 2004/04/13 23:02:28 wiz Exp $
 .\"
 .Dd August 11, 2002
 .Dt STRSEP 3
@@ -55,7 +55,9 @@
 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
@@ -63,7 +65,7 @@
 .Pp
 An
 .Dq empty
-field, i.e. one caused by two adjacent delimiter characters,
+field, i.e., one caused by two adjacent delimiter characters,
 can be detected by comparing the location referenced by the pointer returned
 by
 .Fn strsep
@@ -86,7 +88,7 @@
 char **ap, *argv[10], *inputstring;
 
 for (ap = argv; ap < \*[Am]argv[9] \*[Am]\*[Am]
-    (*ap = strsep(\*[Am]inputstring, " \et")) != NULL;) {
+    (*ap = strsep(\*[Am]inputstring, " \et")) != NULL) {
        if (**ap != '\e0')
                ap++;
 }
@@ -102,7 +104,7 @@
 .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



Home | Main Index | Thread Index | Old Index