diff options
author | Masafumi Max NAKANE <max@FreeBSD.org> | 1997-01-30 07:12:59 +0000 |
---|---|---|
committer | Masafumi Max NAKANE <max@FreeBSD.org> | 1997-01-30 07:12:59 +0000 |
commit | 7475ed31b57e18a801dff29c9292a6cc19801ef7 (patch) | |
tree | 69dd948eb7d0e51090079fb252afa1158177f968 /games/backgammon/common_source/back.h | |
parent | 6bc6b19ae5c203527ddd7de81b24c50457a502f1 (diff) | |
download | src-7475ed31b57e18a801dff29c9292a6cc19801ef7.tar.gz src-7475ed31b57e18a801dff29c9292a6cc19801ef7.zip |
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.
Notes
Notes:
svn path=/head/; revision=22114
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 b6720d3d4dee..136938c73c7d 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 */ |