Handle the escaped colon \: in a capability.

PR:		bin/30778
Reviewed by:	ache, peter
MFC after:	3 days
This commit is contained in:
Ruslan Ermilov 2002-08-12 19:13:22 +00:00
parent d837b36904
commit f350abf814
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101752
3 changed files with 5 additions and 2 deletions

View File

@ -200,6 +200,7 @@ _nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
tcs = pd - 1;
for (;;) {
while ((tok = strsep(&ps, ":")) != NULL &&
*(tok - 2) != '\\' &&
(*tok == '\0' || *tok == '\\' || !isgraph(*tok)))
;
if (tok == NULL)

View File

@ -200,6 +200,7 @@ _nc_read_termcap_entry(const char *const name, TERMTYPE *const tp)
tcs = pd - 1;
for (;;) {
while ((tok = strsep(&ps, ":")) != NULL &&
*(tok - 2) != '\\' &&
(*tok == '\0' || *tok == '\\' || !isgraph(*tok)))
;
if (tok == NULL)

View File

@ -817,8 +817,9 @@ and
.Sy \&\e\e .
If it is necessary to place a
.Sy \&:
in a capability it must be escaped in
octal as
in a capability it must be escaped as
.Sy \e:
or be encoded as
.Sy \&\e072 .
If it is necessary to place a
.Dv NUL