Commit Graph

15 Commits

Author SHA1 Message Date
rillig 1182a44c59 games: remove trailing whitespace in *.c and *.h 2021-05-02 12:50:43 +00:00
christos 7f5fd4a5cd PR/45842: Henning Petersen: compare fgets with NULL not 0 2012-01-16 17:38:16 +00:00
jmc bd6068f403 KNF and WARNS=3 2005-07-01 06:04:46 +00:00
dsl 49f7d8a9b1 Add (unsigned char) cast to ctype functions 2004-11-05 21:30:31 +00:00
agc e5aeb4ea46 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
2003-08-07 09:36:50 +00:00
jsm 572a824811 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.
2000-09-24 15:51:40 +00:00
jsm 1fc5d09e80 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.
2000-09-21 17:44:34 +00:00
jsm 16d8e9af6f die() on EOF; based on OpenBSD. 2000-09-21 09:49:03 +00:00
jsm 819ea9d1a6 Clean up formatting; partly from OpenBSD. 2000-09-17 23:04:17 +00:00
hubertf bd8be7848a Const poisoning, per PR 6660 by Joseph Myers <jsm28@cam.ac.uk> 1999-02-10 01:36:50 +00:00
lukem 31c7a7bec5 KNFify (with indent) 1997-10-11 02:06:55 +00:00
lukem b6068ea04b WARNSify 1997-10-10 11:39:08 +00:00
cgd 101657d110 clean up import 1995-03-21 15:03:38 +00:00
mycroft 8542364e07 Add RCS identifiers. 1993-08-01 18:49:50 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00