summaryrefslogtreecommitdiffstats
path: root/trek/play.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1997-10-12 21:24:24 +0000
committerchristos <christos@NetBSD.org>1997-10-12 21:24:24 +0000
commit634cb6ceab3191623a3daed5e953821e3f37a4cb (patch)
tree2bb707d4d2f4e28a241cac2e70f7392be0acb329 /trek/play.c
parenta77b3f8edc13dc6efdbcf80e336689cfa1de08ab (diff)
downloadbsdgames-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/play.c')
-rw-r--r--trek/play.c70
1 files changed, 36 insertions, 34 deletions
diff --git a/trek/play.c b/trek/play.c
index c2815437..d0f83e01 100644
--- a/trek/play.c
+++ b/trek/play.c
@@ -1,4 +1,4 @@
-/* $NetBSD: play.c,v 1.3 1995/04/22 10:59:18 cgd Exp $ */
+/* $NetBSD: play.c,v 1.4 1997/10/12 21:25:07 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -33,17 +33,19 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)play.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: play.c,v 1.3 1995/04/22 10:59:18 cgd Exp $";
+__RCSID("$NetBSD: play.c,v 1.4 1997/10/12 21:25:07 christos Exp $");
#endif
#endif /* not lint */
-# include "trek.h"
-# include "getpar.h"
-# include <setjmp.h>
+#include <stdio.h>
+#include <setjmp.h>
+#include "trek.h"
+#include "getpar.h"
/*
** INSTRUCTION READ AND MAIN PLAY LOOP
@@ -55,46 +57,46 @@ static char rcsid[] = "$NetBSD: play.c,v 1.3 1995/04/22 10:59:18 cgd Exp $";
** attack if the move was not free, and checkcond() to check up
** on how we are doing after the move.
*/
-extern int abandon(), capture(), shield(), computer(), dcrept(),
- destruct(), dock(), help(), impulse(), lrscan(),
- warp(), dumpgame(), rest(), srscan(),
- myreset(), torped(), visual(), setwarp(), undock(), phaser();
struct cvntab Comtab[] =
{
- "abandon", "", abandon, 0,
- "ca", "pture", capture, 0,
- "cl", "oak", shield, -1,
- "c", "omputer", computer, 0,
- "da", "mages", dcrept, 0,
- "destruct", "", destruct, 0,
- "do", "ck", dock, 0,
- "help", "", help, 0,
- "i", "mpulse", impulse, 0,
- "l", "rscan", lrscan, 0,
- "m", "ove", warp, 0,
- "p", "hasers", phaser, 0,
- "ram", "", warp, 1,
- "dump", "", dumpgame, 0,
- "r", "est", rest, 0,
- "sh", "ield", shield, 0,
- "s", "rscan", srscan, 0,
- "st", "atus", srscan, -1,
- "terminate", "", myreset, 0,
- "t", "orpedo", torped, 0,
- "u", "ndock", undock, 0,
- "v", "isual", visual, 0,
- "w", "arp", setwarp, 0,
- 0
+ { "abandon", "", abandon, 0 },
+ { "ca", "pture", capture, 0 },
+ { "cl", "oak", shield, -1 },
+ { "c", "omputer", computer, 0 },
+ { "da", "mages", dcrept, 0 },
+ { "destruct", "", destruct, 0 },
+ { "do", "ck", dock, 0 },
+ { "help", "", help, 0 },
+ { "i", "mpulse", impulse, 0 },
+ { "l", "rscan", lrscan, 0 },
+ { "m", "ove", dowarp, 0 },
+ { "p", "hasers", phaser, 0 },
+ { "ram", "", dowarp, 1 },
+ { "dump", "", dumpgame, 0 },
+ { "r", "est", rest, 0 },
+ { "sh", "ield", shield, 0 },
+ { "s", "rscan", srscan, 0 },
+ { "st", "atus", srscan, -1 },
+ { "terminate", "", myreset, 0 },
+ { "t", "orpedo", torped, 0 },
+ { "u", "ndock", undock, 0 },
+ { "v", "isual", visual, 0 },
+ { "w", "arp", setwarp, 0 },
+ { NULL, NULL, NULL, 0 }
};
-myreset()
+/*ARGSUSED*/
+void
+myreset(v)
+ int v;
{
extern jmp_buf env;
longjmp(env, 1);
}
+void
play()
{
struct cvntab *r;