X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftestaddch.c;h=f0a476e10e4123ae2bb3e98480727b864b832f7b;hp=c1651c6f53a8dbdfd0449cd7c467ce053b0de113;hb=1385381954c39dc95558adc87fad457046959cc1;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/test/testaddch.c b/test/testaddch.c index c1651c6f..f0a476e1 100644 --- a/test/testaddch.c +++ b/test/testaddch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,7 +29,7 @@ * This is an example written by Alexander V. Lukyanov , * to demonstrate an inconsistency between ncurses and SVr4 curses. * - * $Id: testaddch.c,v 1.6 2006/04/01 19:08:03 tom Exp $ + * $Id: testaddch.c,v 1.9 2013/01/13 01:02:41 tom Exp $ */ #include @@ -63,21 +63,21 @@ main( for (i = 0; i < 8; i++) { back = (i & 1) ? A_BOLD | 'B' : ' '; set = (i & 2) ? A_REVERSE : 0; - attr = (i & 4) ? COLOR_PAIR(4) : 0; + attr = (chtype) ((i & 4) ? COLOR_PAIR(4) : 0); bkgdset(back); - attrset(set); + (void) attrset(set); attr_addstr("Test string with spaces -> <-\n", attr); } addch('\n'); for (i = 0; i < 8; i++) { - back = (i & 1) ? A_BOLD | 'B' | COLOR_PAIR(1) : ' '; - set = (i & 2) ? A_REVERSE | COLOR_PAIR(2) : 0; - attr = (i & 4) ? COLOR_PAIR(4) : 0; + back = (i & 1) ? (A_BOLD | 'B' | COLOR_PAIR(1)) : ' '; + set = (i & 2) ? (A_REVERSE | COLOR_PAIR(2)) : 0; + attr = (chtype) ((i & 4) ? COLOR_PAIR(4) : 0); bkgdset(back); - attrset(set); + (void) attrset(set); attr_addstr("Test string with spaces -> <-\n", attr); }