$Log$
+ Revision 590.148 2002/03/12 22:47:17 nbryant
+ curses fix: map our normal color pairs into the 0-7 range instead of 1-8,
+ in order to make our pairs fit on terminals such as dtterm where COLOR_PAIRS=8.
+ map the white/blue color pair onto 8 instead of 9, but only if that slot
+ is available; fall back on white/black otherwise.
+
+ it seems there may be an off-by-one error in the color pair manpages for
+ the various curses packages (?) if not, our 0 entry is unusable, but that's
+ the DIM_BLACK color and we don't use it anyway.
+
Revision 590.147 2002/03/12 22:17:20 ajc
* Give mailbox owners access to "who knows room" command
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
start_color();
if (rc_ansi_color)
enable_color = 1;
- init_pair(1+DIM_BLACK, COLOR_BLACK, COLOR_BLACK);
- init_pair(1+DIM_RED, COLOR_RED, COLOR_BLACK);
- init_pair(1+DIM_GREEN, COLOR_GREEN, COLOR_BLACK);
- init_pair(1+DIM_YELLOW, COLOR_YELLOW, COLOR_BLACK);
- init_pair(1+DIM_BLUE, COLOR_BLUE, COLOR_BLACK);
- init_pair(1+DIM_MAGENTA, COLOR_MAGENTA, COLOR_BLACK);
- init_pair(1+DIM_CYAN, COLOR_CYAN, COLOR_BLACK);
- init_pair(1+DIM_WHITE, COLOR_WHITE, COLOR_BLACK);
+ init_pair(DIM_BLACK, COLOR_BLACK, COLOR_BLACK);
+ init_pair(DIM_RED, COLOR_RED, COLOR_BLACK);
+ init_pair(DIM_GREEN, COLOR_GREEN, COLOR_BLACK);
+ init_pair(DIM_YELLOW, COLOR_YELLOW, COLOR_BLACK);
+ init_pair(DIM_BLUE, COLOR_BLUE, COLOR_BLACK);
+ init_pair(DIM_MAGENTA, COLOR_MAGENTA, COLOR_BLACK);
+ init_pair(DIM_CYAN, COLOR_CYAN, COLOR_BLACK);
+ init_pair(DIM_WHITE, COLOR_WHITE, COLOR_BLACK);
if (COLOR_PAIRS > 8)
- init_pair(9, COLOR_WHITE, COLOR_BLUE);
+ init_pair(8, COLOR_WHITE, COLOR_BLUE);
} else
#endif /* HAVE_CURSES_H */
{
#ifdef HAVE_CURSES_H
if (mainwindow) {
#ifdef HAVE_WCOLOR_SET
- wcolor_set(mainwindow, 1 + (colornum & 7), NULL);
+ wcolor_set(mainwindow, (colornum & 7), NULL);
#else
- wattron(mainwindow, COLOR_PAIR(1 + (colornum & 7)));
+ wattron(mainwindow, COLOR_PAIR((colornum & 7)));
#endif
if (colornum & 8) {
wattron(mainwindow, A_BOLD);
statuswindow = newwin(1, x, y - 1, 0);
if (COLOR_PAIRS > 8)
- wbkgdset(statuswindow, COLOR_PAIR(9));
+ wbkgdset(statuswindow, ' ' | COLOR_PAIR(8));
+ else
+ wbkgdset(statuswindow, ' ' | COLOR_PAIR(DIM_WHITE));
werase(statuswindow);
immedok(statuswindow, FALSE);