diff options
author | max <max@FreeBSD.org> | 1997-01-30 07:12:59 +0000 |
---|---|---|
committer | max <max@FreeBSD.org> | 1997-01-30 07:12:59 +0000 |
commit | 0988434e5dc03c34f02e712f48e3cd9f66e8443e (patch) | |
tree | 69dd948eb7d0e51090079fb252afa1158177f968 /games/backgammon/common_source/back.h | |
parent | 71baeec496d609059f7e6b14bd7cac2919adac98 (diff) | |
download | FreeBSD-src-0988434e5dc03c34f02e712f48e3cd9f66e8443e.zip FreeBSD-src-0988434e5dc03c34f02e712f48e3cd9f66e8443e.tar.gz |
Better handling of command-line argument:
1. Pass argc and argv to getarg and process them with getopt().
2. Instead of using an array to save arg characters, use array of
pointers and call backgammon/teachgammon with execv, instead of execl.
This should fix problems with calling teachgammon.
2.2 candidate.
Diffstat (limited to 'games/backgammon/common_source/back.h')
-rw-r--r-- | games/backgammon/common_source/back.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/games/backgammon/common_source/back.h b/games/backgammon/common_source/back.h index b6720d3..136938c 100644 --- a/games/backgammon/common_source/back.h +++ b/games/backgammon/common_source/back.h @@ -61,8 +61,8 @@ int pnum; /* color of player: 1 = red 0 = both 2 = not yet init'ed */ -char args[100]; /* args passed to teachgammon and back */ -int acnt; /* length of args */ +char *args[16]; /* args passed to teachgammon and back */ +int acnt; /* number of args */ int aflag; /* flag to ask for rules or instructions */ int bflag; /* flag for automatic board printing */ int cflag; /* case conversion flag */ |