* slint.c: Eliminate hardcoded color terminals. Most users no

longer need this hack, and those who do have color_terminals
option in the config file.
This commit is contained in:
Pavel Roskin 2002-07-15 06:01:29 +00:00
parent 0129bcc1ca
commit a2e8277428
2 changed files with 7 additions and 27 deletions

View File

@ -1,3 +1,9 @@
2002-07-15 Pavel Roskin <proski@gnu.org>
* slint.c: Eliminate hardcoded color terminals. Most users no
longer need this hack, and those who do have color_terminals
option in the config file.
2002-07-14 Pavel Roskin <proski@gnu.org>
* color.c [USE_NCURSES]: Eliminate division by COLOR, it's 0 in

View File

@ -385,25 +385,6 @@ dealloc_color_pairs (void)
}
#endif /* HAVE_MAD */
static const char * const color_terminals [] = {
#ifdef __linux__
"console",
#endif
"linux",
"xterm-color",
"color-xterm",
"dtterm",
"xtermc",
"ansi",
/* 'qnx*' terminals have non-ANSI-compatible color sequences... */
"qansi",
"qansi-g",
"qansi-m",
"qansi-t",
"qansi-w",
0
};
int has_colors (void)
{
char *terminal = getenv ("TERM");
@ -417,15 +398,8 @@ int has_colors (void)
/* We want to allow overwriding */
if (!disable_colors){
if (!*cts)
{
/* check hard-coded terminals */
for (i = 0; color_terminals [i]; i++)
if (strcmp (color_terminals [i], terminal) == 0)
SLtt_Use_Ansi_Colors = 1;
}
else
/* check color_terminal_string */
if (*cts)
{
while (*cts)
{