Fix colors showing for compile with S-Lang library

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2009-10-22 14:03:01 +03:00
parent cb5836c2e0
commit 41c5b369de
2 changed files with 4 additions and 18 deletions

View File

@ -142,16 +142,6 @@ tty_color_try_alloc_pair_lib (tty_color_pair_t * mc_color_pair)
void void
tty_setcolor (int color) tty_setcolor (int color)
{ {
if (!SLtt_Use_Ansi_Colors)
SLsmg_set_color (color);
else if ((color & A_BOLD) != 0) {
if (color == A_BOLD)
SLsmg_set_color (A_BOLD);
else
SLsmg_set_color ((color & (~A_BOLD)) + 8);
} else if (color == A_REVERSE)
SLsmg_set_color (A_REVERSE);
else
SLsmg_set_color (color); SLsmg_set_color (color);
} }

View File

@ -22,13 +22,9 @@ enum {
/* When using Slang with color, we have all the indexes free but /* When using Slang with color, we have all the indexes free but
* those defined here (A_BOLD, A_UNDERLINE, A_REVERSE, A_BOLD_REVERSE) * those defined here (A_BOLD, A_UNDERLINE, A_REVERSE, A_BOLD_REVERSE)
*/ */
#define A_BOLD 0x40
#define A_UNDERLINE 0x40
#define A_REVERSE 0x20
#define A_BOLD_REVERSE 0x21
#ifndef A_NORMAL #ifndef A_BOLD
# define A_NORMAL 0x00 #define A_BOLD SLTT_BOLD_MASK
#endif #endif /* A_BOLD */
#endif /* MC_COLOR_SLANG_H */ #endif /* MC_COLOR_SLANG_H */