X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fnewdemo.c;h=f9b6f82f6038099c042f88b03055bc4e8bb45bdc;hp=825d6e4624569d9dc42a1aea3abc0f439b7ab942;hb=bdb754b9f04f332b59d72f761a297497b2db8af1;hpb=938680fa3bc29d2a086031a2f648dfd6cadcb51e diff --git a/test/newdemo.c b/test/newdemo.c index 825d6e46..f9b6f82f 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.39 2012/12/29 23:39:08 tom Exp $ + * $Id: newdemo.c,v 1.41 2014/08/02 23:10:56 tom Exp $ */ #include @@ -47,7 +47,7 @@ static const char *messages[] = /* * Trap interrupt */ -static RETSIGTYPE +static void trap(int sig GCC_UNUSED) { endwin(); @@ -84,7 +84,7 @@ set_colors(WINDOW *win, int pair, int foreground, int background) if (pair > COLOR_PAIRS) pair = COLOR_PAIRS; init_pair((short) pair, (short) foreground, (short) background); - (void) wattrset(win, (int) COLOR_PAIR(pair)); + (void) wattrset(win, AttrArg(COLOR_PAIR(pair), 0)); } } @@ -96,7 +96,7 @@ use_colors(WINDOW *win, int pair, chtype attrs) pair = COLOR_PAIRS; attrs |= (chtype) COLOR_PAIR(pair); } - (void) wattrset(win, (int) attrs); + (void) wattrset(win, AttrArg(attrs, 0)); return attrs; }