diff --git a/lib/tty/color-internal.c b/lib/tty/color-internal.c index f4478aed6..bebffc848 100644 --- a/lib/tty/color-internal.c +++ b/lib/tty/color-internal.c @@ -38,6 +38,8 @@ gboolean mc_tty_color_disable; /*** file scope macro definitions ****************************************************************/ +#define COLOR_INTENSITY 8 + /*** file scope type declarations ****************************************************************/ typedef struct mc_tty_color_table_struct @@ -50,21 +52,21 @@ typedef struct mc_tty_color_table_struct mc_tty_color_table_t const color_table[] = { {"black", COLOR_BLACK}, - {"gray", COLOR_BLACK + 8}, + {"gray", COLOR_BLACK + COLOR_INTENSITY}, {"red", COLOR_RED}, - {"brightred", COLOR_RED + 8}, + {"brightred", COLOR_RED + COLOR_INTENSITY}, {"green", COLOR_GREEN}, - {"brightgreen", COLOR_GREEN + 8}, + {"brightgreen", COLOR_GREEN + COLOR_INTENSITY}, {"brown", COLOR_YELLOW}, - {"yellow", COLOR_YELLOW + 8}, + {"yellow", COLOR_YELLOW + COLOR_INTENSITY}, {"blue", COLOR_BLUE}, - {"brightblue", COLOR_BLUE + 8}, + {"brightblue", COLOR_BLUE + COLOR_INTENSITY}, {"magenta", COLOR_MAGENTA}, - {"brightmagenta", COLOR_MAGENTA + 8}, + {"brightmagenta", COLOR_MAGENTA + COLOR_INTENSITY}, {"cyan", COLOR_CYAN}, - {"brightcyan", COLOR_CYAN + 8}, + {"brightcyan", COLOR_CYAN + COLOR_INTENSITY}, {"lightgray", COLOR_WHITE}, - {"white", COLOR_WHITE + 8}, + {"white", COLOR_WHITE + COLOR_INTENSITY}, {"default", -1}, /* default color of the terminal */ /* special colors */ {"A_REVERSE", SPEC_A_REVERSE}, diff --git a/lib/tty/color-slang.c b/lib/tty/color-slang.c index b2f9d1731..180d872fe 100644 --- a/lib/tty/color-slang.c +++ b/lib/tty/color-slang.c @@ -169,8 +169,8 @@ tty_color_try_alloc_pair_lib (tty_color_pair_t * mc_color_pair) } else { - fg = tty_color_get_name_by_index(mc_color_pair->ifg); - bg = tty_color_get_name_by_index(mc_color_pair->ibg); + fg = tty_color_get_name_by_index (mc_color_pair->ifg); + bg = tty_color_get_name_by_index (mc_color_pair->ibg); SLtt_set_color (mc_color_pair->pair_index, (char *) "", (char *) fg, (char *) bg); SLtt_add_color_attribute (mc_color_pair->pair_index, mc_color_pair->attr); } @@ -206,7 +206,7 @@ tty_set_normal_attrs (void) /* --------------------------------------------------------------------------------------------- */ gboolean -tty_use_256colors(void) +tty_use_256colors (void) { return (SLtt_Use_Ansi_Colors && SLtt_tgetnum ((char *) "Co") == 256); } diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c index 5dd48e9fe..45fa403e9 100644 --- a/lib/tty/tty-slang.c +++ b/lib/tty/tty-slang.c @@ -45,6 +45,7 @@ #include "tty-internal.h" /* slow_tty */ #include "tty.h" +#include "color.h" #include "color-slang.h" #include "color-internal.h" #include "mouse.h" /* Gpm_Event is required in key.h */