From 6c24b699cd611590f66f42eaeb15bc7fb76c98f8 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 29 May 2001 22:02:16 +0000 Subject: [PATCH] * color.c (init_colors) [HAVE_SLANG]: Use "default" instead of NULL as color names - this works even if COLORFGBG is unset. Don't check HAS_DIRECT_COLOR_ACCESS - it's now meaningless. --- src/ChangeLog | 4 ++++ src/color.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dfb228432..4023d6950 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2001-05-29 Pavel Roskin + * color.c (init_colors) [HAVE_SLANG]: Use "default" instead of + NULL as color names - this works even if COLORFGBG is unset. + Don't check HAS_DIRECT_COLOR_ACCESS - it's now meaningless. + * 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 diff --git a/src/color.c b/src/color.c index 4b4fdc036..4357e1f62 100644 --- a/src/color.c +++ b/src/color.c @@ -294,7 +294,7 @@ void init_colors (void) #endif if (use_colors) { -#if defined HAVE_SLANG && !defined(HAS_DIRECT_COLOR_ACCESS) +#ifdef HAVE_SLANG /* * We are relying on undocumented feature of * S-Lang to make COLOR_PAIR(DEFAULT_COLOR_INDEX) @@ -302,8 +302,8 @@ void init_colors (void) * Hopefully, future versions of S-Lang will * document this feature. */ - SLtt_set_color (DEFAULT_COLOR_INDEX, NULL, NULL, NULL); -#elif USE_NCURSES + SLtt_set_color (DEFAULT_COLOR_INDEX, NULL, "default", "default"); +#elif defined(USE_NCURSES) /* Always white on black */ init_pair(DEFAULT_COLOR_INDEX, COLOR_WHITE, COLOR_BLACK); #endif