summaryrefslogtreecommitdiffstats
path: root/sail/game.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1997-10-13 19:42:53 +0000
committerchristos <christos@NetBSD.org>1997-10-13 19:42:53 +0000
commit7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c (patch)
treee32f911a4774980914f141c9b101745fb106eefe /sail/game.c
parentc1a3f2353b38d22d94cbc0101f3115b8e2eefc30 (diff)
downloadbsdgames-darwin-7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c.tar.gz
bsdgames-darwin-7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c.tar.zst
bsdgames-darwin-7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c.zip
Warns fixes:
use varargs properly use unsigned chars where appropriate fix typos eliminate gcc warnings
Diffstat (limited to 'sail/game.c')
-rw-r--r--sail/game.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sail/game.c b/sail/game.c
index 7dbe3e56..645c6a4d 100644
--- a/sail/game.c
+++ b/sail/game.c
@@ -1,4 +1,4 @@
-/* $NetBSD: game.c,v 1.4 1997/01/07 12:42:19 tls Exp $ */
+/* $NetBSD: game.c,v 1.5 1997/10/13 19:44:09 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -33,24 +33,26 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)game.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$NetBSD: game.c,v 1.4 1997/01/07 12:42:19 tls Exp $";
+__RCSID("$NetBSD: game.c,v 1.5 1997/10/13 19:44:09 christos Exp $");
#endif
#endif /* not lint */
#include "extern.h"
+int
maxturns(ship, af)
-register struct ship *ship;
+struct ship *ship;
char *af;
{
- register int turns;
+ int turns;
turns = ship->specs->ta;
- if (*af = (ship->file->drift > 1 && turns)) {
+ if ((*af = (ship->file->drift > 1 && turns)) != NULL) {
turns--;
if (ship->file->FS == 1)
turns = 0;
@@ -58,11 +60,12 @@ char *af;
return turns;
}
+int
maxmove(ship, dir, fs)
-register struct ship *ship;
+struct ship *ship;
int dir, fs;
{
- register int riggone = 0, Move, flank = 0;
+ int riggone = 0, Move, flank = 0;
Move = ship->specs->bs;
if (!ship->specs->rig1)