diff options
author | dholland <dholland@NetBSD.org> | 2009-08-12 06:19:17 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-08-12 06:19:17 +0000 |
commit | 31f496067cd42ce5ff71163efa5921ab6522e4aa (patch) | |
tree | 91bcc67080a700414d760c85ef7a3cd21fb0319b /gomoku/main.c | |
parent | 9b4f22d74f6cba399615723bd7b666b854c15788 (diff) | |
download | bsdgames-darwin-31f496067cd42ce5ff71163efa5921ab6522e4aa.tar.gz bsdgames-darwin-31f496067cd42ce5ff71163efa5921ab6522e4aa.tar.zst bsdgames-darwin-31f496067cd42ce5ff71163efa5921ab6522e4aa.zip |
sprinkle static
Diffstat (limited to 'gomoku/main.c')
-rw-r--r-- | gomoku/main.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gomoku/main.c b/gomoku/main.c index 79c3f18a..74fd9d76 100644 --- a/gomoku/main.c +++ b/gomoku/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.19 2009/07/13 19:05:40 roy Exp $ */ +/* $NetBSD: main.c,v 1.20 2009/08/12 06:19:17 dholland Exp $ */ /* * Copyright (c) 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994\ #if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: main.c,v 1.19 2009/07/13 19:05:40 roy Exp $"); +__RCSID("$NetBSD: main.c,v 1.20 2009/08/12 06:19:17 dholland Exp $"); #endif #endif /* not lint */ @@ -63,10 +63,10 @@ __RCSID("$NetBSD: main.c,v 1.19 2009/07/13 19:05:40 roy Exp $"); int interactive = 1; /* true if interactive */ int debug; /* true if debugging */ -int test; /* both moves come from 1: input, 2: computer */ -char *prog; /* name of program */ -FILE *debugfp; /* file for debug output */ -FILE *inputfp; /* file for debug input */ +static int test; /* both moves come from 1: input, 2: computer */ +static char *prog; /* name of program */ +static FILE *debugfp; /* file for debug output */ +static FILE *inputfp; /* file for debug input */ const char pdir[4] = "-\\|/"; @@ -79,7 +79,10 @@ int movelog[BSZ * BSZ]; /* log of all the moves */ int movenum; /* current move number */ const char *plyr[2]; /* who's who */ -int main(int, char *[]); +static int readinput(FILE *); +static void misclog(const char *, ...) __printflike(1, 2); +static void quit(void) __dead; +static void quitsig(int) __dead; int main(int argc, char **argv) @@ -329,7 +332,7 @@ again: return(0); } -int +static int readinput(FILE *fp) { int c; @@ -502,7 +505,7 @@ debuglog(const char *fmt, ...) fprintf(stderr, "%s\n", buf); } -void +static void misclog(const char *fmt, ...) { va_list ap; @@ -520,7 +523,7 @@ misclog(const char *fmt, ...) printf("%s\n", buf); } -void +static void quit(void) { if (interactive) { @@ -530,7 +533,7 @@ quit(void) exit(0); } -void +static void quitsig(int dummy __unused) { quit(); |