diff options
author | tb <tb@cvs.openbsd.org> | 2015-12-02 20:05:02 +0000 |
---|---|---|
committer | tb <tb@cvs.openbsd.org> | 2015-12-02 20:05:02 +0000 |
commit | 049da74b0ac300af44fce13a2c6191cbb2821d36 (patch) | |
tree | e2fc31fd52cde87af3074967ee98c09730bb9288 /games/backgammon/common_source | |
parent | bb9627365956b6079bdee0eb687235f1d7c185ce (diff) |
Drop the argument passing between backgammon and teachgammon.
It's broken. Instead, make -d imply -n. You're supposed to
know the rules before you start tweaking them.
Issue reported by and ok pjanzen@
Patient help with the manual jmc@
Diffstat (limited to 'games/backgammon/common_source')
-rw-r--r-- | games/backgammon/common_source/back.h | 4 | ||||
-rw-r--r-- | games/backgammon/common_source/init.c | 4 | ||||
-rw-r--r-- | games/backgammon/common_source/subs.c | 7 |
3 files changed, 4 insertions, 11 deletions
diff --git a/games/backgammon/common_source/back.h b/games/backgammon/common_source/back.h index 06c84176814..4685ef965c2 100644 --- a/games/backgammon/common_source/back.h +++ b/games/backgammon/common_source/back.h @@ -1,4 +1,4 @@ -/* $OpenBSD: back.h,v 1.13 2014/04/25 20:23:37 schwarze Exp $ */ +/* $OpenBSD: back.h,v 1.14 2015/12/02 20:05:01 tb Exp $ */ /* * Copyright (c) 1980, 1993 @@ -75,8 +75,6 @@ extern int pnum; /* color of player: 1 = red 0 = both 2 = not yet init'ed */ -extern char args[100]; /* args passed to teachgammon and back */ -extern int acnt; /* length of args */ extern int aflag; /* flag to ask for rules or instructions */ extern int cflag; /* case conversion flag */ extern int hflag; /* flag for cleaning screen */ diff --git a/games/backgammon/common_source/init.c b/games/backgammon/common_source/init.c index 50ed7b357fe..9d12d148c1f 100644 --- a/games/backgammon/common_source/init.c +++ b/games/backgammon/common_source/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.10 2009/10/27 23:59:23 deraadt Exp $ */ +/* $OpenBSD: init.c,v 1.11 2015/12/02 20:05:01 tb Exp $ */ /* * Copyright (c) 1980, 1993 @@ -48,7 +48,6 @@ int pnum = 2; /* color of player: 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 cflag = 0; /* case conversion flag */ int hflag = 1; /* flag for cleaning screen */ @@ -68,7 +67,6 @@ int *inopp; int *inptr; int *offopp; int *offptr; -char args[100]; int bar; int begscr; int board[26]; diff --git a/games/backgammon/common_source/subs.c b/games/backgammon/common_source/subs.c index 7e2c62f9837..b9c4ef1cc1a 100644 --- a/games/backgammon/common_source/subs.c +++ b/games/backgammon/common_source/subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subs.c,v 1.21 2015/11/30 08:19:25 tb Exp $ */ +/* $OpenBSD: subs.c,v 1.22 2015/12/02 20:05:01 tb Exp $ */ /* * Copyright (c) 1980, 1993 @@ -197,7 +197,6 @@ getarg(int argc, char **argv) if (rflag) break; aflag = 0; - args[acnt++] = 'n'; break; case 'b': /* player is both red and white */ @@ -205,7 +204,6 @@ getarg(int argc, char **argv) break; pnum = 0; aflag = 0; - args[acnt++] = 'b'; break; case 'r': /* player is red */ @@ -213,7 +211,6 @@ getarg(int argc, char **argv) break; pnum = -1; aflag = 0; - args[acnt++] = 'r'; break; case 'w': /* player is white */ @@ -221,7 +218,6 @@ getarg(int argc, char **argv) break; pnum = 1; aflag = 0; - args[acnt++] = 'w'; break; case 's': /* restore saved game */ @@ -230,6 +226,7 @@ getarg(int argc, char **argv) case 'd': /* disable doubling */ dflag = 0; + aflag = 0; break; default: /* print cmdline options */ |