1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-02 08:42:48 +00:00

Corrected use of backslash escaping in sample code.

PR:		docs/10284
Submitted by:	Alfred Perlstein <bright@cygnus.rush.net>
This commit is contained in:
Guy Helmer 1999-02-27 00:54:40 +00:00
parent 479508cf28
commit 2704b2cb2b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44306

View File

@ -111,10 +111,10 @@ The following uses
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 @@ for (word = strtok_r(test, sep, &brkt);
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