X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/0b09ff9c6eb42c5557ff22b470c03b4bca1bda5a..2fdc1bcd83cf255b8f01e2d876eef60c49044ad1:/mille/init.c diff --git a/mille/init.c b/mille/init.c index 4811f423..99d7a55a 100644 --- a/mille/init.c +++ b/mille/init.c @@ -1,3 +1,5 @@ +/* $NetBSD: init.c,v 1.8 1999/09/30 18:01:32 jsm Exp $ */ + /* * Copyright (c) 1982, 1993 * The Regents of the University of California. All rights reserved. @@ -31,9 +33,13 @@ * SUCH DAMAGE. */ +#include #ifndef lint -/*static char sccsid[] = "from: @(#)init.c 8.1 (Berkeley) 5/31/93";*/ -static char rcsid[] = "$Id: init.c,v 1.4 1994/05/12 17:39:31 jtc Exp $"; +#if 0 +static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93"; +#else +__RCSID("$NetBSD: init.c,v 1.8 1999/09/30 18:01:32 jsm Exp $"); +#endif #endif /* not lint */ # include "mille.h" @@ -42,13 +48,14 @@ static char rcsid[] = "$Id: init.c,v 1.4 1994/05/12 17:39:31 jtc Exp $"; * @(#)init.c 1.1 (Berkeley) 4/1/82 */ -init() { - - reg PLAY *pp; - reg int i, j; - reg CARD card; +void +init() +{ + PLAY *pp; + int i, j; + CARD card; - bzero(Numseen, sizeof Numseen); + memset(Numseen, 0, sizeof Numseen); Numgos = 0; for (i = 0; i < 2; i++) { @@ -62,7 +69,7 @@ init() { pp->hand[j] = *--Topcard; if (i == COMP) { account(card = *Topcard); - if (issafety(card)) + if (is_safety(card)) pp->safety[card - S_CONV] = S_IN_HAND; } } @@ -85,15 +92,16 @@ init() { End = 700; } -shuffle() { - - reg int i, r; - reg CARD temp; +void +shuffle() +{ + int i, r; + CARD temp; for (i = 0; i < DECK_SZ; i++) { r = roll(1, DECK_SZ) - 1; if (r < 0 || r > DECK_SZ - 1) { - fprintf(stderr, "shuffle: card no. error: %d\n", r); + warnx("shuffle: card no. error: %d", r); die(1); } temp = Deck[r]; @@ -103,10 +111,11 @@ shuffle() { Topcard = &Deck[DECK_SZ]; } -newboard() { - - register int i; - register PLAY *pp; +void +newboard() +{ + int i; + PLAY *pp; static int first = TRUE; if (first) { @@ -161,10 +170,11 @@ newboard() { newscore(); } -newscore() { - - reg int i, new; - register PLAY *pp; +void +newscore() +{ + int i, new; + PLAY *pp; static int was_full = -1; static int last_win = -1;