summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-08-12 19:13:22 +0000
committerru <ru@FreeBSD.org>2002-08-12 19:13:22 +0000
commit705964161caf5a6208d7516f8515aa1357b9628b (patch)
treeb38628ce1786f1b61fdade56949e965f4c35d2d0
parent39fe3312e6b2bb7959a26b4fbafeedb77c088990 (diff)
downloadFreeBSD-src-705964161caf5a6208d7516f8515aa1357b9628b.zip
FreeBSD-src-705964161caf5a6208d7516f8515aa1357b9628b.tar.gz
Handle the escaped colon \: in a capability.
PR: bin/30778 Reviewed by: ache, peter MFC after: 3 days
-rw-r--r--lib/libncurses/termcap.c1
-rw-r--r--lib/ncurses/ncurses/termcap.c1
-rw-r--r--share/termcap/termcap.55
3 files changed, 5 insertions, 2 deletions
diff --git a/lib/libncurses/termcap.c b/lib/libncurses/termcap.c
index 0d98d7e..24e71d3 100644
--- a/lib/libncurses/termcap.c
+++ b/lib/libncurses/termcap.c
@@ -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)
diff --git a/lib/ncurses/ncurses/termcap.c b/lib/ncurses/ncurses/termcap.c
index 0d98d7e..24e71d3 100644
--- a/lib/ncurses/ncurses/termcap.c
+++ b/lib/ncurses/ncurses/termcap.c
@@ -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)
diff --git a/share/termcap/termcap.5 b/share/termcap/termcap.5
index 432a426..0f615e7 100644
--- a/share/termcap/termcap.5
+++ b/share/termcap/termcap.5
@@ -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
OpenPOWER on IntegriCloud