diff options
author | dholland <dholland@NetBSD.org> | 2009-08-12 07:28:40 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-08-12 07:28:40 +0000 |
commit | 8b1c71ee649fb41155da92995044e451c39ea700 (patch) | |
tree | 24e74c8d453828689bfeac45e6162912f3c42d76 /hack/hack.mon.c | |
parent | 31f496067cd42ce5ff71163efa5921ab6522e4aa (diff) | |
download | bsdgames-darwin-8b1c71ee649fb41155da92995044e451c39ea700.tar.gz bsdgames-darwin-8b1c71ee649fb41155da92995044e451c39ea700.tar.zst bsdgames-darwin-8b1c71ee649fb41155da92995044e451c39ea700.zip |
sprinkle static
Diffstat (limited to 'hack/hack.mon.c')
-rw-r--r-- | hack/hack.mon.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/hack/hack.mon.c b/hack/hack.mon.c index 8ee9b470..cea68bf0 100644 --- a/hack/hack.mon.c +++ b/hack/hack.mon.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.mon.c,v 1.9 2009/06/07 18:30:39 dholland Exp $ */ +/* $NetBSD: hack.mon.c,v 1.10 2009/08/12 07:28:41 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.mon.c,v 1.9 2009/06/07 18:30:39 dholland Exp $"); +__RCSID("$NetBSD: hack.mon.c,v 1.10 2009/08/12 07:28:41 dholland Exp $"); #endif /* not lint */ #include <stdlib.h> @@ -75,13 +75,20 @@ __RCSID("$NetBSD: hack.mon.c,v 1.9 2009/06/07 18:30:39 dholland Exp $"); #define NULL (char *) 0 #endif -int warnlevel; /* used by movemon and dochugw */ -long lastwarntime; -int lastwarnlev; -const char *const warnings[] = { +static int warnlevel; /* used by movemon and dochugw */ +static long lastwarntime; +static int lastwarnlev; + +static const char *const warnings[] = { "white", "pink", "red", "ruby", "purple", "black" }; +static int dochugw(struct monst *); +static void mpickgold(struct monst *); +static void mpickgems(struct monst *); +static void dmonsfree(void); +static int ishuman(struct monst *); + void movemon(void) { @@ -206,7 +213,7 @@ youswld(struct monst *mtmp, int dam, int die, const char *name) #endif } -int +static int dochugw(struct monst *mtmp) { int x = mtmp->mx; @@ -540,7 +547,7 @@ postmov: return (mmoved); } -void +static void mpickgold(struct monst *mtmp) { struct gold *gold; @@ -552,7 +559,7 @@ mpickgold(struct monst *mtmp) } } -void +static void mpickgems(struct monst *mtmp) { struct obj *otmp; @@ -746,7 +753,7 @@ relmon(struct monst *mon) * we do not free monsters immediately, in order to have their name available * shortly after their demise */ -struct monst *fdmon; /* chain of dead monsters, need not to be +static struct monst *fdmon; /* chain of dead monsters, need not to be * saved */ void @@ -756,7 +763,7 @@ monfree(struct monst *mtmp) fdmon = mtmp; } -void +static void dmonsfree(void) { struct monst *mtmp; @@ -986,7 +993,7 @@ mnexto(struct monst *mtmp) pmon(mtmp); } -int +static int ishuman(struct monst *mtmp) { return (mtmp->data->mlet == '@'); |