1
1

TTY: don't check use_colors twice.

start_color() is NCurses function. Don't call it in S-Lang TTY layer. Define
is removed.
Этот коммит содержится в:
Andrew Borodin 2009-05-30 19:53:53 +04:00
родитель 1b1f082123
Коммит b0ce68a79b
3 изменённых файлов: 11 добавлений и 16 удалений

Просмотреть файл

@ -47,6 +47,7 @@ tty_init_colors (void)
start_color ();
use_default_colors ();
configure_colors ();
if (map_len > MAX_PAIRS) {
@ -56,10 +57,8 @@ tty_init_colors (void)
exit (1);
}
if (use_colors) {
/* Use default terminal colors */
mc_init_pair (DEFAULT_COLOR_INDEX, -1, -1);
}
for (i = 0; i < map_len; i++)
if (color_map [i].name != NULL) {

Просмотреть файл

@ -101,10 +101,8 @@ tty_init_colors (void)
const size_t map_len = color_map_len ();
size_t i;
start_color ();
configure_colors ();
if (use_colors) {
/*
* We are relying on undocumented feature of
* S-Lang to make COLOR_PAIR(DEFAULT_COLOR_INDEX)
@ -113,7 +111,6 @@ tty_init_colors (void)
* document this feature.
*/
SLtt_set_color (DEFAULT_COLOR_INDEX, NULL, (char *) "default", (char *) "default");
}
for (i = 0; i < map_len; i++)
if (color_map [i].name != NULL)

Просмотреть файл

@ -44,7 +44,6 @@ enum {
#define keypad(scr, value) slang_keypad (value)
#define ungetch(x) SLang_ungetkey (x)
#define start_color()
#define touchwin(x) SLsmg_touch_lines (0, LINES)
#define reset_shell_mode() slang_shell_mode ()
#define reset_prog_mode() slang_prog_mode ()