Date: Fri, 26 Feb 1999 14:42:22 -0500 (EST) From: bright@cygnus.rush.net To: FreeBSD-gnats-submit@freebsd.org Subject: docs/10284: spelling error on strtok man page Message-ID: <199902261942.OAA74903@bright.fx.genx.net>
index | next in thread | raw e-mail
>Number: 10284
>Category: docs
>Synopsis: incorrect use of escaping in man page
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 26 11:40:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: Alfred Perlstein
>Release: FreeBSD 4.0-CURRENT i386
>Organization:
HotJobs
>Environment:
4.0-current
>Description:
strtok man page has \n, \\, instead what i think is correct "\e"
for proper escaping, the code pasted into a program doesn't work.
>How-To-Repeat:
man 3 strtok
>Fix:
Index: strtok.3
===================================================================
RCS file: /home/ncvs/src/lib/libc/string/strtok.3,v
retrieving revision 1.3
diff -u -u -r1.3 strtok.3
--- strtok.3 1999/01/19 23:42:44 1.3
+++ strtok.3 1999/02/26 19:32:23
@@ -111,10 +111,10 @@
to parse two strings using separate contexts:
.Bd -literal
char test[80], blah[80];
-char *sep = "\\/:;=-";
+char *sep = "\e\e/:;=-";
char *word, *phrase, *brkt, *brkb;
-strcpy(test, "This;is.a:test:of=the/string\\tokenizer-function.");
+strcpy(test, "This;is.a:test:of=the/string\e\etokenizer-function.");
for (word = strtok_r(test, sep, &brkt);
word;
@@ -126,7 +126,7 @@
phrase;
phrase = strtok_r(NULL, sep, &brkb))
{
- printf("So far we're at %s:%s\n", word, phrase);
+ printf("So far we're at %s:%s\en", word, phrase);
}
}
.Ed
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902261942.OAA74903>
