From 42d8cf7dc7d21c36a9b19820b0e61bfa90a633a8 Mon Sep 17 00:00:00 2001 From: dholland Date: Sat, 29 Mar 2014 21:33:41 +0000 Subject: sprinkle static --- hunt/huntd/driver.c | 16 +++++++++++----- hunt/huntd/expl.c | 8 ++++++-- hunt/huntd/extern.c | 12 ++---------- hunt/huntd/hunt.h | 17 ++--------------- 4 files changed, 21 insertions(+), 32 deletions(-) (limited to 'hunt') 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 #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 @@ -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 #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 #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 #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; -- cgit v1.2.3-56-ge451