Module Name: src
Committed By: dholland
Date: Wed Aug 12 08:07:27 UTC 2009
Modified Files:
src/games/mille: extern.c mille.h move.c print.c
Log Message:
sprinkle static
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/games/mille/extern.c
cvs rdiff -u -r1.16 -r1.17 src/games/mille/mille.h src/games/mille/move.c
cvs rdiff -u -r1.14 -r1.15 src/games/mille/print.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/mille/extern.c
diff -u src/games/mille/extern.c:1.9 src/games/mille/extern.c:1.10
--- src/games/mille/extern.c:1.9 Mon May 25 23:34:50 2009
+++ src/games/mille/extern.c Wed Aug 12 08:07:27 2009
@@ -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 @@
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 @@
"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 */
Index: src/games/mille/mille.h
diff -u src/games/mille/mille.h:1.16 src/games/mille/mille.h:1.17
--- src/games/mille/mille.h:1.16 Mon May 25 23:44:04 2009
+++ src/games/mille/mille.h Wed Aug 12 08:07:27 2009
@@ -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 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 @@
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 @@
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);
Index: src/games/mille/move.c
diff -u src/games/mille/move.c:1.16 src/games/mille/move.c:1.17
--- src/games/mille/move.c:1.16 Mon May 25 23:24:54 2009
+++ src/games/mille/move.c Wed Aug 12 08:07:27 2009
@@ -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 @@
#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 @@
* 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 @@
Finished = TRUE;
}
-int
+static int
playcard(PLAY *pp)
{
int v;
@@ -347,7 +352,7 @@
return TRUE;
}
-void
+static void
getmove(void)
{
char c;
@@ -481,7 +486,7 @@
/*
* return whether or not the player has picked
*/
-int
+static int
haspicked(const PLAY *pp)
{
int card;
Index: src/games/mille/print.c
diff -u src/games/mille/print.c:1.14 src/games/mille/print.c:1.15
--- src/games/mille/print.c:1.14 Mon May 25 23:34:50 2009
+++ src/games/mille/print.c Wed Aug 12 08:07:27 2009
@@ -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 @@
#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 @@
* 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 @@
* 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)