diff options
Diffstat (limited to 'src/LYCurses.h')
-rw-r--r-- | src/LYCurses.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/LYCurses.h b/src/LYCurses.h index e07d0e8f..db732a96 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -211,6 +211,9 @@ typedef struct { # if defined(NCURSES) && defined(HAVE_NCURSES_TERM_H) # include <ncurses/term.h> # else +# if defined(HAVE_NCURSESW_NCURSES_H) || defined(HAVE_NCURSES_NCURSES_H) || defined(HAVE_XCURSES) +# undef HAVE_TERM_H /* only use one in comparable path! */ +# endif # if defined(HAVE_TERM_H) # include <term.h> # endif @@ -258,6 +261,19 @@ typedef struct { #undef USE_CURSES_PADS #endif +/* + * Most implementations of curses treat pair 0 specially, as the default + * foreground and background color. Also, the COLORS variable corresponds to + * the total number of colors. + * + * PDCurses does not follow these rules. Its COLORS variable claims it has + * 8 colors, but it actually implements 16. That makes it hard to optimize + * color settings against color pair 0 in a portable fashion. + */ +#if defined(COLOR_CURSES) && !(defined(PDCURSES) || defined(HAVE_XCURSES)) +#define USE_CURSES_PAIR_0 +#endif + #endif /* USE_SLANG */ #ifdef USE_SLANG |