diff options
author | christos <christos@NetBSD.org> | 1997-10-12 21:24:24 +0000 |
---|---|---|
committer | christos <christos@NetBSD.org> | 1997-10-12 21:24:24 +0000 |
commit | 634cb6ceab3191623a3daed5e953821e3f37a4cb (patch) | |
tree | 2bb707d4d2f4e28a241cac2e70f7392be0acb329 /trek/snova.c | |
parent | a77b3f8edc13dc6efdbcf80e336689cfa1de08ab (diff) | |
download | bsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.tar.gz bsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.tar.zst bsdgames-darwin-634cb6ceab3191623a3daed5e953821e3f37a4cb.zip |
Warnsify and remove local implementations of libc functions.
Diffstat (limited to 'trek/snova.c')
-rw-r--r-- | trek/snova.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/trek/snova.c b/trek/snova.c index 8ab14646..85085f73 100644 --- a/trek/snova.c +++ b/trek/snova.c @@ -1,4 +1,4 @@ -/* $NetBSD: snova.c,v 1.3 1995/04/22 10:59:29 cgd Exp $ */ +/* $NetBSD: snova.c,v 1.4 1997/10/12 21:25:18 christos Exp $ */ /* * Copyright (c) 1980, 1993 @@ -33,15 +33,18 @@ * SUCH DAMAGE. */ +#include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)snova.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: snova.c,v 1.3 1995/04/22 10:59:29 cgd Exp $"; +__RCSID("$NetBSD: snova.c,v 1.4 1997/10/12 21:25:18 christos Exp $"); #endif #endif /* not lint */ -# include "trek.h" +#include <stdio.h> +#include <unistd.h> +#include "trek.h" /* ** CAUSE SUPERNOVA TO OCCUR @@ -64,15 +67,16 @@ static char rcsid[] = "$NetBSD: snova.c,v 1.3 1995/04/22 10:59:29 cgd Exp $"; ** override mode. */ +void snova(x, y) int x, y; { - int qx, qy; - register int ix, iy; - int f; - int dx, dy; - int n; - register struct quad *q; + int qx, qy; + int ix, iy = 0; + int f; + int dx, dy; + int n; + struct quad *q; f = 0; ix = x; @@ -146,12 +150,12 @@ int x, y; /* Enterprise caused supernova */ Game.kills += dy; if (q->bases) - killb(qx, qy, -1); + killb(qx, qy); Game.killk += dx; } else if (q->bases) - killb(qx, qy, 0); + killb(qx, qy); killd(qx, qy, (x >= 0)); q->stars = -1; q->klings = 0; |