aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-12 20:38:26 +0000
committerRoy Marples <roy@marples.name>2008-01-12 20:38:26 +0000
commit9c5300d4aef487ff4ca52c21cac295c80951204b (patch)
tree2a80c079a83dd0f332b98e48080e98d1bb5ecfb2
parent6b4e645c2ca73342a67a7974bd9d3b4ab760de44 (diff)
Many termcap db's don't have ch or RI even though they do work
-rw-r--r--src/libeinfo/libeinfo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
index a8bd8254..50d84c60 100644
--- a/src/libeinfo/libeinfo.c
+++ b/src/libeinfo/libeinfo.c
@@ -184,6 +184,7 @@ static const char *const color_terms[] = {
"screen.linux",
"vt100",
"vt220",
+ "wsvt25",
"xterm",
"xterm-256color",
"xterm-color",
@@ -359,7 +360,7 @@ static bool colour_terminal (FILE * __EINFO_RESTRICT f)
/* Cheat here as vanilla BSD has the whole termcap info in /usr
* which is not available to us when we boot */
- if (term_is_cons25) {
+ if (term_is_cons25 || strcmp (term, "wsvt25") == 0) {
#else
while (color_terms[i]) {
if (strcmp (color_terms[i], term) == 0) {
@@ -388,10 +389,15 @@ static bool colour_terminal (FILE * __EINFO_RESTRICT f)
#ifdef HAVE_TERMCAP
}
- if (! _af || ! _ce || ! _ch || ! _me || !_md || ! _up) {
+ if (! _af || ! _ce || ! _me || !_md || ! _up) {
in_colour = 0;
return (false);
}
+
+ /* Many termcap databases don't have ch or RI even though they
+ * do work */
+ if (! _ch)
+ _ch = CH;
#endif
/* Now setup our colours */