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.end.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.end.c')
-rw-r--r-- | hack/hack.end.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/hack/hack.end.c b/hack/hack.end.c index f2fcf0de..eef8effb 100644 --- a/hack/hack.end.c +++ b/hack/hack.end.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.end.c,v 1.12 2009/06/07 20:13:18 dholland Exp $ */ +/* $NetBSD: hack.end.c,v 1.13 2009/08/12 07:28:40 dholland Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.end.c,v 1.12 2009/06/07 20:13:18 dholland Exp $"); +__RCSID("$NetBSD: hack.end.c,v 1.13 2009/08/12 07:28:40 dholland Exp $"); #endif /* not lint */ #include <signal.h> @@ -75,6 +75,14 @@ __RCSID("$NetBSD: hack.end.c,v 1.12 2009/06/07 20:13:18 dholland Exp $"); xchar maxdlevel = 1; +struct toptenentry; + +static void topten(void); +static void outheader(void); +static int outentry(int, struct toptenentry *, int); +static char *itoa(int); +static const char *ordin(int); + int dodone(void) { @@ -101,11 +109,11 @@ done1(int n __unused) /* NOTREACHED */ } -int done_stopprint; -int done_hup; +static int done_stopprint; +static int done_hup; /*ARGSUSED*/ -void +static void done_intr(int n __unused) { done_stopprint++; @@ -113,7 +121,7 @@ done_intr(int n __unused) (void) signal(SIGQUIT, SIG_IGN); } -void +static void done_hangup(int n) { done_hup++; @@ -309,9 +317,11 @@ struct toptenentry { char name[NAMSZ + 1]; char death[DTHSZ + 1]; char date[7];/* yymmdd */ -} *tt_head; +}; -void +static struct toptenentry *tt_head; + +static void topten(void) { int uid = getuid(); @@ -478,7 +488,7 @@ unlock: (void) unlink(reclock); } -void +static void outheader(void) { char linebuf[BUFSZ]; @@ -492,7 +502,7 @@ outheader(void) } /* so>0: standout line; so=0: ordinary line; so<0: no output, return length */ -int +static int outentry(int rank, struct toptenentry *t1, int so) { boolean quit = FALSE, gotkilled = FALSE, starv = FALSE; @@ -607,7 +617,7 @@ outentry(int rank, struct toptenentry *t1, int so) return /*(strlen(linebuf))*/ pos; } -char * +static char * itoa(int a) { static char buf[12]; @@ -615,7 +625,7 @@ itoa(int a) return (buf); } -const char * +static const char * ordin(int n) { int dg = n % 10; |