Home | History | Annotate | Download | only in battlestar
History log of /src/games/battlestar/parse.c
RevisionDateAuthorComments
 1.18  02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.17  06-Feb-2020  fox games/battlestar: Replace snprintf(3) with strlcpy(3) for better performance.

Reviewed by: kamil@
 1.16  05-Feb-2020  fox games/battlestar: Fix the -Werror=restrict warning.

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@
 1.15  01-Jul-2005  jmc branches: 1.15.84;
KNF and WARNS=3
 1.14  27-Jan-2004  jsm Remove uses of __P.
 1.13  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22269, verified by myself.
 1.12  19-Jun-2001  wiz `existent', not `existant'
 1.11  24-Sep-2000  jsm Make hash table static in parse.c.
 1.10  24-Sep-2000  jsm Make functions local to parse.c static.
 1.9  22-Sep-2000  jsm Remove all adjectives in parse(), since they are nowhere used. Fixes
crash on "carry old all" shown up by fuzz testing. Patch from Paul
Janzen <pjanzen@foatdi.harvard.edu>.
 1.8  21-Sep-2000  jsm 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.
 1.7  10-Feb-1999  hubertf Const poisoning, per PR 6660 by Joseph Myers <jsm28@cam.ac.uk>
 1.6  11-Oct-1997  lukem KNFify (with indent)
 1.5  10-Oct-1997  lukem WARNSify
 1.4  07-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.3  21-Mar-1995  cgd clean up import
 1.2  01-Aug-1993  mycroft Add RCS identifiers.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3  28-Dec-1996  tls Import from 4.4BSD-Lite2
 1.1.1.2  21-Mar-1995  cgd from Lite
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.15.84.1  08-Apr-2020  martin Merge changes from current as of 20200406

RSS XML Feed