diff options
author | jsm <jsm@NetBSD.org> | 2000-09-21 17:44:34 +0000 |
---|---|---|
committer | jsm <jsm@NetBSD.org> | 2000-09-21 17:44:34 +0000 |
commit | 0ba05dd5a679e7723ea4b9f1426175b1651926cf (patch) | |
tree | 8beede32304395cb7418af5573f1e3b042030ca8 /battlestar/com5.c | |
parent | 66bc28438e19fafc7abecfa76bce72d10174c9be (diff) | |
download | bsdgames-darwin-0ba05dd5a679e7723ea4b9f1426175b1651926cf.tar.gz bsdgames-darwin-0ba05dd5a679e7723ea4b9f1426175b1651926cf.tar.zst bsdgames-darwin-0ba05dd5a679e7723ea4b9f1426175b1651926cf.zip |
Various improvements to parsing in battlestar, mostly from OpenBSD.
Define a constant WORDLEN. Always use this constant and NWORD where
appropriate.
Use NWORD - 1 in battlestar.c to avoid off-by-one error.
Increment wordnumber after the INVEN verb to allow it to be followed
by a comma and other actions.
Avoid overflowing elements of the words array if input words are too
long.
Parse "," as AND except when followed by a verb, to allow such
constructions as "take foo, bar, and baz". Trim AND AND which may
occur from the ", and" in such a list.
Avoid crashes from EVERYTHING in the wrong place by moving it to the
start of OBJECT AND EVERYTHING and NOUNS AND EVERYTHING sequences, and
trimming EVERYTHING AND EVERYTHING.
Diffstat (limited to 'battlestar/com5.c')
0 files changed, 0 insertions, 0 deletions