From 39baeb1c2eb138565c2e60d1375675be5e252148 Mon Sep 17 00:00:00 2001 From: dholland Date: Sat, 29 Mar 2014 22:05:44 +0000 Subject: make some globals static --- hunt/hunt/hunt.c | 13 ++++++++----- hunt/hunt/hunt_private.h | 10 +--------- 2 files changed, 9 insertions(+), 14 deletions(-) (limited to 'hunt') diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index 61838fdf..bfeac96b 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.44 2014/03/29 21:24:26 dholland Exp $ */ +/* $NetBSD: hunt.c,v 1.45 2014/03/29 22:05:44 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.44 2014/03/29 21:24:26 dholland Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.45 2014/03/29 22:05:44 dholland Exp $"); #endif /* not lint */ #include @@ -57,15 +57,18 @@ __RCSID("$NetBSD: hunt.c,v 1.44 2014/03/29 21:24:26 dholland Exp $"); #define put_str addstr #ifdef DEBUG -char *Driver = "/home/socr/a/conrad/games/src/hunt/huntd.dbg"; +static const char Driver[] = "/home/socr/a/conrad/games/src/hunt/huntd.dbg"; #else -const char *Driver = HUNTD; +static const char Driver[] = HUNTD; #endif #ifdef INTERNET -u_short Test_port = TEST_PORT; +static uint16_t Test_port = TEST_PORT; +#else +static const char Sock_name[] = "/tmp/hunt"; #endif + bool Last_player = false; #ifdef MONITOR bool Am_monitor = false; diff --git a/hunt/hunt/hunt_private.h b/hunt/hunt/hunt_private.h index 58a299c1..06963100 100644 --- a/hunt/hunt/hunt_private.h +++ b/hunt/hunt/hunt_private.h @@ -1,4 +1,4 @@ -/* $NetBSD: hunt_private.h,v 1.1 2014/03/29 21:24:26 dholland Exp $ */ +/* $NetBSD: hunt_private.h,v 1.2 2014/03/29 22:05:44 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. @@ -60,17 +60,9 @@ extern bool Last_player; -extern const char *Driver; - extern char Buf[BUFSIZ]; extern int Socket; -#ifdef INTERNET -extern u_short Test_port; -#else -extern char *Sock_name; -#endif - #ifdef INTERNET extern char *Send_message; #endif -- cgit v1.2.3-56-ge451