summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-19 00:47:02 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-01-19 00:47:02 +0000
commit1e3a0625c6906ba581f53bac854b184b7808fead (patch)
tree6547f0173ff770d2551c7c2c30a372d91fdf2f34
parenta1e6e2cbcc02e19dd378955664de3f98c8ea7ad6 (diff)
normalize formatting
-rw-r--r--games/mille/comp.c6
-rw-r--r--games/mille/extern.c4
-rw-r--r--games/mille/init.c4
-rw-r--r--games/mille/mille.c6
-rw-r--r--games/mille/mille.h179
-rw-r--r--games/mille/print.c4
-rw-r--r--games/mille/roll.c4
-rw-r--r--games/mille/types.c4
-rw-r--r--games/mille/varpush.c6
9 files changed, 108 insertions, 109 deletions
diff --git a/games/mille/comp.c b/games/mille/comp.c
index 044403606f4..e914fa48364 100644
--- a/games/mille/comp.c
+++ b/games/mille/comp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: comp.c,v 1.7 2009/10/27 23:59:25 deraadt Exp $ */
+/* $OpenBSD: comp.c,v 1.8 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: comp.c,v 1.4 1995/03/24 05:01:11 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-# include "mille.h"
+#include "mille.h"
/*
* @(#)comp.c 1.1 (Berkeley) 4/1/82
@@ -45,7 +45,7 @@ calcmove()
int *value;
PLAY *pp, *op;
bool foundend, cango, canstop, foundlow;
- unsgn int i, count200, badcount, nummin, nummax, diff;
+ unsigned int i, count200, badcount, nummin, nummax, diff;
int curmin, curmax;
CARD safe, oppos;
int valbuf[HAND_SZ], count[NUM_CARDS];
diff --git a/games/mille/extern.c b/games/mille/extern.c
index c84f20eaf17..1759707d3d0 100644
--- a/games/mille/extern.c
+++ b/games/mille/extern.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.c,v 1.6 2009/10/27 23:59:25 deraadt Exp $ */
+/* $OpenBSD: extern.c,v 1.7 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: extern.c,v 1.4 1995/03/24 05:01:36 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-# 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 20aeb99e2fb..4e7c473efc3 100644
--- a/games/mille/init.c
+++ b/games/mille/init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init.c,v 1.7 2014/11/03 22:18:15 tedu Exp $ */
+/* $OpenBSD: init.c,v 1.8 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: init.c,v 1.5 1995/03/24 05:01:40 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-# 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 3d22c25f9fc..7fa5a08ecbc 100644
--- a/games/mille/mille.c
+++ b/games/mille/mille.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mille.c,v 1.19 2013/08/29 20:22:15 naddy Exp $ */
+/* $OpenBSD: mille.c,v 1.20 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: mille.c,v 1.4 1995/03/24 05:01:48 cgd Exp $ */
/*
@@ -30,8 +30,8 @@
* SUCH DAMAGE.
*/
-# include "mille.h"
-# include <signal.h>
+#include "mille.h"
+#include <signal.h>
/*
* @(#)mille.c 1.3 (Berkeley) 5/10/83
diff --git a/games/mille/mille.h b/games/mille/mille.h
index 4006f1f8174..b066e0e5731 100644
--- a/games/mille/mille.h
+++ b/games/mille/mille.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mille.h,v 1.10 2013/08/29 20:22:16 naddy Exp $ */
+/* $OpenBSD: mille.h,v 1.11 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: mille.h,v 1.5 1995/03/24 05:01:51 cgd Exp $ */
/*
@@ -32,18 +32,18 @@
* @(#)mille.h 8.1 (Berkeley) 5/31/93
*/
-# include <sys/types.h>
-# include <sys/uio.h>
-# include <sys/stat.h>
-# include <ctype.h>
-# include <err.h>
-# include <errno.h>
-# include <curses.h>
-# include <fcntl.h>
-# include <stdlib.h>
-# include <string.h>
-# include <termios.h>
-# include <unistd.h>
+#include <sys/types.h>
+#include <sys/uio.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <err.h>
+#include <errno.h>
+#include <curses.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
/*
* @(#)mille.h 1.1 (Berkeley) 4/1/82
@@ -53,106 +53,105 @@
* Miscellaneous constants
*/
-# define unsgn unsigned
-# define CARD short
+#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 safety 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 safety 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
*/
-# 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_ */
+#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
typedef struct {
bool coups[NUM_SAFE];
@@ -187,11 +186,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 9b4d693552c..1f209d289b1 100644
--- a/games/mille/print.c
+++ b/games/mille/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.6 2009/10/27 23:59:25 deraadt Exp $ */
+/* $OpenBSD: print.c,v 1.7 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: print.c,v 1.4 1995/03/24 05:02:02 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-# include "mille.h"
+#include "mille.h"
/*
* @(#)print.c 1.1 (Berkeley) 4/1/82
diff --git a/games/mille/roll.c b/games/mille/roll.c
index 9b662085ef9..d0450d50ee5 100644
--- a/games/mille/roll.c
+++ b/games/mille/roll.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: roll.c,v 1.6 2013/08/29 20:22:16 naddy Exp $ */
+/* $OpenBSD: roll.c,v 1.7 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: roll.c,v 1.4 1995/03/24 05:02:07 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-# include "mille.h"
+#include "mille.h"
/*
* This routine rolls ndie nside-sided dice.
diff --git a/games/mille/types.c b/games/mille/types.c
index 7c598537222..aaedb5b2fe1 100644
--- a/games/mille/types.c
+++ b/games/mille/types.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.c,v 1.7 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: types.c,v 1.8 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: types.c,v 1.4 1995/03/24 05:02:22 cgd Exp $ */
/*
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*/
-# 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 5d2855315e4..ea3aa451cd4 100644
--- a/games/mille/varpush.c
+++ b/games/mille/varpush.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: varpush.c,v 1.7 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: varpush.c,v 1.8 2015/01/19 00:47:01 deraadt Exp $ */
/* $NetBSD: varpush.c,v 1.4 1995/03/24 05:02:35 cgd Exp $ */
/*
@@ -30,8 +30,8 @@
* SUCH DAMAGE.
*/
-# include <paths.h>
-# include "mille.h"
+#include <paths.h>
+#include "mille.h"
/*
* @(#)varpush.c 1.1 (Berkeley) 4/1/82