Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/hunt/hunt make some globals static



details:   https://anonhg.NetBSD.org/src/rev/6d71a902f85d
branches:  trunk
changeset: 328253:6d71a902f85d
user:      dholland <dholland%NetBSD.org@localhost>
date:      Sat Mar 29 22:05:44 2014 +0000

description:
make some globals static

diffstat:

 games/hunt/hunt/hunt.c         |  13 ++++++++-----
 games/hunt/hunt/hunt_private.h |  10 +---------
 2 files changed, 9 insertions(+), 14 deletions(-)

diffs (68 lines):

diff -r db2dbe44c75b -r 6d71a902f85d games/hunt/hunt/hunt.c
--- a/games/hunt/hunt/hunt.c    Sat Mar 29 21:55:59 2014 +0000
+++ b/games/hunt/hunt/hunt.c    Sat Mar 29 22:05:44 2014 +0000
@@ -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 <sys/cdefs.h>
 #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 <sys/param.h>
@@ -57,15 +57,18 @@
 #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 -r db2dbe44c75b -r 6d71a902f85d games/hunt/hunt/hunt_private.h
--- a/games/hunt/hunt/hunt_private.h    Sat Mar 29 21:55:59 2014 +0000
+++ b/games/hunt/hunt/hunt_private.h    Sat Mar 29 22:05:44 2014 +0000
@@ -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,18 +60,10 @@
 
 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
 



Home | Main Index | Thread Index | Old Index