Home | History | Annotate | only in /src/games/battlestar
History log of /src/games/battlestar
RevisionDateAuthorComments
 1.11 29-Oct-2019  christos Gcc-8 bug confusion with restrict on sh3
 1.10 06-Feb-2010  he branches: 1.10.46;
When using -lcurses, you also need -lterminfo.
This fixes the build for sun2, and also builds with LDSTATIC=-static,
since archive libraries don't record inter-library dependencies.
 1.9 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.8 18-Feb-1998  jtc Simply include -lcurses instead of -lcurses -ltermcap
 1.7 05-Feb-1998  christos Use -ltermcap instead of -ltermlib
 1.6 20-Nov-1997  mrg install games that need it setgid.
 1.5 21-Mar-1995  cgd branches: 1.5.4;
clean up import
 1.4 22-Dec-1994  cgd specify man pages the new way.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 23-Mar-1993  cgd got rid of unnecessary -lcompat and associated dependency
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 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.5.4.1 20-Nov-1997  mrg pull up from trunk:
- install games files with the correct permissions.
- install games that need it setgid.
 1.10.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.15 15-Sep-2005  wiz Use standard AUTHORS section header. From YOMURA Masanori in private mail
Sort sections if necessary. Use more/better markup.
 1.14 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.13 26-Apr-2003  wiz Grammar fixes, from jmc@openbsd.
 1.12 26-Sep-2002  wiz Lots of minor fixes resulting from reading these man pages in detail.
 1.11 26-Sep-2002  wiz New sentences begin on new lines.
Patch from Richard Elz, slightly improved by yours truly.
 1.10 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.9 02-Apr-2001  wiz Whitespace and/or punctuation fixes.
 1.8 08-Sep-2000  jsm Manpage improvements based on OpenBSD.
 1.7 28-Jul-1999  hubertf This patch improves the handling of save files in battlestar(6), by
allowing the user to choose the name of the save file and specify it
on the command line when restoring. It also eliminates a buffer
overrun in determining the path to the save file, and any particular
arbitrary limit on the name length. In the name of a tidier home
directory, the default name is changed from "Bstar" to ".Bstar".

Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk>
Minor modification (s/startup/filename/ in initialize()) by me.
 1.6 10-Sep-1998  frueauf Fix typo, closes pr 6137 by Joseph Myers.
 1.5 10-Oct-1997  lukem WARNSify
 1.4 21-Mar-1995  cgd clean up import
 1.3 05-Aug-1993  jtc update to -mandoc macros
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 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.16 20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
 1.15 01-Jul-2005  jmc branches: 1.15.20;
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 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.11 08-Sep-2000  jsm Make code clearer; add a macro ROOMDESC for the number of times a room
should be visited for the short description only to be used, and don't
increment beenthere[position] beyond this value. From OpenBSD.
 1.10 08-May-2000  mycroft Use setgid(), not setregid().
 1.9 18-Sep-1999  jsm Give sensible error message in a shouldn't happen case.
 1.8 28-Jul-1999  hubertf This patch improves the handling of save files in battlestar(6), by
allowing the user to choose the name of the save file and specify it
on the command line when restoring. It also eliminates a buffer
overrun in determining the path to the save file, and any particular
arbitrary limit on the name length. In the name of a tidier home
directory, the default name is changed from "Bstar" to ".Bstar".

Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk>
Minor modification (s/startup/filename/ in initialize()) by me.
 1.7 21-Jul-1999  hubertf Drop setgid privileges early. Derived from OpenBSD and sent in as PR 5970
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.20.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.14 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.13 24-Sep-2000  jsm Prevent CUMBER from going negative; avoid division by zero if it is
zero.
 1.12 17-Sep-2000  jsm Clean up formatting; partly from OpenBSD.
 1.11 08-Sep-2000  jsm Spelling and punctuation corrections or improvements from OpenBSD.
 1.10 23-Jul-2000  mycroft Rename move() to moveplayer() to avoid clashing with libcurses.
 1.9 18-Sep-1999  jsm branches: 1.9.8;
Fix -Wsign-compare warnings.
 1.8 14-Jul-1999  hubertf From PR 7987 by Joseph Myers <jsm28@cam.ac.uk>:
More battlestar(6) spelling and punctuation fixes for battlestar(6).
These ones come from OpenBSD.
 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.9.8.1 26-Jul-2000  mycroft Approved by thorpej:
Rename move() to moveplayer() to avoid clashing with libcurses.

basesrc/games/battlestar/com1.c 1.9 -> 1.10
basesrc/games/battlestar/com7.c 1.6 -> 1.7
basesrc/games/battlestar/cypher.c 1.10 -> 1.11
basesrc/games/battlestar/extern.h 1.15 -> 1.16
 1.23 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.22 02-Jun-2001  christos don't deref -1.
 1.21 25-Sep-2000  jsm In cypher(), don't attempt to make sense of words other than VERBs or
KNIFE when a verb is required. Add AUXVERB for "make", "move",
"climb" (as in "make love", "climb up") and ignore AUXVERB as a verb,
going on to the next word, instead of treating these words as
adjectives. When creating new verbs from "put on", "put down", "take
off", mark them as type VERB. Mostly from Paul Janzen
<pjanzen@foatdi.harvard.edu>.
 1.20 25-Sep-2000  jsm Add OBJ_AN flag to objflags so as to use "a" or "an" appropriately in
messages; avoids "a amulet", "a Elf". Define and use macros to use
"a", "an", "the", "is", "are" appropriately. Partly based on OpenBSD.
 1.19 25-Sep-2000  jsm Fix logic error in use of n and wordnumber in murder() when using
laser. From OpenBSD.
 1.18 24-Sep-2000  jsm Add explicit no-ops to empty loops following the NetBSD style guide.
 1.17 24-Sep-2000  jsm Correct spelling "dont" to "don't". From OpenBSD.
 1.16 23-Sep-2000  jsm Allow for the bathing goddess in ravage(). From OpenBSD.
 1.15 23-Sep-2000  jsm Use a lookup table to identify whether objects are plural or singular,
instead of testing the final character against 's' in each place.
Avoids oddities about "pot of jewels" and "compass".
 1.14 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.13 22-Sep-2000  jsm Give an appropriate error on "kill all" rather than a crash or
nonsense message. From OpenBSD.
 1.12 21-Sep-2000  jsm Don't try to wear anything that isn't OBJECT or NOUNS. Don't try to
wear DOOR or anything without a short description. Fixes crashes on
"wear knfo" (bug reported by Peter Maydell
<pmaydell@chiark.greenend.org.uk>), "wear wear", "wear kick", "wear
door" and "wear goddess". Partly from OpenBSD.
 1.11 21-Sep-2000  jsm If no hand-to-hand weapons are available, try using the laser to kill
in murder(). From OpenBSD.
 1.10 17-Sep-2000  jsm Clean up formatting; partly from OpenBSD.
 1.9 10-Sep-2000  jsm Wording, punctuation and line length improvements. Also adjust test
for killing nonsensical things to fix crash with "kill door". From
OpenBSD.
 1.8 14-Jul-1999  hubertf From PR 7987 by Joseph Myers <jsm28@cam.ac.uk>:
More battlestar(6) spelling and punctuation fixes for battlestar(6).
These ones come from OpenBSD.
 1.7 24-Aug-1998  hubertf Propperly note place-change, as reported in PR 6008 by Joseph Samuel 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.14 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.13 25-Sep-2000  jsm Use defined constant FINAL instead of hardcoded 275. From OpenBSD.
 1.12 24-Sep-2000  jsm Add explicit no-ops to empty loops following the NetBSD style guide.
 1.11 24-Sep-2000  jsm Correct spelling "dont" to "don't". From OpenBSD.
 1.10 23-Sep-2000  jsm Use a lookup table to identify whether objects are plural or singular,
instead of testing the final character against 's' in each place.
Avoids oddities about "pot of jewels" and "compass".
 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 10-Sep-2000  jsm Wording, punctuation and line length improvements. Also adjust test
for killing nonsensical things to fix crash with "kill door". From
OpenBSD.
 1.7 24-Aug-1998  hubertf Initialize return-value correctly as pointed out in PR 6007 by
Joseph Myers <jsm@octomino.demon.co.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.20 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.19 25-Sep-2000  jsm In cypher(), don't attempt to make sense of words other than VERBs or
KNIFE when a verb is required. Add AUXVERB for "make", "move",
"climb" (as in "make love", "climb up") and ignore AUXVERB as a verb,
going on to the next word, instead of treating these words as
adjectives. When creating new verbs from "put on", "put down", "take
off", mark them as type VERB. Mostly from Paul Janzen
<pjanzen@foatdi.harvard.edu>.
 1.18 25-Sep-2000  jsm Add OBJ_AN flag to objflags so as to use "a" or "an" appropriately in
messages; avoids "a amulet", "a Elf". Define and use macros to use
"a", "an", "the", "is", "are" appropriately. Partly based on OpenBSD.
 1.17 24-Sep-2000  jsm Correct spelling "dont" to "don't". From OpenBSD.
 1.16 24-Sep-2000  jsm Give a better message for trying to eat things it doesn't make sense
to eat. For something eatable, check first whether you're holding it,
then whether you have a knife, then whether you're stuffed (gives
better message for "eat coconuts" when you don't have any). From
OpenBSD.
 1.15 24-Sep-2000  jsm Attempt to disambiguate BODY for kicking. Avoid crashing or nonsense
messages on "kick door" and "kick man". From OpenBSD.
 1.14 23-Sep-2000  jsm Use a lookup table to identify whether objects are plural or singular,
instead of testing the final character against 's' in each place.
Avoids oddities about "pot of jewels" and "compass".
 1.13 22-Sep-2000  jsm Don't say "Kicked." of an object not present; give sensible messages.
From OpenBSD.
 1.12 22-Sep-2000  jsm Check for an object being taken not being there before checking for
whether it is too heavy or too bulky; gives a better message for "take
viper" with the viper not present.
 1.11 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.10 17-Sep-2000  jsm Clean up formatting; partly from OpenBSD.
 1.9 10-Sep-2000  jsm Wording, punctuation and line length improvements. Also adjust test
for killing nonsensical things to fix crash with "kill door". From
OpenBSD.
 1.8 18-Sep-1999  jsm Fix -Wsign-compare warnings.
 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.18 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.17 25-Sep-2000  jsm Fix loving already loved goddess; avoid fallthrough after loving
goddess; give error on "love amulet". From OpenBSD.
 1.16 24-Sep-2000  jsm Add explicit no-ops to empty loops following the NetBSD style guide.
 1.15 23-Sep-2000  jsm Allow for bathing goddess in love(); give better message for a lover
that isn't present and for certain choices of lover. From OpenBSD.
 1.14 21-Sep-2000  jsm From OpenBSD: in kiss(), "take" the bathing goddess if required, and
give a better error message if the person to kiss is not present.
 1.13 17-Sep-2000  jsm Clean up formatting; partly from OpenBSD.
 1.12 10-Sep-2000  jsm Wording, punctuation and line length improvements. Also adjust test
for killing nonsensical things to fix crash with "kill door". From
OpenBSD.
 1.11 08-Sep-2000  jsm Spelling and punctuation corrections or improvements from OpenBSD.
 1.10 14-Jul-1999  hubertf From PR 7987 by Joseph Myers <jsm28@cam.ac.uk>:
More battlestar(6) spelling and punctuation fixes for battlestar(6).
These ones come from OpenBSD.
 1.9 30-Aug-1998  veego Add braces to make the new egcs happy.
 1.8 29-Aug-1998  hubertf DTRT if "give" is invoked without arguments. Fix contributed by Joseph S.
Myers <jsm28@cam.ac.uk>, closeds PR 6049.
 1.7 28-Aug-1998  hubertf Don't allow empty "give" command (without arguments).
Fixes PR 6049 by Joseph Myers <jsm@octomino.demon.co.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.21 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.20 24-Sep-2000  jsm Add explicit no-ops to empty loops following the NetBSD style guide.
 1.19 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.18 17-Sep-2000  jsm Clean up formatting; partly from OpenBSD.
 1.17 17-Sep-2000  jsm Patches from OpenBSD: add verbs "open"/"unlock" (essentially a no-op),
and "verbose"/"brief" (in verbose mode, always show long room
descriptions), and synonyms "papaya" for "papayas" and "coconut" for
"coconuts".
 1.16 10-Sep-2000  jsm Wording, punctuation and line length improvements. Also adjust test
for killing nonsensical things to fix crash with "kill door". From
OpenBSD.
 1.15 14-Sep-1999  jsm Use time() instead of gettimeofday().
 1.14 13-Sep-1999  jsm Fix uses of names of library functions for other purposes.
 1.13 13-Sep-1999  jsm A couple more checks for file descriptor < 3 missed earlier.
 1.12 08-Sep-1999  jsm Add `__noreturn__' and `__unused__' attributes where appropriate to
the games.

This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).

Most noreturn attributes were previously added in bin/6144, with some
others that were missed then in bin/8082. Previous `unused'
attributes were covered in bin/6557, bin/8058 and other PRs (all these
PRs have already been handled and closed).
 1.11 21-Jul-1999  hubertf Drop setgid privileges early. Derived from OpenBSD and sent in as PR 5970
by Joseph Myers <jsm28@cam.ac.uk>.
 1.10 10-Feb-1999  hubertf Const poisoning, per PR 6660 by Joseph Myers <jsm28@cam.ac.uk>
 1.9 13-Oct-1997  cjs time_t != long; fix minor type problem.
 1.8 11-Oct-1997  lukem KNFify (with indent)
 1.7 10-Oct-1997  lukem WARNSify
 1.6 07-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.5 27-Apr-1995  mycroft Use POSIX signal and tty semantics.
 1.4 28-Mar-1995  jtc KERNEL -> _KERNEL
 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.10 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.9 17-Sep-2000  jsm Clean up formatting; partly from OpenBSD.
 1.8 10-Sep-2000  jsm Wording, punctuation and line length improvements. Also adjust test
for killing nonsensical things to fix crash with "kill door". From
OpenBSD.
 1.7 23-Jul-2000  mycroft Rename move() to moveplayer() to avoid clashing with libcurses.
 1.6 11-Oct-1997  lukem branches: 1.6.12;
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.6.12.1 26-Jul-2000  mycroft Approved by thorpej:
Rename move() to moveplayer() to avoid clashing with libcurses.

basesrc/games/battlestar/com1.c 1.9 -> 1.10
basesrc/games/battlestar/com7.c 1.6 -> 1.7
basesrc/games/battlestar/cypher.c 1.10 -> 1.11
basesrc/games/battlestar/extern.h 1.15 -> 1.16
 1.6 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.5 19-Jun-2012  dholland WARNS=5, and make WARNS=5 the default for src/games.
 1.4 12-Aug-2009  dholland branches: 1.4.6;
sprinkle static
 1.3 01-Jul-2005  jmc KNF and WARNS=3
 1.2 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.1 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.4.6.1 30-Oct-2012  yamt sync with head
 1.5 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.4 03-Feb-2019  mrg - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily
 1.3 01-Jul-2005  jmc branches: 1.3.84;
KNF and WARNS=3
 1.2 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.1 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.3.84.1 10-Jun-2019  christos Sync with HEAD
 1.6 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.5 03-Feb-2019  mrg - add or adjust /* FALLTHROUGH */ where appropriate
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily
 1.4 04-Feb-2018  mrg branches: 1.4.4;
fix issues found by GCC 6.4:

battlestar was missing some {} in its insane printf()+puts() usage.
this is a literal code sequence i found:

printf("The blast catches ");
printf("the goddess in the ");
printf("stomach, knocking ");
puts("her to the ground.");
printf("She writhes in the ");
printf("dirt as the agony of ");
puts("death taunts her.");
puts("She has stopped moving.");

no lines inserted or removed.

tetris' checkscores() had wrong and missing {} usage.
 1.3 01-Jul-2005  jmc KNF and WARNS=3
 1.2 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.1 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.4.4.1 10-Jun-2019  christos Sync with HEAD
 1.4 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.3 01-Jul-2005  jmc KNF and WARNS=3
 1.2 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.1 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.6 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.5 22-Mar-2014  dholland avoid unnecessary floating point ops
 1.4 19-Jun-2012  dholland branches: 1.4.2;
WARNS=5, and make WARNS=5 the default for src/games.
 1.3 01-Jul-2005  jmc branches: 1.3.42;
KNF and WARNS=3
 1.2 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.1 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.3.42.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.42.1 30-Oct-2012  yamt sync with head
 1.4.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.8 24-Apr-2010  dholland fflush the score file while signals are blocked to decrease the chance of
it getting corrupted.
 1.7 02-Apr-2010  christos fix typo.
 1.6 02-Apr-2010  christos handle ctime returning NULL.
 1.5 12-Aug-2009  dholland sprinkle static
 1.4 15-Dec-2007  perry convert __attribute__s to applicable cdefs.h macros
 1.3 01-Jul-2005  jmc branches: 1.3.10;
KNF and WARNS=3
 1.2 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.1 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.3.10.1 09-Jan-2008  matt sync with HEAD
 1.5 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.4 04-Feb-2018  mrg fix issues found by GCC 6.4:

battlestar was missing some {} in its insane printf()+puts() usage.
this is a literal code sequence i found:

printf("The blast catches ");
printf("the goddess in the ");
printf("stomach, knocking ");
puts("her to the ground.");
printf("She writhes in the ");
printf("dirt as the agony of ");
puts("death taunts her.");
puts("She has stopped moving.");

no lines inserted or removed.

tetris' checkscores() had wrong and missing {} usage.
 1.3 01-Jul-2005  jmc KNF and WARNS=3
 1.2 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.1 19-Oct-2001  tv Rename com#.c to command#.c to avoid conflicts with those file basenames
on certain Microsoft host OS's.
 1.24 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.23 01-Jul-2005  jmc KNF and WARNS=3
 1.22 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.21 25-Sep-2000  jsm In cypher(), don't attempt to make sense of words other than VERBs or
KNIFE when a verb is required. Add AUXVERB for "make", "move",
"climb" (as in "make love", "climb up") and ignore AUXVERB as a verb,
going on to the next word, instead of treating these words as
adjectives. When creating new verbs from "put on", "put down", "take
off", mark them as type VERB. Mostly from Paul Janzen
<pjanzen@foatdi.harvard.edu>.
 1.20 25-Sep-2000  jsm Remove excess blank lines. From OpenBSD.
 1.19 24-Sep-2000  jsm Give less cryptic messages than "-1%" when WEIGHT or CUMBER are zero.
 1.18 24-Sep-2000  jsm Prevent CUMBER from going negative; avoid division by zero if it is
zero.
 1.17 22-Sep-2000  jsm Give appropriate messages (rather than saying nothing) if an verb is
used with "all" and nothing relevant is present. From OpenBSD.
 1.16 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.15 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.14 17-Sep-2000  jsm Patches from OpenBSD: add verbs "open"/"unlock" (essentially a no-op),
and "verbose"/"brief" (in verbose mode, always show long room
descriptions), and synonyms "papaya" for "papayas" and "coconut" for
"coconuts".
 1.13 10-Sep-2000  jsm Wording, punctuation and line length improvements. Also adjust test
for killing nonsensical things to fix crash with "kill door". From
OpenBSD.
 1.12 08-Sep-2000  jsm Spelling and punctuation corrections or improvements from OpenBSD.
 1.11 23-Jul-2000  mycroft Rename move() to moveplayer() to avoid clashing with libcurses.
 1.10 18-Sep-1999  jsm branches: 1.10.8;
Add FALLTHROUGH comment.
 1.9 28-Jul-1999  hubertf This patch improves the handling of save files in battlestar(6), by
allowing the user to choose the name of the save file and specify it
on the command line when restoring. It also eliminates a buffer
overrun in determining the path to the save file, and any particular
arbitrary limit on the name length. In the name of a tidier home
directory, the default name is changed from "Bstar" to ".Bstar".

Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk>
Minor modification (s/startup/filename/ in initialize()) by me.
 1.8 25-Mar-1999  hubertf Fix object recognition, per PR 6048 by Joseph S. Myers <jsm28@cam.ac.uk>.
 1.7 24-Aug-1998  hubertf Untakable objects are marked with NULL pointers, not empty strings,
resulting in core dumps. Fixed as per PR 6006 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.10.8.1 26-Jul-2000  mycroft Approved by thorpej:
Rename move() to moveplayer() to avoid clashing with libcurses.

basesrc/games/battlestar/com1.c 1.9 -> 1.10
basesrc/games/battlestar/com7.c 1.6 -> 1.7
basesrc/games/battlestar/cypher.c 1.10 -> 1.11
basesrc/games/battlestar/extern.h 1.15 -> 1.16
 1.12 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.11 18-Sep-2000  jsm Add missing initialisers (avoid gcc -W warnings) and comments giving
room numbers.
 1.10 10-Sep-2000  jsm Based on OpenBSD: spelling, punctuation, grammar and line length
adjustments, and support for '=' in room descriptions meaning a
literal '-'.
 1.9 08-Sep-2000  jsm Spelling and punctuation corrections or improvements from OpenBSD.
 1.8 14-Jul-1999  hubertf From PR 7987 by Joseph Myers <jsm28@cam.ac.uk>:
More battlestar(6) spelling and punctuation fixes for battlestar(6).
These ones come from OpenBSD.
 1.7 25-Jul-1998  hubertf Fix some spelling errors reported by Joseph Myers <jsm28@cam.ac.uk>
in PR 5842.
 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.9 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.8 18-Sep-1999  jsm Add missing initialisers.
 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.36 22-Mar-2014  dholland Use random(), not rand().
 1.35 22-Mar-2014  dholland avoid signed left-shift
 1.34 22-Mar-2014  dholland Use CHAR_BIT, not 8.
 1.33 26-Aug-2011  dholland branches: 1.33.2; 1.33.8;
Use __dead and __printflike instead of __attribute__.
 1.32 12-Aug-2009  dholland sprinkle static
 1.31 01-Jul-2005  jmc KNF and WARNS=3
 1.30 27-Jan-2004  jsm Remove uses of __P.
 1.29 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.28 25-Sep-2000  jsm In cypher(), don't attempt to make sense of words other than VERBs or
KNIFE when a verb is required. Add AUXVERB for "make", "move",
"climb" (as in "make love", "climb up") and ignore AUXVERB as a verb,
going on to the next word, instead of treating these words as
adjectives. When creating new verbs from "put on", "put down", "take
off", mark them as type VERB. Mostly from Paul Janzen
<pjanzen@foatdi.harvard.edu>.
 1.27 25-Sep-2000  jsm Add new flags OBJ_PERSON and OBJ_NONOBJ to the objflags array.
 1.26 25-Sep-2000  jsm Add OBJ_AN flag to objflags so as to use "a" or "an" appropriately in
messages; avoids "a amulet", "a Elf". Define and use macros to use
"a", "an", "the", "is", "are" appropriately. Partly based on OpenBSD.
 1.25 24-Sep-2000  jsm Make hash table static in parse.c.
 1.24 24-Sep-2000  jsm Make functions local to parse.c static.
 1.23 24-Sep-2000  jsm Clean up fly.c by making local variables and functions static and
removing abs() macro.
 1.22 23-Sep-2000  jsm Use a lookup table to identify whether objects are plural or singular,
instead of testing the final character against 's' in each place.
Avoids oddities about "pot of jewels" and "compass".
 1.21 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.20 17-Sep-2000  jsm Patches from OpenBSD: add verbs "open"/"unlock" (essentially a no-op),
and "verbose"/"brief" (in verbose mode, always show long room
descriptions), and synonyms "papaya" for "papayas" and "coconut" for
"coconuts".
 1.19 09-Sep-2000  jsm Store copy of username with strdup rather than using a fixed length
buffer. Also make initialization functions and arrays static.
 1.18 09-Sep-2000  jsm Put prototypes in alphabetical order.
 1.17 08-Sep-2000  jsm Make code clearer; add a macro ROOMDESC for the number of times a room
should be visited for the short description only to be used, and don't
increment beenthere[position] beyond this value. From OpenBSD.
 1.16 23-Jul-2000  mycroft Rename move() to moveplayer() to avoid clashing with libcurses.
 1.15 14-Sep-1999  jsm branches: 1.15.8;
Declare variables in extern.h as extern, and add non-extern
declarations to globals.c.
 1.14 14-Sep-1999  jsm Use time() instead of gettimeofday().
 1.13 13-Sep-1999  jsm Fix uses of names of library functions for other purposes.
 1.12 28-Jul-1999  hubertf This patch improves the handling of save files in battlestar(6), by
allowing the user to choose the name of the save file and specify it
on the command line when restoring. It also eliminates a buffer
overrun in determining the path to the save file, and any particular
arbitrary limit on the name length. In the name of a tidier home
directory, the default name is changed from "Bstar" to ".Bstar".

Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk>
Minor modification (s/startup/filename/ in initialize()) by me.
 1.11 21-Jul-1999  hubertf Drop setgid privileges early. Derived from OpenBSD and sent in as PR 5970
by Joseph Myers <jsm28@cam.ac.uk>.
 1.10 10-Feb-1999  hubertf Const poisoning, per PR 6660 by Joseph Myers <jsm28@cam.ac.uk>
 1.9 13-Sep-1998  hubertf mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>)
 1.8 29-Mar-1998  mrg - really make extern char's extern.
 1.7 03-Feb-1998  perry change includes to fix compiler warning
 1.6 11-Oct-1997  lukem KNFify (with indent)
 1.5 10-Oct-1997  lukem WARNSify
 1.4 07-Jan-1997  tls sigh, fix RCS ID again
 1.3 07-Jan-1997  tls RCS ID Police
 1.2 07-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.1 28-Dec-1996  tls branches: 1.1.1;
Initial revision
 1.1.1.1 28-Dec-1996  tls Import from 4.4BSD-Lite2
 1.15.8.1 26-Jul-2000  mycroft Approved by thorpej:
Rename move() to moveplayer() to avoid clashing with libcurses.

basesrc/games/battlestar/com1.c 1.9 -> 1.10
basesrc/games/battlestar/com7.c 1.6 -> 1.7
basesrc/games/battlestar/cypher.c 1.10 -> 1.11
basesrc/games/battlestar/extern.h 1.15 -> 1.16
 1.33.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.33.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 07-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.5 24-Apr-1995  cgd Various changes to make games compile w/o warnings on the alpha:
Include appropriate includes, delete bogus function declarations,
change sizes of variables and casts.
 1.4 21-Mar-1995  cgd clean up import
 1.3 28-Feb-1995  jtc change <sys/signal.h> to <signal.h>
 1.2 01-Aug-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 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.16 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.15 13-Oct-2012  dholland Pass -Wstrict-overflow.
 1.14 15-Dec-2007  perry branches: 1.14.26; 1.14.32;
convert __attribute__s to applicable cdefs.h macros
 1.13 01-Jul-2005  jmc branches: 1.13.10;
KNF and WARNS=3
 1.12 27-Jan-2004  jsm Remove uses of __P.
 1.11 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.10 04-Dec-2001  blymn Convert old deprecated curses call to new equivalent.
 1.9 24-Sep-2000  jsm Clean up fly.c by making local variables and functions static and
removing abs() macro.
 1.8 08-Sep-1999  jsm Add `__noreturn__' and `__unused__' attributes where appropriate to
the games.

This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).

Most noreturn attributes were previously added in bin/6144, with some
others that were missed then in bin/8082. Previous `unused'
attributes were covered in bin/6557, bin/8058 and other PRs (all these
PRs have already been handled and closed).
 1.7 18-Apr-1999  simonb initscr() returns a pointer, compare return value with NULL and not
an int.
Compatible with other versions of curses.
 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.13.10.1 09-Jan-2008  matt sync with HEAD
 1.14.32.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.26.1 30-Oct-2012  yamt sync with head
 1.15 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.14 16-Jan-2012  christos PR/45842: Henning Petersen: compare fgets with NULL not 0
 1.13 01-Jul-2005  jmc branches: 1.13.42;
KNF and WARNS=3
 1.12 05-Nov-2004  dsl Add (unsigned char) cast to ctype functions
 1.11 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.10 24-Sep-2000  jsm Discard any part of a line of input that goes beyond our buffer rather
than treating it as our next line of input. From OpenBSD.
 1.9 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.8 21-Sep-2000  jsm die() on EOF; based on OpenBSD.
 1.7 17-Sep-2000  jsm Clean up formatting; partly from OpenBSD.
 1.6 10-Feb-1999  hubertf Const poisoning, per PR 6660 by Joseph Myers <jsm28@cam.ac.uk>
 1.5 11-Oct-1997  lukem KNFify (with indent)
 1.4 10-Oct-1997  lukem WARNSify
 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.2 21-Mar-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.13.42.1 17-Apr-2012  yamt sync with head
 1.20 06-Dec-2020  dholland speed limit 80
 1.19 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.18 25-Sep-2000  jsm Add new flags OBJ_PERSON and OBJ_NONOBJ to the objflags array.
 1.17 25-Sep-2000  jsm Add OBJ_AN flag to objflags so as to use "a" or "an" appropriately in
messages; avoids "a amulet", "a Elf". Define and use macros to use
"a", "an", "the", "is", "are" appropriately. Partly based on OpenBSD.
 1.16 24-Sep-2000  jsm Make hash table static in parse.c.
 1.15 24-Sep-2000  jsm Use NULL instead of 0 (from OpenBSD). Also add or adjust comments.
 1.14 23-Sep-2000  jsm Use a lookup table to identify whether objects are plural or singular,
instead of testing the final character against 's' in each place.
Avoids oddities about "pot of jewels" and "compass".
 1.13 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.12 17-Sep-2000  jsm Patches from OpenBSD: add verbs "open"/"unlock" (essentially a no-op),
and "verbose"/"brief" (in verbose mode, always show long room
descriptions), and synonyms "papaya" for "papayas" and "coconut" for
"coconuts".
 1.11 09-Sep-2000  jsm Store copy of username with strdup rather than using a fixed length
buffer. Also make initialization functions and arrays static.
 1.10 08-Sep-2000  jsm Spelling and punctuation corrections or improvements from OpenBSD.
 1.9 14-Sep-1999  jsm Declare variables in extern.h as extern, and add non-extern
declarations to globals.c.
 1.8 14-Jul-1999  hubertf From PR 7987 by Joseph Myers <jsm28@cam.ac.uk>:
More battlestar(6) spelling and punctuation fixes for battlestar(6).
These ones come from OpenBSD.
 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.16 22-Mar-2014  dholland Use random(), not rand().
 1.15 01-Jul-2005  jmc branches: 1.15.42; 1.15.48;
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 09-Sep-2000  jsm Store copy of username with strdup rather than using a fixed length
buffer. Also make initialization functions and arrays static.
 1.11 18-Sep-1999  jsm Use strncpy() rather than strcpy() with fixed size buffer.
 1.10 13-Sep-1999  jsm Fix uses of names of library functions for other purposes.
 1.9 28-Jul-1999  hubertf This patch improves the handling of save files in battlestar(6), by
allowing the user to choose the name of the save file and specify it
on the command line when restoring. It also eliminates a buffer
overrun in determining the path to the save file, and any particular
arbitrary limit on the name length. In the name of a tidier home
directory, the default name is changed from "Bstar" to ".Bstar".

Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk>
Minor modification (s/startup/filename/ in initialize()) by me.
 1.8 10-Feb-1999  hubertf Const poisoning, per PR 6660 by Joseph Myers <jsm28@cam.ac.uk>
 1.7 11-Oct-1997  lukem KNFify (with indent)
 1.6 10-Oct-1997  lukem WARNSify
 1.5 07-Jan-1997  tls Sync to 4.4BSD-Lite2
 1.4 21-Mar-1995  cgd clean up import
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 19-Apr-1993  mycroft Initialize locations before checking wizard mode.
 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.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9 01-Jul-2005  jmc KNF and WARNS=3
 1.8 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.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.12 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.11 18-Sep-2000  jsm Add missing initialisers (avoid gcc -W warnings) and comments giving
room numbers.
 1.10 10-Sep-2000  jsm Based on OpenBSD: spelling, punctuation, grammar and line length
adjustments, and support for '=' in room descriptions meaning a
literal '-'.
 1.9 08-Sep-2000  jsm Spelling and punctuation corrections or improvements from OpenBSD.
 1.8 14-Jul-1999  hubertf From PR 7987 by Joseph Myers <jsm28@cam.ac.uk>:
More battlestar(6) spelling and punctuation fixes for battlestar(6).
These ones come from OpenBSD.
 1.7 25-Jul-1998  hubertf Fix some spelling errors reported by Joseph Myers <jsm28@cam.ac.uk>
in PR 5842.
 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.9 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.8 18-Sep-1999  jsm Add missing initialisers.
 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.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
 1.4 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.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.2 21-Mar-1995  cgd from Lite
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.15 02-May-2021  rillig games: remove trailing whitespace in *.c and *.h
 1.14 05-Oct-2019  mrg expand the internal consistency checks in truedirec() to avoid
fallthrough cases. now if direction turns up wrong (it should
not, but this code can't tell that, and convert it to an enum
that would also fix this, is more effort than this is worth.
 1.13 23-May-2011  joerg branches: 1.13.44;
Don't use return value of a function as format string.
 1.12 01-Jul-2005  jmc KNF and WARNS=3
 1.11 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.10 17-Sep-2000  jsm Patches from OpenBSD: add verbs "open"/"unlock" (essentially a no-op),
and "verbose"/"brief" (in verbose mode, always show long room
descriptions), and synonyms "papaya" for "papayas" and "coconut" for
"coconuts".
 1.9 10-Sep-2000  jsm Based on OpenBSD: spelling, punctuation, grammar and line length
adjustments, and support for '=' in room descriptions meaning a
literal '-'.
 1.8 08-Sep-2000  jsm Make code clearer; add a macro ROOMDESC for the number of times a room
should be visited for the short description only to be used, and don't
increment beenthere[position] beyond this value. From OpenBSD.
 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.13.44.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12 01-Jul-2005  jmc KNF and WARNS=3
 1.11 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.10 09-Jan-2000  jsm Use err(1, NULL) and warn(NULL) for `out of memory' error messages.
 1.9 28-Jul-1999  hubertf This patch improves the handling of save files in battlestar(6), by
allowing the user to choose the name of the save file and specify it
on the command line when restoring. It also eliminates a buffer
overrun in determining the path to the save file, and any particular
arbitrary limit on the name length. In the name of a tidier home
directory, the default name is changed from "Bstar" to ".Bstar".

Patch supplied in PR 8085 by Joseph Myers <jsm28@cam.ac.uk>
Minor modification (s/startup/filename/ in initialize()) by me.
 1.8 13-Sep-1998  hubertf add sanity checks when saving/restoring games (PR#6138 by Joseph Myers <jsm28@cam.ac.uk>)
 1.7 12-Oct-1997  lukem missed a couple of clock->ourclock and time->ourtime variable renames
 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.11 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.10 25-Sep-2000  jsm In cypher(), don't attempt to make sense of words other than VERBs or
KNIFE when a verb is required. Add AUXVERB for "make", "move",
"climb" (as in "make love", "climb up") and ignore AUXVERB as a verb,
going on to the next word, instead of treating these words as
adjectives. When creating new verbs from "put on", "put down", "take
off", mark them as type VERB. Mostly from Paul Janzen
<pjanzen@foatdi.harvard.edu>.
 1.9 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.8 17-Sep-2000  jsm Patches from OpenBSD: add verbs "open"/"unlock" (essentially a no-op),
and "verbose"/"brief" (in verbose mode, always show long room
descriptions), and synonyms "papaya" for "papayas" and "coconut" for
"coconuts".
 1.7 09-Sep-2000  jsm Make spacing nicer and add explicit NULL initializers.
 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

RSS XML Feed