Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/hunt/huntd sprinkle static
details: https://anonhg.NetBSD.org/src/rev/d85e669c7f37
branches: trunk
changeset: 794989:d85e669c7f37
user: dholland <dholland%NetBSD.org@localhost>
date: Sat Mar 29 21:33:41 2014 +0000
description:
sprinkle static
diffstat:
games/hunt/huntd/driver.c | 16 +++++++++++-----
games/hunt/huntd/expl.c | 8 ++++++--
games/hunt/huntd/extern.c | 12 ++----------
games/hunt/huntd/hunt.h | 17 ++---------------
4 files changed, 21 insertions(+), 32 deletions(-)
diffs (155 lines):
diff -r 0d466ac4ec0d -r d85e669c7f37 games/hunt/huntd/driver.c
--- a/games/hunt/huntd/driver.c Sat Mar 29 21:33:39 2014 +0000
+++ b/games/hunt/huntd/driver.c Sat Mar 29 21:33:41 2014 +0000
@@ -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 @@
#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 @@
#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 -r 0d466ac4ec0d -r d85e669c7f37 games/hunt/huntd/expl.c
--- a/games/hunt/huntd/expl.c Sat Mar 29 21:33:39 2014 +0000
+++ b/games/hunt/huntd/expl.c Sat Mar 29 21:33:41 2014 +0000
@@ -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 -r 0d466ac4ec0d -r d85e669c7f37 games/hunt/huntd/extern.c
--- a/games/hunt/huntd/extern.c Sat Mar 29 21:33:39 2014 +0000
+++ b/games/hunt/huntd/extern.c Sat Mar 29 21:33:41 2014 +0000
@@ -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 @@
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 *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 -r 0d466ac4ec0d -r d85e669c7f37 games/hunt/huntd/hunt.h
--- a/games/hunt/huntd/hunt.h Sat Mar 29 21:33:39 2014 +0000
+++ b/games/hunt/huntd/hunt.h Sat Mar 29 21:33:41 2014 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index