summaryrefslogtreecommitdiffstats
path: root/battlestar/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* games/battlestar: Replace snprintf(3) with strlcpy(3) for better performance.fox2020-02-061-6/+6
| | | Reviewed by: kamil@
* games/battlestar: Fix the -Werror=restrict warning.fox2020-02-051-6/+6
| | | | | | | | Replace strcpy(1) with the safer snprintf(3) which guarantees NULL termination of strings. Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag. Reviewed by: kamil@
* KNF and WARNS=3jmc2005-07-011-13/+13
|
* Remove uses of __P.jsm2004-01-271-5/+5
|
* Move UCB-licensed code from 4-clause to 3-clause licence.agc2003-08-071-7/+3
| | | Patches provided by Joel Baker in PR 22269, verified by myself.
* `existent', not `existant'wiz2001-06-191-3/+3
|
* Make hash table static in parse.c.jsm2000-09-241-2/+8
|
* Make functions local to parse.c static.jsm2000-09-241-5/+9
|
* Remove all adjectives in parse(), since they are nowhere used. Fixesjsm2000-09-221-2/+13
| | | | crash on "carry old all" shown up by fuzz testing. Patch from Paul Janzen <pjanzen@foatdi.harvard.edu>.
* Various improvements to parsing in battlestar, mostly from OpenBSD.jsm2000-09-211-2/+60
| | | | | | | | | | | | | | | | | | | | 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.
* Const poisoning, per PR 6660 by Joseph Myers <jsm28@cam.ac.uk>hubertf1999-02-101-4/+4
|
* KNFify (with indent)lukem1997-10-111-11/+11
|
* WARNSifylukem1997-10-101-9/+14
|
* Sync to 4.4BSD-Lite2tls1997-01-071-4/+4
|
* clean up importcgd1995-03-211-4/+9
|
* Add RCS identifiers.mycroft1993-08-011-1/+2
|
* initial import of 386bsd-0.1 sourcescgd1993-03-211-0/+101