1
1

* color.h: Define DEFAULT_COLOR_INDEX and DEFAULT_COLOR in the

same way regardless of HAVE_SLANG.
* color.c (init_colors) [USE_NCURSES]: Initialize the default
color pair.
Этот коммит содержится в:
Pavel Roskin 2001-05-29 17:02:28 +00:00
родитель 3067d6ae57
Коммит a0f3445a02
3 изменённых файлов: 19 добавлений и 12 удалений

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

@ -1,5 +1,10 @@
2001-05-29 Pavel Roskin <proski@gnu.org> 2001-05-29 Pavel Roskin <proski@gnu.org>
* color.h: Define DEFAULT_COLOR_INDEX and DEFAULT_COLOR in the
same way regardless of HAVE_SLANG.
* color.c (init_colors) [USE_NCURSES]: Initialize the default
color pair.
* subshell.c (pty_open_master) [!HAVE_SCO && HAVE_GRANTPT]: * subshell.c (pty_open_master) [!HAVE_SCO && HAVE_GRANTPT]:
Don't try to close a file that wasn't opened. Don't try to close a file that wasn't opened.

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

@ -293,15 +293,21 @@ void init_colors (void)
} }
#endif #endif
if (use_colors) {
#if defined HAVE_SLANG && !defined(HAS_DIRECT_COLOR_ACCESS) #if defined HAVE_SLANG && !defined(HAS_DIRECT_COLOR_ACCESS)
if (use_colors) { /* We are relying on undocumented feature of /*
S-Lang to make COLOR_PAIR(DEFAULT_COLOR_INDEX) * We are relying on undocumented feature of
the default fg/bg of the terminal. * S-Lang to make COLOR_PAIR(DEFAULT_COLOR_INDEX)
Hopefully, future versions of S-Lang will * the default fg/bg of the terminal.
document this feature. */ * Hopefully, future versions of S-Lang will
* document this feature.
*/
SLtt_set_color (DEFAULT_COLOR_INDEX, NULL, NULL, NULL); SLtt_set_color (DEFAULT_COLOR_INDEX, NULL, NULL, NULL);
} #elif USE_NCURSES
/* Always white on black */
init_pair(DEFAULT_COLOR_INDEX, COLOR_WHITE, COLOR_BLACK);
#endif #endif
}
for (i = 0; i < ELEMENTS (color_map); i++){ for (i = 0; i < ELEMENTS (color_map); i++){
if (!color_map [i].name) if (!color_map [i].name)

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

@ -77,13 +77,9 @@ extern int dialog_colors [4];
#define CORE_COLOR (PORT_COLOR (MY_COLOR_PAIR (29),0)) #define CORE_COLOR (PORT_COLOR (MY_COLOR_PAIR (29),0))
#ifdef HAVE_SLANG
/* For the default color any unused index may be chosen. */ /* For the default color any unused index may be chosen. */
# define DEFAULT_COLOR_INDEX 30 #define DEFAULT_COLOR_INDEX 30
# define DEFAULT_COLOR (PORT_COLOR (MY_COLOR_PAIR(DEFAULT_COLOR_INDEX),0)) #define DEFAULT_COLOR (PORT_COLOR (MY_COLOR_PAIR(DEFAULT_COLOR_INDEX),0))
# else
# define DEFAULT_COLOR A_NORMAL
#endif
/* /*
* editor colors - only 3 for normal, search->found, and select, respectively * editor colors - only 3 for normal, search->found, and select, respectively