Many termcap db's don't have ch or RI even though they do work

This commit is contained in:
Roy Marples 2008-01-12 20:38:26 +00:00
parent 6b4e645c2c
commit 9c5300d4ae

View File

@ -184,6 +184,7 @@ static const char *const color_terms[] = {
"screen.linux", "screen.linux",
"vt100", "vt100",
"vt220", "vt220",
"wsvt25",
"xterm", "xterm",
"xterm-256color", "xterm-256color",
"xterm-color", "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 /* Cheat here as vanilla BSD has the whole termcap info in /usr
* which is not available to us when we boot */ * which is not available to us when we boot */
if (term_is_cons25) { if (term_is_cons25 || strcmp (term, "wsvt25") == 0) {
#else #else
while (color_terms[i]) { while (color_terms[i]) {
if (strcmp (color_terms[i], term) == 0) { if (strcmp (color_terms[i], term) == 0) {
@ -388,10 +389,15 @@ static bool colour_terminal (FILE * __EINFO_RESTRICT f)
#ifdef HAVE_TERMCAP #ifdef HAVE_TERMCAP
} }
if (! _af || ! _ce || ! _ch || ! _me || !_md || ! _up) { if (! _af || ! _ce || ! _me || !_md || ! _up) {
in_colour = 0; in_colour = 0;
return (false); return (false);
} }
/* Many termcap databases don't have ch or RI even though they
* do work */
if (! _ch)
_ch = CH;
#endif #endif
/* Now setup our colours */ /* Now setup our colours */