* 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.
Этот коммит содержится в:
родитель
3067d6ae57
Коммит
a0f3445a02
@ -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.
|
||||||
|
|
||||||
|
18
src/color.c
18
src/color.c
@ -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
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user