summaryrefslogtreecommitdiff
path: root/games/backgammon/common_source/init.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>1998-03-19 11:13:38 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>1998-03-19 11:13:38 +0000
commit4d7669b40d9f9abcc2aaa60ab11c06aa405f9c28 (patch)
treed043e0042f2e0bf39910774f8a21bfdbbef8a79a /games/backgammon/common_source/init.c
parent3cbc204cbaf2ade4f1b67ceaf65c9a6822db4f91 (diff)
NetBSD changes and further improvements and corrections
Diffstat (limited to 'games/backgammon/common_source/init.c')
-rw-r--r--games/backgammon/common_source/init.c83
1 files changed, 61 insertions, 22 deletions
diff --git a/games/backgammon/common_source/init.c b/games/backgammon/common_source/init.c
index 0f8077eb8b5..d1da6c648d0 100644
--- a/games/backgammon/common_source/init.c
+++ b/games/backgammon/common_source/init.c
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.4 1995/04/29 00:44:12 mycroft Exp $ */
+/* $OpenBSD: init.c,v 1.2 1998/03/19 11:13:21 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: init.c,v 1.4 1995/04/29 00:44:12 mycroft Exp $";
+static char rcsid[] = "$OpenBSD: init.c,v 1.2 1998/03/19 11:13:21 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -47,25 +47,64 @@ static char rcsid[] = "$NetBSD: init.c,v 1.4 1995/04/29 00:44:12 mycroft Exp $";
* variable initialization.
*/
- /* name of executable object programs */
-char EXEC[] = "/usr/games/backgammon";
-char TEACH[] = "/usr/games/teachgammon";
+#ifdef DEBUG
+#include <stdio.h>
+FILE *trace;
+#endif
+
+/* name of executable object programs */
+char EXEC[] = "/usr/games/backgammon";
+char TEACH[] = "/usr/games/teachgammon";
+
+int pnum = 2; /* color of player:
+ -1 = white
+ 1 = red
+ 0 = both
+ 2 = not yet init'ed */
+int acnt = 0; /* length of args */
+int aflag = 1; /* flag to ask for rules or instructions */
+int bflag = 0; /* flag for automatic board printing */
+int cflag = 0; /* case conversion flag */
+int hflag = 1; /* flag for cleaning screen */
+int mflag = 0; /* backgammon flag */
+int raflag = 0; /* 'roll again' flag for recovered game */
+int rflag = 0; /* recovered game flag */
+int tflag = 0; /* cursor addressing flag */
+int iroll = 0; /* special flag for inputting rolls */
+int rfl = 0;
+
+char *color[] = {"White", "Red", "white", "red"};
-int pnum = 2; /* color of player:
- -1 = white
- 1 = red
- 0 = both
- 2 = not yet init'ed */
-int acnt = 0; /* length of args */
-int aflag = 1; /* flag to ask for rules or instructions */
-int bflag = 0; /* flag for automatic board printing */
-int cflag = 0; /* case conversion flag */
-int hflag = 1; /* flag for cleaning screen */
-int mflag = 0; /* backgammon flag */
-int raflag = 0; /* 'roll again' flag for recovered game */
-int rflag = 0; /* recovered game flag */
-int tflag = 0; /* cursor addressing flag */
-int iroll = 0; /* special flag for inputting rolls */
-int rfl = 0;
-char *color[] = {"White","Red","white","red"};
+char **Colorptr;
+char **colorptr;
+int *inopp;
+int *inptr;
+int *offopp;
+int *offptr;
+char args[100];
+int bar;
+int begscr;
+int board[26];
+char cin[100];
+int colen;
+int cturn;
+int curc;
+int curr;
+int d0;
+int dice[2];
+int dlast;
+int g[5];
+int gvalue;
+int h[4];
+int home;
+int in[2];
+int mvl;
+int mvlim;
+int ncin;
+int off[2];
+int p[5];
+int rscore;
+int table[6][6];
+int wscore;
+struct termios old, noech, raw;