From a60ed4a5c0d5e14858239f899700f80b31776e8b Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 25 Jul 2006 17:59:36 +0000 Subject: [PATCH] Brighten up the display. --- display.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/display.c b/display.c index 2ae3e7d..6f90017 100644 --- a/display.c +++ b/display.c @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.12 2006/07/25 16:58:26 esr Exp esr $ - (c) Copyright 1987, 1988 Chuck Simmons */ +/* $Id: display.c,v 1.13 2006/07/25 17:21:51 esr Exp esr $ - (c) Copyright 1987, 1988 Chuck Simmons */ /* * Copyright (C) 1987, 1988 Chuck Simmons @@ -47,6 +47,7 @@ void init_colors(void) init_pair(COLOR_MAGENTA, COLOR_MAGENTA, COLOR_BLACK); init_pair(COLOR_BLUE, COLOR_BLUE, COLOR_BLACK); init_pair(COLOR_YELLOW, COLOR_YELLOW, COLOR_BLACK); + attron(A_BOLD); /* otherwise we get gray for white */ } #endif /* A_COLOR */ @@ -254,13 +255,15 @@ static void disp_square(vp) view_map_t *vp; { #ifdef A_COLOR + chtype attr; + switch(vp->contents) { case '+': - attron(COLOR_PAIR(COLOR_GREEN)); + attr = COLOR_PAIR(COLOR_GREEN); break; case '.': - attron(COLOR_PAIR(COLOR_CYAN)); + attr = COLOR_PAIR(COLOR_CYAN); break; case 'a': case 'f': @@ -272,16 +275,17 @@ view_map_t *vp; case 's': case 'z': case 'X': - attron(COLOR_PAIR(COLOR_RED)); + attr = COLOR_PAIR(COLOR_RED); break; default: - attron(COLOR_PAIR(COLOR_WHITE)); + attr = COLOR_PAIR(COLOR_WHITE); break; } + attron(attr); #endif /* A_COLOR */ (void) addch ((chtype)vp->contents); #ifdef A_COLOR - attrset(0); + attroff(attr); attron(COLOR_PAIR(COLOR_WHITE)); #endif /* A_COLOR */ } -- 2.43.0