X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/9853b17d101ca569d22656507e9da0092cfad0ff..9d392898ef791c3bb126639435de44743cc5e4e8:/mille/print.c diff --git a/mille/print.c b/mille/print.c index c9ac4f95..f850371b 100644 --- a/mille/print.c +++ b/mille/print.c @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.5 1997/05/23 23:09:42 jtc Exp $ */ +/* $NetBSD: print.c,v 1.11 2003/08/07 09:37:26 agc Exp $ */ /* * Copyright (c) 1982, 1993 @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,11 +29,12 @@ * SUCH DAMAGE. */ +#include #ifndef lint #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: print.c,v 1.5 1997/05/23 23:09:42 jtc Exp $"; +__RCSID("$NetBSD: print.c,v 1.11 2003/08/07 09:37:26 agc Exp $"); #endif #endif /* not lint */ @@ -50,10 +47,11 @@ static char rcsid[] = "$NetBSD: print.c,v 1.5 1997/05/23 23:09:42 jtc Exp $"; # define COMP_STRT 20 # define CARD_STRT 2 -prboard() { - - register PLAY *pp; - register int i, j, k, temp; +void +prboard() +{ + PLAY *pp; + int i, j, k, temp; for (k = 0; k < 2; k++) { pp = &Player[k]; @@ -68,8 +66,8 @@ prboard() { show_card(14, temp, pp->battle, &pp->sh_battle); show_card(16, temp, pp->speed, &pp->sh_speed); for (i = C_25; i <= C_200; i++) { - register char *name; - register int end; + const char *name; + int end; if (pp->nummiles[i] == pp->sh_nummiles[i]) continue; @@ -87,7 +85,7 @@ prboard() { pp = &Player[PLAYER]; for (i = 0; i < HAND_SZ; i++) show_card(i + 6, temp, pp->hand[i], &pp->sh_hand[i]); - mvprintw(6, COMP_STRT + CARD_STRT, "%2d", Topcard - Deck); + mvprintw(6, COMP_STRT + CARD_STRT, "%2ld", (long)(Topcard - Deck)); show_card(8, COMP_STRT + CARD_STRT, Discard, &Sh_discard); if (End == 1000) { move(EXT_Y, EXT_X); @@ -104,9 +102,10 @@ prboard() { * show_card: * Show the given card if it is different from the last one shown */ +void show_card(y, x, c, lc) -int y, x; -register CARD c, *lc; + int y, x; + CARD c, *lc; { if (c == *lc) return; @@ -117,12 +116,16 @@ register CARD c, *lc; static char Score_fmt[] = "%4d"; +void prscore(for_real) -register bool for_real; +#ifdef EXTRAP + bool for_real; +#else + bool for_real __attribute__((__unused__)); +#endif { - - register PLAY *pp; - register int x; + PLAY *pp; + int x; stdscr = Score; for (pp = Player; pp < &Player[2]; pp++) { @@ -164,9 +167,10 @@ register bool for_real; * Show a score value if it is different from the last time we * showed it. */ +void show_score(y, x, s, ls) -int y, x; -register int s, *ls; + int y, x; + int s, *ls; { if (s == *ls) return;