X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/13a26126791f719a62e09dc51634c290ba9fdf5f..4fe1a63ce6ffadff8b945cdf09ffd497b050f11d:/mille/init.c diff --git a/mille/init.c b/mille/init.c index 368862ad..0fa3579c 100644 --- a/mille/init.c +++ b/mille/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.5 1995/03/24 05:01:40 cgd Exp $ */ +/* $NetBSD: init.c,v 1.7 1997/10/12 00:53:59 lukem Exp $ */ /* * Copyright (c) 1982, 1993 @@ -33,11 +33,12 @@ * SUCH DAMAGE. */ +#include #ifndef lint #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: init.c,v 1.5 1995/03/24 05:01:40 cgd Exp $"; +__RCSID("$NetBSD: init.c,v 1.7 1997/10/12 00:53:59 lukem Exp $"); #endif #endif /* not lint */ @@ -47,13 +48,14 @@ static char rcsid[] = "$NetBSD: init.c,v 1.5 1995/03/24 05:01:40 cgd Exp $"; * @(#)init.c 1.1 (Berkeley) 4/1/82 */ -init() { +void +init() +{ + PLAY *pp; + int i, j; + CARD card; - reg PLAY *pp; - reg int i, j; - reg CARD card; - - bzero(Numseen, sizeof Numseen); + memset(Numseen, 0, sizeof Numseen); Numgos = 0; for (i = 0; i < 2; i++) { @@ -90,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]; @@ -108,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) { @@ -166,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;