From 533c7482785176296637df81cd1a6318a0c29f97 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Wed, 22 Jan 2003 10:09:18 -0500 Subject: snapshot of project "lynx", label v2-8-5dev_13 --- src/LYCurses.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/LYCurses.h') 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 # 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 # 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 -- cgit 1.4.1-2-gfad0