X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftestaddch.c;h=875c8be7129cae06dd8f23c910798081ffa6d5af;hp=d0c36d434b66d2d3710bfcf59f92e325489267f9;hb=9b4c4abadc0a29999c5ddad5aa8d769fee28d687;hpb=950eed9ace2ceff30b88c20de1ef8a0ba05ac567 diff --git a/test/testaddch.c b/test/testaddch.c index d0c36d43..875c8be7 100644 --- a/test/testaddch.c +++ b/test/testaddch.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2013,2014 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 +30,7 @@ * This is an example written by Alexander V. Lukyanov , * to demonstrate an inconsistency between ncurses and SVr4 curses. * - * $Id: testaddch.c,v 1.8 2011/04/23 20:13:12 tom Exp $ + * $Id: testaddch.c,v 1.13 2020/02/02 23:34:34 tom Exp $ */ #include @@ -66,18 +67,18 @@ main( attr = (chtype) ((i & 4) ? COLOR_PAIR(4) : 0); bkgdset(back); - (void) attrset(set); + (void) attrset(AttrArg(set, 0)); 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 = (chtype) ((i & 4) ? COLOR_PAIR(4) : 0); + back = (i & 1) ? (A_BOLD | 'B' | (chtype) COLOR_PAIR(1)) : ' '; + set = (i & 2) ? (A_REVERSE | (chtype) COLOR_PAIR(2)) : 0; + attr = (chtype) ((i & 4) ? (chtype) COLOR_PAIR(4) : 0); bkgdset(back); - (void) attrset(set); + (void) attrset(AttrArg(set, 0)); attr_addstr("Test string with spaces -> <-\n", attr); }