* v2.0 featuring strict ANSI/POSIX conformance, November 1993.
* v2.1 with ncurses mouse support, September 1995
*
- * $Id: bs.c,v 1.48 2009/08/29 19:02:25 tom Exp $
+ * $Id: bs.c,v 1.50 2009/10/24 21:24:24 tom Exp $
*/
#include <test.priv.h>
if ((tmpname = getlogin()) != 0) {
(void) strcpy(name, tmpname);
- name[0] = toupper(UChar(name[0]));
+ name[0] = (char) toupper(UChar(name[0]));
} else
(void) strcpy(name, dftname);
/* get a command letter */
prompt(1, "Type one of [%s] to pick a ship.", docked + 1);
do {
- c = getcoord(PLAYER);
+ c = (char) getcoord(PLAYER);
} while
(!strchr(docked, c));
}
do {
- c = getch();
+ c = (char) getch();
} while
(!(strchr("hjklrR", c) || c == FF));
break;
}
hit = IS_SHIP(board[COMPUTER][curx][cury]);
- hits[PLAYER][curx][cury] = (hit ? MARK_HIT : MARK_MISS);
+ hits[PLAYER][curx][cury] = (char) (hit ? MARK_HIT : MARK_MISS);
cgoto(cury, curx);
#ifdef A_COLOR
if (has_colors()) {
bool hit, sunk;
ship_t *ss = NULL;
- hits[COMPUTER][x][y] = (hit = (board[PLAYER][x][y])) ? MARK_HIT : MARK_MISS;
+ hit = board[PLAYER][x][y] ? MARK_HIT : MARK_MISS;
+ hits[COMPUTER][x][y] = (char) hit;
(void) mvprintw(PROMPTLINE, 0,
"I shoot at %c%d. I %s!", y + 'A', x, hit ? "hit" :
"miss");
++cpuwon;
else
++plywon;
- j = 18 + strlen(name);
+ j = 18 + (int) strlen(name);
if (plywon >= 10)
++j;
if (cpuwon >= 10)