summaryrefslogtreecommitdiffstats
path: root/games/mille
diff options
context:
space:
mode:
authormestre <mestre@openbsd.org>2016-01-08 18:09:59 +0000
committermestre <mestre@openbsd.org>2016-01-08 18:09:59 +0000
commit56f9a7dc4a81dac179f24a870e2e9dfb2615d6c2 (patch)
tree6c0b0328ea9af9e522cfbb97091832eb789b7649 /games/mille
parentHeaders cleanup and also the following: (diff)
downloadwireguard-openbsd-56f9a7dc4a81dac179f24a870e2e9dfb2615d6c2.tar.xz
wireguard-openbsd-56f9a7dc4a81dac179f24a870e2e9dfb2615d6c2.zip
ANSIfy mille(6)
OK tb@
Diffstat (limited to 'games/mille')
-rw-r--r--games/mille/comp.c11
-rw-r--r--games/mille/end.c10
-rw-r--r--games/mille/init.c10
-rw-r--r--games/mille/mille.c12
-rw-r--r--games/mille/misc.c14
-rw-r--r--games/mille/move.c23
-rw-r--r--games/mille/print.c15
-rw-r--r--games/mille/roll.c5
-rw-r--r--games/mille/save.c7
-rw-r--r--games/mille/types.c9
-rw-r--r--games/mille/varpush.c6
11 files changed, 47 insertions, 75 deletions
diff --git a/games/mille/comp.c b/games/mille/comp.c
index 8ac32bc4765..76f00de3707 100644
--- a/games/mille/comp.c
+++ b/games/mille/comp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: comp.c,v 1.9 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: comp.c,v 1.10 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: comp.c,v 1.4 1995/03/24 05:01:11 cgd Exp $ */
/*
@@ -39,7 +39,7 @@
# define V_VALUABLE 40
void
-calcmove()
+calcmove(void)
{
CARD card;
int *value;
@@ -394,8 +394,7 @@ play_it:
* Return true if the given player could conceivably win with his next card.
*/
int
-onecard(pp)
- const PLAY *pp;
+onecard(const PLAY *pp)
{
CARD bat, spd, card;
@@ -427,9 +426,7 @@ onecard(pp)
}
int
-canplay(pp, op, card)
- const PLAY *pp, *op;
- CARD card;
+canplay(const PLAY *pp, const PLAY *op, CARD card)
{
switch (card) {
case C_200:
diff --git a/games/mille/end.c b/games/mille/end.c
index 06990117144..cc23f402a2c 100644
--- a/games/mille/end.c
+++ b/games/mille/end.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: end.c,v 1.7 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: end.c,v 1.8 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: end.c,v 1.4 1995/03/24 05:01:30 cgd Exp $ */
/*
@@ -41,8 +41,7 @@
* the end-of-games points to the user who deserves it (if any).
*/
void
-finalscore(pp)
- PLAY *pp;
+finalscore(PLAY *pp)
{
int temp, tot, num;
@@ -86,8 +85,7 @@ static int Last_tot[2]; /* last tot used for extrapolate */
* the end-of-games points to the user who deserves it (if any).
*/
void
-extrapolate(pp)
- PLAY *pp;
+extrapolate(PLAY *pp)
{
int x, num, tot, count;
@@ -131,7 +129,7 @@ extrapolate(pp)
}
void
-undoex()
+undoex(void)
{
PLAY *pp;
int i;
diff --git a/games/mille/init.c b/games/mille/init.c
index 86f8cf1bcb5..a86157739dd 100644
--- a/games/mille/init.c
+++ b/games/mille/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.9 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: init.c,v 1.10 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: init.c,v 1.5 1995/03/24 05:01:40 cgd Exp $ */
/*
@@ -40,7 +40,7 @@
*/
void
-init()
+init(void)
{
PLAY *pp;
int i, j;
@@ -84,7 +84,7 @@ init()
}
void
-shuffle()
+shuffle(void)
{
int i, r;
CARD temp;
@@ -99,7 +99,7 @@ shuffle()
}
void
-newboard()
+newboard(void)
{
int i;
PLAY *pp;
@@ -158,7 +158,7 @@ newboard()
}
void
-newscore()
+newscore(void)
{
int i, new;
PLAY *pp;
diff --git a/games/mille/mille.c b/games/mille/mille.c
index 63972740610..5b8684cd9ee 100644
--- a/games/mille/mille.c
+++ b/games/mille/mille.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mille.c,v 1.24 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: mille.c,v 1.25 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: mille.c,v 1.4 1995/03/24 05:01:48 cgd Exp $ */
/*
@@ -45,9 +45,7 @@
*/
int
-main(ac, av)
- int ac;
- char *av[];
+main(int ac, char *av[])
{
bool restore;
extern char *__progname;
@@ -129,8 +127,7 @@ main(ac, av)
* quit.
*/
void
-rub(dummy)
- int dummy;
+rub(int dummy)
{
(void)signal(SIGINT, SIG_IGN);
if (getyn(REALLYPROMPT))
@@ -142,8 +139,7 @@ rub(dummy)
* Time to go beddy-by
*/
void
-die(code)
- int code;
+die(int code)
{
(void)signal(SIGINT, SIG_IGN);
if (outf)
diff --git a/games/mille/misc.c b/games/mille/misc.c
index 9713b2e3507..73b238e4125 100644
--- a/games/mille/misc.c
+++ b/games/mille/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.12 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: misc.c,v 1.13 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: misc.c,v 1.4 1995/03/24 05:01:54 cgd Exp $ */
/*
@@ -57,7 +57,7 @@ error(char *str, ...)
}
CARD
-getcard()
+getcard(void)
{
int c, c1;
@@ -106,8 +106,7 @@ cont: ;
}
int
-check_ext(forcomp)
- bool forcomp;
+check_ext(bool forcomp)
{
if (End == 700) {
if (Play == PLAYER) {
@@ -158,8 +157,7 @@ done:
* also allowed. Return TRUE if the answer was yes, FALSE if no.
*/
int
-getyn(promptno)
- int promptno;
+getyn(int promptno)
{
char c;
@@ -203,7 +201,7 @@ getyn(promptno)
* it. Exit appropriately.
*/
void
-check_more()
+check_more(void)
{
On_exit = TRUE;
if (Player[PLAYER].total >= 5000 || Player[COMP].total >= 5000) {
@@ -230,7 +228,7 @@ check_more()
}
int
-readch()
+readch(void)
{
int cnt;
static char c;
diff --git a/games/mille/move.c b/games/mille/move.c
index b75a5107ca1..163f85dfe66 100644
--- a/games/mille/move.c
+++ b/games/mille/move.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: move.c,v 1.16 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: move.c,v 1.17 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: move.c,v 1.4 1995/03/24 05:01:57 cgd Exp $ */
/*
@@ -44,7 +44,7 @@
*/
void
-domove()
+domove(void)
{
PLAY *pp;
int i, j;
@@ -148,7 +148,7 @@ acc:
* the game is over
*/
void
-check_go()
+check_go(void)
{
CARD card;
PLAY *pp, *op;
@@ -179,8 +179,7 @@ check_go()
}
int
-playcard(pp)
- PLAY *pp;
+playcard(PLAY *pp)
{
int v;
CARD card;
@@ -326,7 +325,7 @@ protected:
}
void
-getmove()
+getmove(void)
{
char c;
#ifdef DEBUG
@@ -462,8 +461,7 @@ ret:
* return whether or not the player has picked
*/
int
-haspicked(pp)
- const PLAY *pp;
+haspicked(const PLAY *pp)
{
int card;
@@ -482,8 +480,7 @@ haspicked(pp)
}
void
-account(card)
- CARD card;
+account(CARD card)
{
CARD oppos;
@@ -508,8 +505,7 @@ account(card)
}
void
-prompt(promptno)
- int promptno;
+prompt(int promptno)
{
static const char *const names[] = {
">>:Move:",
@@ -540,8 +536,7 @@ prompt(promptno)
}
void
-sort(hand)
- CARD *hand;
+sort(CARD *hand)
{
CARD *cp, *tp;
CARD temp;
diff --git a/games/mille/print.c b/games/mille/print.c
index 1400e423ddc..f5341f6e4dc 100644
--- a/games/mille/print.c
+++ b/games/mille/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.8 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: print.c,v 1.9 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: print.c,v 1.4 1995/03/24 05:02:02 cgd Exp $ */
/*
@@ -40,7 +40,7 @@
# define CARD_STRT 2
void
-prboard()
+prboard(void)
{
PLAY *pp;
int i, j, k, temp;
@@ -95,9 +95,7 @@ prboard()
* Show the given card if it is different from the last one shown
*/
void
-show_card(y, x, c, lc)
- int y, x;
- CARD c, *lc;
+show_card(int y, int x, CARD c, CARD *lc)
{
if (c == *lc)
return;
@@ -109,8 +107,7 @@ show_card(y, x, c, lc)
static char Score_fmt[] = "%4d";
void
-prscore(for_real)
- bool for_real;
+prscore(bool for_real)
{
PLAY *pp;
int x;
@@ -156,9 +153,7 @@ prscore(for_real)
* showed it.
*/
void
-show_score(y, x, s, ls)
- int y, x;
- int s, *ls;
+show_score(int y, int x, int s, int *ls)
{
if (s == *ls)
return;
diff --git a/games/mille/roll.c b/games/mille/roll.c
index 79eea998b1e..07b2d39325f 100644
--- a/games/mille/roll.c
+++ b/games/mille/roll.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: roll.c,v 1.8 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: roll.c,v 1.9 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: roll.c,v 1.4 1995/03/24 05:02:07 cgd Exp $ */
/*
@@ -42,8 +42,7 @@
*/
int
-roll(ndie, nsides)
- int ndie, nsides;
+roll(int ndie, int nsides)
{
int tot;
diff --git a/games/mille/save.c b/games/mille/save.c
index 87021c480fc..a495f69146f 100644
--- a/games/mille/save.c
+++ b/games/mille/save.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: save.c,v 1.11 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: save.c,v 1.12 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: save.c,v 1.4 1995/03/24 05:02:13 cgd Exp $ */
/*
@@ -51,7 +51,7 @@ typedef struct stat STAT;
* Returns FALSE if it couldn't be done.
*/
bool
-save()
+save(void)
{
char *sp;
int outf;
@@ -136,8 +136,7 @@ over:
* be cleaned up before the game starts.
*/
bool
-rest_f(file)
- const char *file;
+rest_f(const char *file)
{
char *sp;
int inf;
diff --git a/games/mille/types.c b/games/mille/types.c
index f239ec7ca41..e054a7fcfb1 100644
--- a/games/mille/types.c
+++ b/games/mille/types.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.c,v 1.9 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: types.c,v 1.10 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: types.c,v 1.4 1995/03/24 05:02:22 cgd Exp $ */
/*
@@ -39,16 +39,14 @@
*/
int
-is_repair(card)
- CARD card;
+is_repair(CARD card)
{
return card == C_GAS || card == C_SPARE ||
card == C_REPAIRS || card == C_INIT;
}
int
-safety(card)
- CARD card;
+safety(CARD card)
{
switch (card) {
case C_EMPTY:
@@ -71,5 +69,4 @@ safety(card)
return C_RIGHT_WAY;
}
errx(1, "safety() failed; please submit bug report.");
- /* NOTREACHED */
}
diff --git a/games/mille/varpush.c b/games/mille/varpush.c
index af92547ddb6..6d3745d19a9 100644
--- a/games/mille/varpush.c
+++ b/games/mille/varpush.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: varpush.c,v 1.10 2016/01/08 18:05:58 mestre Exp $ */
+/* $OpenBSD: varpush.c,v 1.11 2016/01/08 18:09:59 mestre Exp $ */
/* $NetBSD: varpush.c,v 1.4 1995/03/24 05:02:35 cgd Exp $ */
/*
@@ -48,9 +48,7 @@
* channel file. func() is either read or write.
*/
bool
-varpush(file, func)
- int file;
- ssize_t (*func)(int, const struct iovec *, int);
+varpush(int file, ssize_t (*func)(int, const struct iovec *, int))
{
int temp;
const struct iovec vec[] = {