diff options
author | dholland <dholland@NetBSD.org> | 2009-08-12 08:04:05 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-08-12 08:04:05 +0000 |
commit | 8916e2056e90ba2c157dfd2b98fb48837d565646 (patch) | |
tree | f7b2cd85d32a6cdf7e2f0343e90fc0b8880d6d11 /mille | |
parent | c10b9a8ce82ad7b4b287ccc5b5b576ab961aa488 (diff) | |
download | bsdgames-darwin-8916e2056e90ba2c157dfd2b98fb48837d565646.tar.gz bsdgames-darwin-8916e2056e90ba2c157dfd2b98fb48837d565646.tar.zst bsdgames-darwin-8916e2056e90ba2c157dfd2b98fb48837d565646.zip |
sprinkle static
Diffstat (limited to 'mille')
-rw-r--r-- | mille/extern.c | 14 | ||||
-rw-r--r-- | mille/mille.h | 8 | ||||
-rw-r--r-- | mille/move.c | 17 | ||||
-rw-r--r-- | mille/print.c | 11 |
4 files changed, 26 insertions, 24 deletions
diff --git a/mille/extern.c b/mille/extern.c index 71cb2e25..445bca70 100644 --- a/mille/extern.c +++ b/mille/extern.c @@ -1,4 +1,4 @@ -/* $NetBSD: extern.c,v 1.9 2009/05/25 23:34:50 dholland Exp $ */ +/* $NetBSD: extern.c,v 1.10 2009/08/12 08:07:27 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: extern.c,v 1.9 2009/05/25 23:34:50 dholland Exp $"); +__RCSID("$NetBSD: extern.c,v 1.10 2009/08/12 08:07:27 dholland Exp $"); #endif #endif /* not lint */ @@ -52,9 +52,9 @@ bool Debug, /* set if debugging code on */ Saved; /* set if game just saved */ char Initstr[INITSTR_SIZE]; /* initial string for error field */ -const char *C_fmt = "%-18.18s", /* format for printing cards */ - *Fromfile = NULL, /* startup file for game */ - *const _cn[NUM_CARDS] = { /* Card name buffer */ +const char *C_fmt = "%-18.18s"; /* format for printing cards */ +const char *Fromfile = NULL; /* startup file for game */ +static const char *const _cn[NUM_CARDS] = {/* Card name buffer */ "", "25", "50", @@ -75,8 +75,8 @@ const char *C_fmt = "%-18.18s", /* format for printing cards */ "Puncture Proof", "Driving Ace", "Right of Way" - }, - *const *C_name = &_cn[1]; /* Card names */ +}; +const char *const *C_name = &_cn[1]; /* Card names */ int Card_no, /* Card number for current move */ End, /* End value for current hand */ diff --git a/mille/mille.h b/mille/mille.h index 8103a99f..e9672a7a 100644 --- a/mille/mille.h +++ b/mille/mille.h @@ -1,4 +1,4 @@ -/* $NetBSD: mille.h,v 1.16 2009/05/25 23:44:04 dholland Exp $ */ +/* $NetBSD: mille.h,v 1.17 2009/08/12 08:07:27 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -235,7 +235,6 @@ void account(CARD); void calcmove(void); int canplay(const PLAY *, const PLAY *, CARD); int check_ext(bool); -void check_go(void); void check_more(void); void die(int) __attribute__((__noreturn__)); void domove(void); @@ -243,16 +242,13 @@ bool error(const char *, ...); void extrapolate(PLAY *); void finalscore(PLAY *); CARD getcard(void); -void getmove(void); int getyn(int); -int haspicked(const PLAY *); void init(void); int is_repair(CARD); int main(int, char **); void newboard(void); void newscore(void); int onecard(const PLAY *); -int playcard(PLAY *); void prboard(void); void prompt(int); void prscore(bool); @@ -262,8 +258,6 @@ int roll(int, int); void rub(int); int safety(CARD); bool save(void); -void show_card(int, int, CARD, CARD *); -void show_score(int, int, int, int *); void shuffle(void); void sort(CARD *); void undoex(int); diff --git a/mille/move.c b/mille/move.c index e79b0a1b..060d118c 100644 --- a/mille/move.c +++ b/mille/move.c @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: move.c,v 1.17 2009/08/12 08:07:27 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: move.c,v 1.17 2009/08/12 08:07:27 dholland Exp $"); #endif #endif /* not lint */ @@ -56,6 +56,11 @@ __RCSID("$NetBSD: move.c,v 1.16 2009/05/25 23:24:54 dholland Exp $"); #undef CTRL #define CTRL(c) (c - 'A' + 1) +static void check_go(void); +static int playcard(PLAY *); +static void getmove(void); +static int haspicked(const PLAY *); + void domove(void) { @@ -167,7 +172,7 @@ acc: * Check and see if either side can go. If they cannot, * the game is over */ -void +static void check_go(void) { CARD card; @@ -198,7 +203,7 @@ check_go(void) Finished = TRUE; } -int +static int playcard(PLAY *pp) { int v; @@ -347,7 +352,7 @@ protected: return TRUE; } -void +static void getmove(void) { char c; @@ -481,7 +486,7 @@ ret: /* * return whether or not the player has picked */ -int +static int haspicked(const PLAY *pp) { int card; diff --git a/mille/print.c b/mille/print.c index 7ad7380f..44d79f56 100644 --- a/mille/print.c +++ b/mille/print.c @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.14 2009/05/25 23:34:50 dholland Exp $ */ +/* $NetBSD: print.c,v 1.15 2009/08/12 08:07:27 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: print.c,v 1.14 2009/05/25 23:34:50 dholland Exp $"); +__RCSID("$NetBSD: print.c,v 1.15 2009/08/12 08:07:27 dholland Exp $"); #endif #endif /* not lint */ @@ -47,6 +47,9 @@ __RCSID("$NetBSD: print.c,v 1.14 2009/05/25 23:34:50 dholland Exp $"); #define COMP_STRT 20 #define CARD_STRT 2 +static void show_card(int, int, CARD, CARD *); +static void show_score(int, int, int, int *); + void prboard(void) { @@ -102,7 +105,7 @@ prboard(void) * show_card: * Show the given card if it is different from the last one shown */ -void +static void show_card(int y, int x, CARD c, CARD *lc) { if (c == *lc) @@ -165,7 +168,7 @@ prscore(for_real) * Show a score value if it is different from the last time we * showed it. */ -void +static void show_score(int y, int x, int s, int *ls) { if (s == *ls) |