X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fbs.c;h=aeb92f30a6caf6320462ae66941921c8a66dbde0;hp=c158cbb07251847f3b10bf155f943d5a102f8210;hb=29a36e53e1f77a0c3672f2e267d573823d6a9a60;hpb=89407f55b3f245bea3a8884c074940cd325ec3da diff --git a/test/bs.c b/test/bs.c index c158cbb0..aeb92f30 100644 --- a/test/bs.c +++ b/test/bs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. * + * Copyright (c) 1998-2014,2016 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.62 2013/11/16 19:57:56 tom Exp $ + * $Id: bs.c,v 1.64 2016/08/21 00:03:32 tom Exp $ */ #include @@ -214,7 +214,7 @@ announceopts(void) static void intro(void) { - char *tmpname; + const char *tmpname; srand((unsigned) (time(0L) + getpid())); /* Kick the random number generator */ @@ -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++) @@ -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]); @@ -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));