]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/bs.c
ncurses 5.9 - patch 20141213
[ncurses.git] / test / bs.c
index ebcabc42d3bfabd7f4b75d747e30e53e60c1bc83..a74f64300ad27daf8888bea0919e2df68ab2b65d 100644 (file)
--- a/test/bs.c
+++ b/test/bs.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 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            *
@@ -34,7 +34,7 @@
  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
  * v2.1 with ncurses mouse support, September 1995
  *
- * $Id: bs.c,v 1.59 2012/12/16 00:20:49 tom Exp $
+ * $Id: bs.c,v 1.63 2014/08/09 22:27:12 tom Exp $
  */
 
 #include <test.priv.h>
@@ -174,9 +174,9 @@ static int salvo, blitz, closepack;
 
 #define        PR      (void)addstr
 
-static RETSIGTYPE uninitgame(int sig) GCC_NORETURN;
+static void uninitgame(int sig) GCC_NORETURN;
 
-static RETSIGTYPE
+static void
 uninitgame(int sig GCC_UNUSED)
 /* end the game, either normally or due to signal */
 {
@@ -369,7 +369,7 @@ initgame(void)
        MvAddCh(PYBASE + i, PXBASE - 3, (chtype) (i + 'A'));
 #ifdef A_COLOR
        if (has_colors())
-           attron((attr_t) COLOR_PAIR(COLOR_BLUE));
+           attron(COLOR_PAIR(COLOR_BLUE));
 #endif /* A_COLOR */
        (void) addch(' ');
        for (j = 0; j < BWIDTH; j++)
@@ -387,7 +387,7 @@ initgame(void)
        MvAddCh(CYBASE + i, CXBASE - 3, (chtype) (i + 'A'));
 #ifdef A_COLOR
        if (has_colors())
-           attron((attr_t) COLOR_PAIR(COLOR_BLUE));
+           attron(COLOR_PAIR(COLOR_BLUE));
 #endif /* A_COLOR */
        (void) addch(' ');
        for (j = 0; j < BWIDTH; j++)
@@ -444,7 +444,7 @@ initgame(void)
        do {
            c = (char) getcoord(PLAYER);
        } while
-           (!strchr(docked, c));
+           (!(strchr) (docked, c));
 
        if (c == 'R')
            (void) ungetch('R');
@@ -771,7 +771,7 @@ hitship(int x, int y)
                                    cgoto(y1, x1);
 #ifdef A_COLOR
                                    if (has_colors())
-                                       attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+                                       attron(COLOR_PAIR(COLOR_GREEN));
 #endif /* A_COLOR */
                                    (void) addch(MARK_MISS);
 #ifdef A_COLOR
@@ -797,7 +797,7 @@ hitship(int x, int y)
                        pgoto(y1, x1);
 #ifdef A_COLOR
                        if (has_colors())
-                           attron((attr_t) COLOR_PAIR(COLOR_RED));
+                           attron(COLOR_PAIR(COLOR_RED));
 #endif /* A_COLOR */
                        (void) addch(SHOWHIT);
 #ifdef A_COLOR
@@ -836,9 +836,9 @@ plyturn(void)
 #ifdef A_COLOR
     if (has_colors()) {
        if (hit)
-           attron((attr_t) COLOR_PAIR(COLOR_RED));
+           attron(COLOR_PAIR(COLOR_RED));
        else
-           attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+           attron(COLOR_PAIR(COLOR_GREEN));
     }
 #endif /* A_COLOR */
     (void) addch((chtype) hits[PLAYER][curx][cury]);
@@ -956,7 +956,7 @@ cpufire(int x, int y)
     bool hit, sunk;
     ship_t *ss = NULL;
 
-    hit = board[PLAYER][x][y];
+    hit = (bool) board[PLAYER][x][y];
     hits[COMPUTER][x][y] = (hit ? MARK_HIT : MARK_MISS);
     MvPrintw(PROMPTLINE, 0,
             "I shoot at %c%d. I %s!", y + 'A', x, hit ? "hit" :
@@ -969,9 +969,9 @@ cpufire(int x, int y)
 #ifdef A_COLOR
     if (has_colors()) {
        if (hit)
-           attron((attr_t) COLOR_PAIR(COLOR_RED));
+           attron(COLOR_PAIR(COLOR_RED));
        else
-           attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+           attron(COLOR_PAIR(COLOR_GREEN));
     }
 #endif /* A_COLOR */
     (void) addch((chtype) (hit ? SHOWHIT : SHOWSPLASH));