mirror of https://github.com/MidnightCommander/mc
* 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.
This commit is contained in:
parent
3067d6ae57
commit
a0f3445a02
|
@ -1,5 +1,10 @@
|
|||
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]:
|
||||
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
|
||||
|
||||
if (use_colors) {
|
||||
#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)
|
||||
the default fg/bg of the terminal.
|
||||
Hopefully, future versions of S-Lang will
|
||||
document this feature. */
|
||||
/*
|
||||
* We are relying on undocumented feature of
|
||||
* S-Lang to make COLOR_PAIR(DEFAULT_COLOR_INDEX)
|
||||
* the default fg/bg of the terminal.
|
||||
* Hopefully, future versions of S-Lang will
|
||||
* document this feature.
|
||||
*/
|
||||
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++){
|
||||
if (!color_map [i].name)
|
||||
|
|
|
@ -77,13 +77,9 @@ extern int dialog_colors [4];
|
|||
#define CORE_COLOR (PORT_COLOR (MY_COLOR_PAIR (29),0))
|
||||
|
||||
|
||||
#ifdef HAVE_SLANG
|
||||
/* For the default color any unused index may be chosen. */
|
||||
# define DEFAULT_COLOR_INDEX 30
|
||||
# define DEFAULT_COLOR (PORT_COLOR (MY_COLOR_PAIR(DEFAULT_COLOR_INDEX),0))
|
||||
# else
|
||||
# define DEFAULT_COLOR A_NORMAL
|
||||
#endif
|
||||
#define DEFAULT_COLOR_INDEX 30
|
||||
#define DEFAULT_COLOR (PORT_COLOR (MY_COLOR_PAIR(DEFAULT_COLOR_INDEX),0))
|
||||
|
||||
/*
|
||||
* editor colors - only 3 for normal, search->found, and select, respectively
|
||||
|
|
Loading…
Reference in New Issue