Module Name: src Committed By: dholland Date: Sat Mar 29 21:33:41 UTC 2014
Modified Files: src/games/hunt/huntd: driver.c expl.c extern.c hunt.h Log Message: sprinkle static To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/games/hunt/huntd/driver.c cvs rdiff -u -r1.7 -r1.8 src/games/hunt/huntd/expl.c \ src/games/hunt/huntd/extern.c cvs rdiff -u -r1.23 -r1.24 src/games/hunt/huntd/hunt.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/games/hunt/huntd/driver.c diff -u src/games/hunt/huntd/driver.c:1.28 src/games/hunt/huntd/driver.c:1.29 --- src/games/hunt/huntd/driver.c:1.28 Sat Mar 29 21:27:08 2014 +++ src/games/hunt/huntd/driver.c Sat Mar 29 21:33:41 2014 @@ -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/0 #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 #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); Index: src/games/hunt/huntd/expl.c diff -u src/games/hunt/huntd/expl.c:1.7 src/games/hunt/huntd/expl.c:1.8 --- src/games/hunt/huntd/expl.c:1.7 Sat Jul 4 04:29:54 2009 +++ src/games/hunt/huntd/expl.c Sat Mar 29 21:33:41 2014 @@ -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); Index: src/games/hunt/huntd/extern.c diff -u src/games/hunt/huntd/extern.c:1.7 src/games/hunt/huntd/extern.c:1.8 --- src/games/hunt/huntd/extern.c:1.7 Sat Mar 29 19:41:10 2014 +++ src/games/hunt/huntd/extern.c Sat Mar 29 21:33:41 2014 @@ -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 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 mon 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, Index: src/games/hunt/huntd/hunt.h diff -u src/games/hunt/huntd/hunt.h:1.23 src/games/hunt/huntd/hunt.h:1.24 --- src/games/hunt/huntd/hunt.h:1.23 Sat Mar 29 21:24:26 2014 +++ src/games/hunt/huntd/hunt.h Sat Mar 29 21:33:41 2014 @@ -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;