mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-13 03:13:08 +03:00
* 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:
parent
0129bcc1ca
commit
a2e8277428
@ -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
|
||||
|
28
src/slint.c
28
src/slint.c
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user