summaryrefslogtreecommitdiffstats
path: root/trek/shield.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/shield.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/shield.c')
-rw-r--r--trek/shield.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/trek/shield.c b/trek/shield.c
index a2345dc1..ed78e2d0 100644
--- a/trek/shield.c
+++ b/trek/shield.c
@@ -1,4 +1,4 @@
-/* $NetBSD: shield.c,v 1.4 1995/04/24 12:26:09 cgd Exp $ */
+/* $NetBSD: shield.c,v 1.5 1997/10/12 21:25:17 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -33,16 +33,18 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)shield.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: shield.c,v 1.4 1995/04/24 12:26:09 cgd Exp $";
+__RCSID("$NetBSD: shield.c,v 1.5 1997/10/12 21:25:17 christos Exp $");
#endif
#endif /* not lint */
-# include "trek.h"
-# include "getpar.h"
+#include <stdio.h>
+#include "trek.h"
+#include "getpar.h"
/*
** SHIELD AND CLOAKING DEVICE CONTROL
@@ -63,29 +65,31 @@ static char rcsid[] = "$NetBSD: shield.c,v 1.4 1995/04/24 12:26:09 cgd Exp $";
struct cvntab Udtab[] =
{
- "u", "p", (int (*)())1, 0,
- "d", "own", 0, 0,
- 0
+ { "u", "p", (cmdfun)1, 0 },
+ { "d", "own", (cmdfun)0, 0 },
+ { NULL, NULL, NULL, 0 }
};
+void
shield(f)
int f;
{
- register int i;
- char c;
- struct cvntab *r;
- char s[100];
- char *device, *dev2, *dev3;
- int ind;
- char *stat;
+ int i;
+ struct cvntab *r;
+ char s[100];
+ char *device, *dev2, *dev3;
+ int ind;
+ char *stat;
if (f > 0 && (Ship.shldup || damaged(SRSCAN)))
return;
if (f < 0)
{
/* cloaking device */
- if (Ship.ship == QUEENE)
- return (printf("Ye Faire Queene does not have the cloaking device.\n"));
+ if (Ship.ship == QUEENE) {
+ printf("Ye Faire Queene does not have the cloaking device.\n");
+ return;
+ }
device = "Cloaking device";
dev2 = "is";
ind = CLOAK;