]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/testaddch.c
ncurses 5.9 - patch 20130209
[ncurses.git] / test / testaddch.c
index d0c36d434b66d2d3710bfcf59f92e325489267f9..f0a476e10e4123ae2bb3e98480727b864b832f7b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2009,2011 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            *
  *                                                                          *
  * 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 <lav@yars.free.net>,
  * to demonstrate an inconsistency between ncurses and SVr4 curses.
  *
  * This is an example written by Alexander V. Lukyanov <lav@yars.free.net>,
  * 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.9 2013/01/13 01:02:41 tom Exp $
  */
 #include <test.priv.h>
 
  */
 #include <test.priv.h>
 
@@ -72,8 +72,8 @@ main(
     }
     addch('\n');
     for (i = 0; i < 8; i++) {
     }
     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;
+       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);
        attr = (chtype) ((i & 4) ? COLOR_PAIR(4) : 0);
 
        bkgdset(back);