diff --git a/games/mille/comp.c b/games/mille/comp.c index 99479b3aff06..7a913612c4fc 100644 --- a/games/mille/comp.c +++ b/games/mille/comp.c @@ -1,4 +1,4 @@ -/* $NetBSD: comp.c,v 1.11 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: comp.c,v 1.12 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,17 +34,17 @@ #if 0 static char sccsid[] = "@(#)comp.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: comp.c,v 1.11 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: comp.c,v 1.12 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include "mille.h" +#include "mille.h" /* * @(#)comp.c 1.1 (Berkeley) 4/1/82 */ -# define V_VALUABLE 40 +#define V_VALUABLE 40 void calcmove(void) diff --git a/games/mille/end.c b/games/mille/end.c index e0981d060cd9..f6b821124c10 100644 --- a/games/mille/end.c +++ b/games/mille/end.c @@ -1,4 +1,4 @@ -/* $NetBSD: end.c,v 1.8 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: end.c,v 1.9 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,11 +34,11 @@ #if 0 static char sccsid[] = "@(#)end.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: end.c,v 1.8 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: end.c,v 1.9 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include "mille.h" +#include "mille.h" /* * @(#)end.c 1.1 (Berkeley) 4/1/82 @@ -85,7 +85,7 @@ finalscore(PLAY *pp) } } -# ifdef EXTRAP +#ifdef EXTRAP static int Last_tot[2]; /* last tot used for extrapolate */ /* @@ -150,4 +150,4 @@ undoex(void) pp->hand_tot -= Last_tot[i++]; } } -# endif +#endif /* EXTRAP */ diff --git a/games/mille/extern.c b/games/mille/extern.c index da46af1672df..71cb2e255a02 100644 --- a/games/mille/extern.c +++ b/games/mille/extern.c @@ -1,4 +1,4 @@ -/* $NetBSD: extern.c,v 1.8 2009/05/25 23:17:31 dholland Exp $ */ +/* $NetBSD: extern.c,v 1.9 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,11 +34,11 @@ #if 0 static char sccsid[] = "@(#)extern.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: extern.c,v 1.8 2009/05/25 23:17:31 dholland Exp $"); +__RCSID("$NetBSD: extern.c,v 1.9 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include "mille.h" +#include "mille.h" /* * @(#)extern.c 1.1 (Berkeley) 4/1/82 diff --git a/games/mille/init.c b/games/mille/init.c index 928b2ad689f3..6d6d514758d4 100644 --- a/games/mille/init.c +++ b/games/mille/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.10 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: init.c,v 1.11 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,11 +34,11 @@ #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: init.c,v 1.10 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: init.c,v 1.11 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include "mille.h" +#include "mille.h" /* * @(#)init.c 1.1 (Berkeley) 4/1/82 diff --git a/games/mille/mille.c b/games/mille/mille.c index 85cd73ffbd9a..9b269c29efb3 100644 --- a/games/mille/mille.c +++ b/games/mille/mille.c @@ -1,4 +1,4 @@ -/* $NetBSD: mille.c,v 1.17 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: mille.c,v 1.18 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -39,12 +39,12 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\ #if 0 static char sccsid[] = "@(#)mille.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: mille.c,v 1.17 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: mille.c,v 1.18 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include "mille.h" -# include +#include "mille.h" +#include /* * @(#)mille.c 1.3 (Berkeley) 5/10/83 @@ -90,11 +90,11 @@ main(int ac, char *av[]) leaveok(Score, TRUE); leaveok(Miles, TRUE); clearok(curscr, TRUE); -# ifndef PROF +#ifndef PROF srandom(getpid()); -# else +#else srandom(0); -# endif +#endif cbreak(); noecho(); signal(SIGINT, rub); diff --git a/games/mille/mille.h b/games/mille/mille.h index b4e5cb38335a..4d327e2812df 100644 --- a/games/mille/mille.h +++ b/games/mille/mille.h @@ -1,4 +1,4 @@ -/* $NetBSD: mille.h,v 1.14 2009/05/25 23:17:31 dholland Exp $ */ +/* $NetBSD: mille.h,v 1.15 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -31,18 +31,18 @@ * @(#)mille.h 8.1 (Berkeley) 5/31/93 */ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* * @(#)mille.h 1.1 (Berkeley) 4/1/82 @@ -52,119 +52,119 @@ * Miscellaneous constants */ -# define unsgn unsigned -# define CARD short +#define unsgn unsigned +#define CARD short -# define HAND_SZ 7 /* number of cards in a hand */ -# define DECK_SZ 101 /* number of cards in decks */ -# define NUM_SAFE 4 /* number of saftey cards */ -# define NUM_MILES 5 /* number of milestones types */ -# define NUM_CARDS 20 /* number of types of cards */ -# define BOARD_Y 17 /* size of board screen */ -# define BOARD_X 40 -# define MILES_Y 7 /* size of mileage screen */ -# define MILES_X 80 -# define SCORE_Y 17 /* size of score screen */ -# define SCORE_X 40 -# define MOVE_Y 10 /* Where to print move prompt */ -# define MOVE_X 20 -# define ERR_Y 15 /* Where to print errors */ -# define ERR_X 5 -# define EXT_Y 4 /* Where to put Extension */ -# define EXT_X 9 +#define HAND_SZ 7 /* number of cards in a hand */ +#define DECK_SZ 101 /* number of cards in decks */ +#define NUM_SAFE 4 /* number of saftey cards */ +#define NUM_MILES 5 /* number of milestones types */ +#define NUM_CARDS 20 /* number of types of cards */ +#define BOARD_Y 17 /* size of board screen */ +#define BOARD_X 40 +#define MILES_Y 7 /* size of mileage screen */ +#define MILES_X 80 +#define SCORE_Y 17 /* size of score screen */ +#define SCORE_X 40 +#define MOVE_Y 10 /* Where to print move prompt */ +#define MOVE_X 20 +#define ERR_Y 15 /* Where to print errors */ +#define ERR_X 5 +#define EXT_Y 4 /* Where to put Extension */ +#define EXT_X 9 -# define PLAYER 0 -# define COMP 1 +#define PLAYER 0 +#define COMP 1 -# define W_SMALL 0 /* Small (initial) window */ -# define W_FULL 1 /* Full (final) window */ +#define W_SMALL 0 /* Small (initial) window */ +#define W_FULL 1 /* Full (final) window */ /* * Move types */ -# define M_DISCARD 0 -# define M_DRAW 1 -# define M_PLAY 2 -# define M_ORDER 3 +#define M_DISCARD 0 +#define M_DRAW 1 +#define M_PLAY 2 +#define M_ORDER 3 /* * Scores */ -# define SC_SAFETY 100 -# define SC_ALL_SAFE 300 -# define SC_COUP 300 -# define SC_TRIP 400 -# define SC_SAFE 300 -# define SC_DELAY 300 -# define SC_EXTENSION 200 -# define SC_SHUT_OUT 500 +#define SC_SAFETY 100 +#define SC_ALL_SAFE 300 +#define SC_COUP 300 +#define SC_TRIP 400 +#define SC_SAFE 300 +#define SC_DELAY 300 +#define SC_EXTENSION 200 +#define SC_SHUT_OUT 500 /* * safety descriptions */ -# undef S_UNKNOWN -# undef S_IN_HAND -# undef S_PLAYED -# undef S_GAS_SAFE -# undef S_SPARE_SAFE -# undef S_DRIVE_SAFE -# undef S_RIGHT_WAY -# undef S_CONV -# define S_UNKNOWN 0 /* location of safety unknown */ -# define S_IN_HAND 1 /* safety in player's hand */ -# define S_PLAYED 2 /* safety has been played */ -# define S_GAS_SAFE 0 /* Gas safety card index */ -# define S_SPARE_SAFE 1 /* Tire safety card index */ -# define S_DRIVE_SAFE 2 /* Driveing safety card index */ -# define S_RIGHT_WAY 3 /* Right-of-Way card index */ -# define S_CONV 15 /* conversion from C_ to S_ */ +#undef S_UNKNOWN +#undef S_IN_HAND +#undef S_PLAYED +#undef S_GAS_SAFE +#undef S_SPARE_SAFE +#undef S_DRIVE_SAFE +#undef S_RIGHT_WAY +#undef S_CONV +#define S_UNKNOWN 0 /* location of safety unknown */ +#define S_IN_HAND 1 /* safety in player's hand */ +#define S_PLAYED 2 /* safety has been played */ +#define S_GAS_SAFE 0 /* Gas safety card index */ +#define S_SPARE_SAFE 1 /* Tire safety card index */ +#define S_DRIVE_SAFE 2 /* Driveing safety card index */ +#define S_RIGHT_WAY 3 /* Right-of-Way card index */ +#define S_CONV 15 /* conversion from C_ to S_ */ /* * card numbers */ -# define C_INIT -1 -# define C_25 0 -# define C_50 1 -# define C_75 2 -# define C_100 3 -# define C_200 4 -# define C_EMPTY 5 -# define C_FLAT 6 -# define C_CRASH 7 -# define C_STOP 8 -# define C_LIMIT 9 -# define C_GAS 10 -# define C_SPARE 11 -# define C_REPAIRS 12 -# define C_GO 13 -# define C_END_LIMIT 14 -# define C_GAS_SAFE 15 -# define C_SPARE_SAFE 16 -# define C_DRIVE_SAFE 17 -# define C_RIGHT_WAY 18 +#define C_INIT -1 +#define C_25 0 +#define C_50 1 +#define C_75 2 +#define C_100 3 +#define C_200 4 +#define C_EMPTY 5 +#define C_FLAT 6 +#define C_CRASH 7 +#define C_STOP 8 +#define C_LIMIT 9 +#define C_GAS 10 +#define C_SPARE 11 +#define C_REPAIRS 12 +#define C_GO 13 +#define C_END_LIMIT 14 +#define C_GAS_SAFE 15 +#define C_SPARE_SAFE 16 +#define C_DRIVE_SAFE 17 +#define C_RIGHT_WAY 18 /* * prompt types */ -# define MOVEPROMPT 0 -# define REALLYPROMPT 1 -# define ANOTHERHANDPROMPT 2 -# define ANOTHERGAMEPROMPT 3 -# define SAVEGAMEPROMPT 4 -# define SAMEFILEPROMPT 5 -# define FILEPROMPT 6 -# define EXTENSIONPROMPT 7 -# define OVERWRITEFILEPROMPT 8 +#define MOVEPROMPT 0 +#define REALLYPROMPT 1 +#define ANOTHERHANDPROMPT 2 +#define ANOTHERGAMEPROMPT 3 +#define SAVEGAMEPROMPT 4 +#define SAMEFILEPROMPT 5 +#define FILEPROMPT 6 +#define EXTENSIONPROMPT 7 +#define OVERWRITEFILEPROMPT 8 -# ifdef SYSV -# define srandom(x) srand(x) -# define random() rand() -# endif /* SYSV */ +#ifdef SYSV +#define srandom(x) srand(x) +#define random() rand() +#endif /* SYSV */ typedef struct { bool coups[NUM_SAFE]; @@ -199,11 +199,11 @@ typedef struct { * macros */ -# define other(x) (1 - x) -# define nextplay() (Play = other(Play)) -# define nextwin(x) (1 - x) -# define opposite(x) (Opposite[x]) -# define is_safety(x) (x >= C_GAS_SAFE) +#define other(x) (1 - x) +#define nextplay() (Play = other(Play)) +#define nextwin(x) (1 - x) +#define opposite(x) (Opposite[x]) +#define is_safety(x) (x >= C_GAS_SAFE) /* * externals diff --git a/games/mille/print.c b/games/mille/print.c index 4988cbc24663..7ad7380fceff 100644 --- a/games/mille/print.c +++ b/games/mille/print.c @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.13 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: print.c,v 1.14 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,18 +34,18 @@ #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: print.c,v 1.13 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: print.c,v 1.14 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include "mille.h" +#include "mille.h" /* * @(#)print.c 1.1 (Berkeley) 4/1/82 */ -# define COMP_STRT 20 -# define CARD_STRT 2 +#define COMP_STRT 20 +#define CARD_STRT 2 void prboard(void) diff --git a/games/mille/roll.c b/games/mille/roll.c index 8e34d366f8b5..7d8912c0d5ef 100644 --- a/games/mille/roll.c +++ b/games/mille/roll.c @@ -1,4 +1,4 @@ -/* $NetBSD: roll.c,v 1.8 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: roll.c,v 1.9 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,11 +34,11 @@ #if 0 static char sccsid[] = "@(#)roll.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: roll.c,v 1.8 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: roll.c,v 1.9 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include "mille.h" +#include "mille.h" /* * This routine rolls ndie nside-sided dice. diff --git a/games/mille/table.c b/games/mille/table.c index 084d5d0127e7..3fde2d89444c 100644 --- a/games/mille/table.c +++ b/games/mille/table.c @@ -1,4 +1,4 @@ -/* $NetBSD: table.c,v 1.9 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: table.c,v 1.10 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -39,17 +39,17 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\ #if 0 static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: table.c,v 1.9 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: table.c,v 1.10 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# define DEBUG +#define DEBUG /* * @(#)table.c 1.1 (Berkeley) 4/1/82 */ -# include "mille.h" +#include "mille.h" int main(int, char **); diff --git a/games/mille/types.c b/games/mille/types.c index 0b6cb93f0acf..6a81d8f0a246 100644 --- a/games/mille/types.c +++ b/games/mille/types.c @@ -1,4 +1,4 @@ -/* $NetBSD: types.c,v 1.9 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: types.c,v 1.10 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,11 +34,11 @@ #if 0 static char sccsid[] = "@(#)types.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: types.c,v 1.9 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: types.c,v 1.10 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include "mille.h" +#include "mille.h" /* * @(#)types.c 1.1 (Berkeley) 4/1/82 diff --git a/games/mille/varpush.c b/games/mille/varpush.c index 67f061da21f3..8b71d9a74d4a 100644 --- a/games/mille/varpush.c +++ b/games/mille/varpush.c @@ -1,4 +1,4 @@ -/* $NetBSD: varpush.c,v 1.9 2009/05/25 23:24:54 dholland Exp $ */ +/* $NetBSD: varpush.c,v 1.10 2009/05/25 23:34:50 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -34,12 +34,12 @@ #if 0 static char sccsid[] = "@(#)varpush.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: varpush.c,v 1.9 2009/05/25 23:24:54 dholland Exp $"); +__RCSID("$NetBSD: varpush.c,v 1.10 2009/05/25 23:34:50 dholland Exp $"); #endif #endif /* not lint */ -# include -# include "mille.h" +#include +#include "mille.h" /* * @(#)varpush.c 1.1 (Berkeley) 4/1/82