summaryrefslogtreecommitdiffstats
path: root/hunt
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2014-03-29 21:33:41 +0000
committerdholland <dholland@NetBSD.org>2014-03-29 21:33:41 +0000
commit42d8cf7dc7d21c36a9b19820b0e61bfa90a633a8 (patch)
tree9841126d5e8d0a4fb40469b2c3e8ee6afadc026d /hunt
parent4f2769409dd03ea8190fa24d9dfe2b9b1e1a0c53 (diff)
downloadbsdgames-darwin-42d8cf7dc7d21c36a9b19820b0e61bfa90a633a8.tar.gz
bsdgames-darwin-42d8cf7dc7d21c36a9b19820b0e61bfa90a633a8.tar.zst
bsdgames-darwin-42d8cf7dc7d21c36a9b19820b0e61bfa90a633a8.zip
sprinkle static
Diffstat (limited to 'hunt')
-rw-r--r--hunt/huntd/driver.c16
-rw-r--r--hunt/huntd/expl.c8
-rw-r--r--hunt/huntd/extern.c12
-rw-r--r--hunt/huntd/hunt.h17
4 files changed, 21 insertions, 32 deletions
diff --git a/hunt/huntd/driver.c b/hunt/huntd/driver.c
index e525aec6..b7dbd2b5 100644
--- a/hunt/huntd/driver.c
+++ b/hunt/huntd/driver.c
@@ -1,4 +1,4 @@
-/* $NetBSD: driver.c,v 1.28 2014/03/29 21:27:08 dholland Exp $ */
+/* $NetBSD: driver.c,v 1.29 2014/03/29 21:33:41 dholland Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: driver.c,v 1.28 2014/03/29 21:27:08 dholland Exp $");
+__RCSID("$NetBSD: driver.c,v 1.29 2014/03/29 21:33:41 dholland Exp $");
#endif /* not lint */
#include <sys/ioctl.h>
@@ -47,10 +47,10 @@ __RCSID("$NetBSD: driver.c,v 1.28 2014/03/29 21:27:08 dholland Exp $");
#ifdef INTERNET
-u_short Test_port = TEST_PORT;
+static u_short Test_port = TEST_PORT;
#else
-char *Sock_name = "/tmp/hunt";
-char *Stat_name = "/tmp/hunt.stats";
+static const char Sock_name[] = "/tmp/hunt";
+static const char Stat_name[] = "/tmp/hunt.stats";
#endif
static SOCKET Daemon;
@@ -66,6 +66,12 @@ static u_short stat_port; /* port # of statistics tcp socket */
#define DAEMON_SIZE (sizeof Daemon - 1)
#endif
+#ifdef VOLCANO
+static int volcano = 0; /* Explosion size */
+#endif
+
+static int Status; /* stat socket */
+
static void clear_scores(void);
static bool havechar(PLAYER *, int);
static void init(void);
diff --git a/hunt/huntd/expl.c b/hunt/huntd/expl.c
index 364ef576..4b1f72e1 100644
--- a/hunt/huntd/expl.c
+++ b/hunt/huntd/expl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: expl.c,v 1.7 2009/07/04 04:29:54 dholland Exp $ */
+/* $NetBSD: expl.c,v 1.8 2014/03/29 21:33:41 dholland Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,12 +32,16 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: expl.c,v 1.7 2009/07/04 04:29:54 dholland Exp $");
+__RCSID("$NetBSD: expl.c,v 1.8 2014/03/29 21:33:41 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
#include "hunt.h"
+
+static EXPL *Expl[EXPLEN]; /* explosion lists */
+static EXPL *Last_expl; /* last explosion on Expl[0] */
+
static void remove_wall(int, int);
diff --git a/hunt/huntd/extern.c b/hunt/huntd/extern.c
index 9faeea30..3991849d 100644
--- a/hunt/huntd/extern.c
+++ b/hunt/huntd/extern.c
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.c,v 1.7 2014/03/29 19:41:10 dholland Exp $ */
+/* $NetBSD: extern.c,v 1.8 2014/03/29 21:33:41 dholland Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: extern.c,v 1.7 2014/03/29 19:41:10 dholland Exp $");
+__RCSID("$NetBSD: extern.c,v 1.8 2014/03/29 21:33:41 dholland Exp $");
#endif /* not lint */
#include "hunt.h"
@@ -48,16 +48,12 @@ char Orig_maze[HEIGHT][WIDTH2]; /* the original maze */
struct pollfd fdset[3+MAXPL+MAXMON];
int Nplayer = 0; /* number of players */
int Socket; /* main socket */
-int Status; /* stat socket */
int See_over[NASCII]; /* lookup table for determining whether
* character represents "transparent"
* item */
BULLET *Bullets = NULL; /* linked list of bullets */
-EXPL *Expl[EXPLEN]; /* explosion lists */
-EXPL *Last_expl; /* last explosion on Expl[0] */
-
PLAYER Player[MAXPL]; /* all the players */
PLAYER *End_player = Player; /* last active player slot */
#ifdef BOOTS
@@ -69,10 +65,6 @@ PLAYER Monitor[MAXMON]; /* all the monitors */
PLAYER *End_monitor = Monitor; /* last active monitor slot */
#endif
-#ifdef VOLCANO
-int volcano = 0; /* Explosion size */
-#endif
-
int shot_req[MAXBOMB] = {
BULREQ, GRENREQ, SATREQ,
BOMB7REQ, BOMB9REQ, BOMB11REQ,
diff --git a/hunt/huntd/hunt.h b/hunt/huntd/hunt.h
index 78d1891c..bf0e4f7c 100644
--- a/hunt/huntd/hunt.h
+++ b/hunt/huntd/hunt.h
@@ -1,4 +1,4 @@
-/* $NetBSD: hunt.h,v 1.23 2014/03/29 21:24:26 dholland Exp $ */
+/* $NetBSD: hunt.h,v 1.24 2014/03/29 21:33:41 dholland Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
@@ -145,26 +145,13 @@ struct regen_def {
extern char Buf[BUFSIZ], Maze[HEIGHT][WIDTH2], Orig_maze[HEIGHT][WIDTH2];
-extern int Nplayer, Socket, Status;
+extern int Nplayer, Socket;
extern struct pollfd fdset[];
-#ifdef INTERNET
-extern u_short Test_port;
-#else
-extern char *Sock_name, *Stat_name;
-#endif
-
-#ifdef VOLCANO
-extern int volcano;
-#endif
-
extern int See_over[NASCII];
extern BULLET *Bullets;
-extern EXPL *Expl[EXPLEN];
-extern EXPL *Last_expl;
-
extern IDENT *Scores;
extern PLAYER Player[MAXPL], *End_player;