X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fnewdemo.c;h=8187982be2932d5b601bed9769ce3e546eacc465;hp=1e6942693ff8329f8b33b85d8faf61da220cbd48;hb=c04d54322f7835ed42e597967d8fa5471025fcac;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/test/newdemo.c b/test/newdemo.c index 1e694269..8187982b 100644 --- a/test/newdemo.c +++ b/test/newdemo.c @@ -2,7 +2,7 @@ * newdemo.c - A demo program using PDCurses. The program illustrate * the use of colours for text output. * - * $Id: newdemo.c,v 1.29 2006/12/03 00:15:28 tom Exp $ + * $Id: newdemo.c,v 1.32 2009/08/29 18:47:26 tom Exp $ */ #include @@ -12,7 +12,7 @@ /* * The Australian map */ -static const char *AusMap[16] = +static CONST_MENUS char *AusMap[16] = { " A A ", " N.T. AAAAA AAAA ", @@ -84,7 +84,7 @@ set_colors(WINDOW *win, int pair, int foreground, int background) if (pair > COLOR_PAIRS) pair = COLOR_PAIRS; init_pair(pair, foreground, background); - wattrset(win, COLOR_PAIR(pair)); + (void) wattrset(win, COLOR_PAIR(pair)); } } @@ -96,7 +96,7 @@ use_colors(WINDOW *win, int pair, chtype attrs) pair = COLOR_PAIRS; attrs |= COLOR_PAIR(pair); } - wattrset(win, attrs); + (void) wattrset(win, attrs); return attrs; } @@ -319,6 +319,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) j = 0; /* Draw running As across in RED */ set_colors(win, 7, COLOR_RED, COLOR_GREEN); + memset(save, ' ', sizeof(save)); for (i = 2; i < width - 4; ++i) { k = mvwinch(win, 4, i); if (k == ERR)