]> git.cameronkatri.com Git - bsdgames-darwin.git/log
bsdgames-darwin.git
23 years agoBuild the data files in the obj/compile directory and install them with
simonb [Tue, 27 Mar 2001 02:23:28 +0000 (02:23 +0000)]
Build the data files in the obj/compile directory and install them with
FILES and FILESDIR.
"Problem" reported by David Querbach on current-users.

23 years agoMake mostly gcc -W clean, and other cleanup:
jsm [Sun, 25 Mar 2001 20:43:58 +0000 (20:43 +0000)]
Make mostly gcc -W clean, and other cleanup:
Use const.
Add __noreturn__ attributes.
Add a __format__ attribute.
Add __unused__ attributes.
Use symbolic constants for open() and lseek().
Declare types of all function parameters; convert some function
definitions to ISO C form.
Ensure standard file descriptors are open on startup.
Check for errors writing output of makedefs.
Avoid duplicate definitions of variables.

23 years agoFix problem noted in PR 6649 (trailing whitespace on .Nm)
garbled [Wed, 7 Mar 2001 22:30:38 +0000 (22:30 +0000)]
Fix problem noted in PR 6649 (trailing whitespace on .Nm)

23 years agoconvert to use getprogname()
cgd [Mon, 19 Feb 2001 22:39:39 +0000 (22:39 +0000)]
convert to use getprogname()

23 years agokill dupe
pooka [Sat, 10 Feb 2001 18:14:13 +0000 (18:14 +0000)]
kill dupe

23 years agoFix simple typo. From bdc@world.std.com in PR misc/12150.
simonb [Wed, 7 Feb 2001 22:59:19 +0000 (22:59 +0000)]
Fix simple typo.  From bdc@world.std.com in PR misc/12150.

23 years agofix redundant decls and nested externs
christos [Mon, 5 Feb 2001 01:12:46 +0000 (01:12 +0000)]
fix redundant decls and nested externs

23 years agoremove redundant decls.
christos [Mon, 5 Feb 2001 01:10:08 +0000 (01:10 +0000)]
remove redundant decls.

23 years agoremove duplicate decls
christos [Mon, 5 Feb 2001 01:04:25 +0000 (01:04 +0000)]
remove duplicate decls

23 years agofix nested externs
christos [Mon, 5 Feb 2001 01:02:45 +0000 (01:02 +0000)]
fix nested externs

23 years agoremove redundant decls
christos [Mon, 5 Feb 2001 01:01:27 +0000 (01:01 +0000)]
remove redundant decls

23 years ago- rename getchar to lgetchar to avoid conflicts with the stdio getchar
christos [Mon, 5 Feb 2001 00:57:32 +0000 (00:57 +0000)]
- rename getchar to lgetchar to avoid conflicts with the stdio getchar
- fix redundant decls and nested externs
- use snprintf instead of sprintf

23 years agoremove redundant decls
christos [Mon, 5 Feb 2001 00:42:14 +0000 (00:42 +0000)]
remove redundant decls

23 years agoeliminate nested externs
christos [Mon, 5 Feb 2001 00:40:45 +0000 (00:40 +0000)]
eliminate nested externs

23 years agofix redundant decls and nested externs. while I am here change my copyright
christos [Mon, 5 Feb 2001 00:37:43 +0000 (00:37 +0000)]
fix redundant decls and nested externs. while I am here change my copyright
to TNF.

23 years agofix nested externs
christos [Mon, 5 Feb 2001 00:30:38 +0000 (00:30 +0000)]
fix nested externs

23 years agofix nested extern and usage message
christos [Mon, 5 Feb 2001 00:29:44 +0000 (00:29 +0000)]
fix nested extern and usage message

23 years agoremove redundant decl
christos [Mon, 5 Feb 2001 00:28:30 +0000 (00:28 +0000)]
remove redundant decl

23 years agofix nested extern
christos [Mon, 5 Feb 2001 00:27:35 +0000 (00:27 +0000)]
fix nested extern

23 years agoremove redundant decl
christos [Mon, 5 Feb 2001 00:23:59 +0000 (00:23 +0000)]
remove redundant decl

23 years agofix redundant decls and nested externs
christos [Mon, 5 Feb 2001 00:22:52 +0000 (00:22 +0000)]
fix redundant decls and nested externs

23 years agofix nested extern
christos [Mon, 5 Feb 2001 00:20:58 +0000 (00:20 +0000)]
fix nested extern

23 years agoeliminate redundant decls
christos [Mon, 5 Feb 2001 00:20:05 +0000 (00:20 +0000)]
eliminate redundant decls

23 years agoTyop: foresight, not forsight (FreeBSD PR/24637)
mjl [Tue, 30 Jan 2001 00:25:30 +0000 (00:25 +0000)]
Tyop: foresight, not forsight (FreeBSD PR/24637)

23 years agoplay(): use snprintf() instead of hard-to-parse strncpy() calls
jdolecek [Thu, 25 Jan 2001 20:41:41 +0000 (20:41 +0000)]
play(): use snprintf() instead of hard-to-parse strncpy() calls

24 years agoavoid strange typcast.
itojun [Sat, 20 Jan 2001 15:06:34 +0000 (15:06 +0000)]
avoid strange typcast.

24 years agocomment or delete text after CPP directives.
cgd [Tue, 16 Jan 2001 02:50:27 +0000 (02:50 +0000)]
comment or delete text after CPP directives.

24 years agoinclude stdlib.h for prototypes (typically for exit()).
cgd [Tue, 16 Jan 2001 02:44:43 +0000 (02:44 +0000)]
include stdlib.h for prototypes (typically for exit()).

24 years agoavoid C sequence point issues warned about by development version of gcc.
cgd [Tue, 16 Jan 2001 02:41:17 +0000 (02:41 +0000)]
avoid C sequence point issues warned about by development version of gcc.

24 years agoThe capital of Mordor is _not_ Minas Morgul.
jwise [Fri, 12 Jan 2001 04:33:51 +0000 (04:33 +0000)]
The capital of Mordor is _not_ Minas Morgul.

24 years ago- openlog "huntd" instead of "HUNT"
lukem [Tue, 9 Jan 2001 23:49:54 +0000 (23:49 +0000)]
- openlog "huntd" instead of "HUNT"
- consistently log non-critical errors at LOG_WARNING not LOG_ERR
- consistently use positive numbers for exit() and _exit()
- one warning was using printf() instead of syslog()

24 years agoconvert to using .WAIT
lukem [Tue, 9 Jan 2001 03:13:39 +0000 (03:13 +0000)]
convert to using .WAIT

24 years agouse more standard %ll_ in favour of %q_
lukem [Thu, 4 Jan 2001 17:24:35 +0000 (17:24 +0000)]
use more standard %ll_ in favour of %q_

24 years agoneed string.h for prototype (checked with alpha)
itojun [Thu, 4 Jan 2001 06:33:18 +0000 (06:33 +0000)]
need string.h for prototype (checked with alpha)

24 years agoNormalize signature of ship handling functions -- struct ship * from and
jwise [Thu, 4 Jan 2001 06:16:51 +0000 (06:16 +0000)]
Normalize signature of ship handling functions -- struct ship * from and
struct ship * to are now always the first two args.

24 years agoVarious stylistic nits.
jwise [Thu, 4 Jan 2001 05:34:56 +0000 (05:34 +0000)]
Various stylistic nits.

24 years agoUse License templates from localsrc for license on new files.
jwise [Thu, 4 Jan 2001 05:06:15 +0000 (05:06 +0000)]
Use License templates from localsrc for license on new files.

24 years agoBreak out curses display-related globals into a new header file, so that
jwise [Thu, 4 Jan 2001 04:41:41 +0000 (04:41 +0000)]
Break out curses display-related globals into a new header file, so that
<curses.h> doesn't have to be included all over the place.

24 years agoMore rationalization of include files:
jwise [Thu, 4 Jan 2001 03:51:23 +0000 (03:51 +0000)]
More rationalization of include files:

a.) Don't include a zillion system headers from "extern.h" (actually, don't
    include any).
b.) Break a global jmp_buf variable into a new file, so <setjmp.h> doesn't
    have to be pulled in everywhere (it's only used in two places).

The (one line) new file is (c) TNF with a three-clause license, FW(L)IW.

24 years agoRationalize inclusion of header files: cut down on `include everything
jwise [Thu, 4 Jan 2001 03:21:16 +0000 (03:21 +0000)]
Rationalize inclusion of header files: cut down on `include everything
everywhere' a little (more to go), and as per KNF, local includes after
system includes.

24 years agoSecond half of static-ization of local funcs.
jwise [Thu, 4 Jan 2001 02:43:32 +0000 (02:43 +0000)]
Second half of static-ization of local funcs.

24 years agoG/C undocumented and unimplemented `-D' (debug) option.
jwise [Thu, 4 Jan 2001 01:56:27 +0000 (01:56 +0000)]
G/C undocumented and unimplemented `-D' (debug) option.

24 years agoFirst half of static-ization of local funcs.
jwise [Thu, 4 Jan 2001 01:53:24 +0000 (01:53 +0000)]
First half of static-ization of local funcs.

24 years agoDe-`register'
jwise [Thu, 4 Jan 2001 01:13:34 +0000 (01:13 +0000)]
De-`register'

24 years agoFix getopt usage (again) in case where user does not choose a scenario on
jwise [Mon, 1 Jan 2001 22:33:01 +0000 (22:33 +0000)]
Fix getopt usage (again) in case where user does not choose a scenario on
the command line.

24 years agoMissed commit -- ANSIfy in preparation for further work.
jwise [Mon, 1 Jan 2001 22:23:29 +0000 (22:23 +0000)]
Missed commit -- ANSIfy in preparation for further work.

24 years agoFix getopt() usage.
jwise [Mon, 1 Jan 2001 22:05:04 +0000 (22:05 +0000)]
Fix getopt() usage.

24 years agoANSIfy in preparation for further work.
jwise [Mon, 1 Jan 2001 21:57:37 +0000 (21:57 +0000)]
ANSIfy in preparation for further work.

24 years ago${PRINTOBJDIR}ify
sommerfeld [Sat, 30 Dec 2000 17:51:26 +0000 (17:51 +0000)]
${PRINTOBJDIR}ify

24 years agoAnother one that really belongs here...
mycroft [Sun, 17 Dec 2000 10:08:08 +0000 (10:08 +0000)]
Another one that really belongs here...

24 years agoCompress the other entries vertically.
mycroft [Sun, 17 Dec 2000 09:35:21 +0000 (09:35 +0000)]
Compress the other entries vertically.

24 years agoReformat one entry for vertical space.
mycroft [Sun, 17 Dec 2000 09:25:38 +0000 (09:25 +0000)]
Reformat one entry for vertical space.

24 years agoYes, it's about damn time fortune(6) got some new material.
mycroft [Sun, 17 Dec 2000 09:17:51 +0000 (09:17 +0000)]
Yes, it's about damn time fortune(6) got some new material.

24 years agoCNN, BSD declare Bush winner.
tsarna [Thu, 14 Dec 2000 02:38:02 +0000 (02:38 +0000)]
CNN, BSD declare Bush winner.

24 years agoFix warning.
jwise [Thu, 30 Nov 2000 22:07:24 +0000 (22:07 +0000)]
Fix warning.

24 years agoUse random() instead of rand(), and seed from time(3) instead of from getpid().
jwise [Thu, 30 Nov 2000 22:06:04 +0000 (22:06 +0000)]
Use random() instead of rand(), and seed from time(3) instead of from getpid().

24 years agoChange the macro to roll a six-sided die from die() to dieroll() (for
jwise [Thu, 30 Nov 2000 22:02:20 +0000 (22:02 +0000)]
Change the macro to roll a six-sided die from die() to dieroll() (for
obvious reasons of convention).

24 years agoANSIfy in preparation for changes.
jwise [Thu, 30 Nov 2000 21:50:58 +0000 (21:50 +0000)]
ANSIfy in preparation for changes.

24 years agoUse getopt(3) for flag processing.
jwise [Thu, 30 Nov 2000 21:38:57 +0000 (21:38 +0000)]
Use getopt(3) for flag processing.

24 years agoFix style nit.
jwise [Thu, 30 Nov 2000 21:31:33 +0000 (21:31 +0000)]
Fix style nit.

24 years agoANSIfy in preparation for other changes.
jwise [Thu, 30 Nov 2000 21:29:32 +0000 (21:29 +0000)]
ANSIfy in preparation for other changes.

24 years agoJust print basename in usage string.
soren [Tue, 21 Nov 2000 00:18:52 +0000 (00:18 +0000)]
Just print basename in usage string.

24 years agoremove unnecessary command name after .Nm
lukem [Tue, 7 Nov 2000 05:51:54 +0000 (05:51 +0000)]
remove unnecessary command name after .Nm

24 years agouse lowercase with .Nm to match actual command name
lukem [Tue, 7 Nov 2000 05:49:31 +0000 (05:49 +0000)]
use lowercase with .Nm to match actual command name

24 years agofix a bug in the call to srandom(): xor time() with getpid(), don't add them!
mrg [Tue, 31 Oct 2000 13:27:56 +0000 (13:27 +0000)]
fix a bug in the call to srandom():  xor time() with getpid(), don't add them!

now fortune(6) run in an unending loop does not appear to show the same
fortunes over and over and over.

24 years agoNetBSD will put hair on a UNIX admin's chest
hubertf [Mon, 9 Oct 2000 00:58:16 +0000 (00:58 +0000)]
NetBSD will put hair on a UNIX admin's chest
-- Jason R. Fink

24 years agoRemoved duplicate entry. Fixes FreeBSD PR/21629.
mjl [Fri, 29 Sep 2000 00:40:40 +0000 (00:40 +0000)]
Removed duplicate entry. Fixes FreeBSD PR/21629.

24 years agoIn cypher(), don't attempt to make sense of words other than VERBs or
jsm [Mon, 25 Sep 2000 19:37:58 +0000 (19:37 +0000)]
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>.

24 years agoAdd new flags OBJ_PERSON and OBJ_NONOBJ to the objflags array.
jsm [Mon, 25 Sep 2000 14:44:59 +0000 (14:44 +0000)]
Add new flags OBJ_PERSON and OBJ_NONOBJ to the objflags array.

24 years agoAdd OBJ_AN flag to objflags so as to use "a" or "an" appropriately in
jsm [Mon, 25 Sep 2000 14:08:08 +0000 (14:08 +0000)]
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.

24 years agoRemove excess blank lines. From OpenBSD.
jsm [Mon, 25 Sep 2000 14:06:20 +0000 (14:06 +0000)]
Remove excess blank lines.  From OpenBSD.

24 years agoFix loving already loved goddess; avoid fallthrough after loving
jsm [Mon, 25 Sep 2000 14:05:52 +0000 (14:05 +0000)]
Fix loving already loved goddess; avoid fallthrough after loving
goddess; give error on "love amulet".  From OpenBSD.

24 years agoUse defined constant FINAL instead of hardcoded 275. From OpenBSD.
jsm [Mon, 25 Sep 2000 00:33:18 +0000 (00:33 +0000)]
Use defined constant FINAL instead of hardcoded 275.  From OpenBSD.

24 years agoFix logic error in use of n and wordnumber in murder() when using
jsm [Mon, 25 Sep 2000 00:28:54 +0000 (00:28 +0000)]
Fix logic error in use of n and wordnumber in murder() when using
laser.  From OpenBSD.

24 years agoDiscard any part of a line of input that goes beyond our buffer rather
jsm [Sun, 24 Sep 2000 15:51:40 +0000 (15:51 +0000)]
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.

24 years agoGive less cryptic messages than "-1%" when WEIGHT or CUMBER are zero.
jsm [Sun, 24 Sep 2000 14:42:18 +0000 (14:42 +0000)]
Give less cryptic messages than "-1%" when WEIGHT or CUMBER are zero.

24 years agoAdd explicit no-ops to empty loops following the NetBSD style guide.
jsm [Sun, 24 Sep 2000 14:20:23 +0000 (14:20 +0000)]
Add explicit no-ops to empty loops following the NetBSD style guide.

24 years agoMake hash table static in parse.c.
jsm [Sun, 24 Sep 2000 14:11:09 +0000 (14:11 +0000)]
Make hash table static in parse.c.

24 years agoUse NULL instead of 0 (from OpenBSD). Also add or adjust comments.
jsm [Sun, 24 Sep 2000 09:47:22 +0000 (09:47 +0000)]
Use NULL instead of 0 (from OpenBSD).  Also add or adjust comments.

24 years agoCorrect spelling "dont" to "don't". From OpenBSD.
jsm [Sun, 24 Sep 2000 09:46:57 +0000 (09:46 +0000)]
Correct spelling "dont" to "don't".  From OpenBSD.

24 years agoMake functions local to parse.c static.
jsm [Sun, 24 Sep 2000 09:46:28 +0000 (09:46 +0000)]
Make functions local to parse.c static.

24 years agoGive a better message for trying to eat things it doesn't make sense
jsm [Sun, 24 Sep 2000 09:46:03 +0000 (09:46 +0000)]
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.

24 years agoClean up fly.c by making local variables and functions static and
jsm [Sun, 24 Sep 2000 09:44:28 +0000 (09:44 +0000)]
Clean up fly.c by making local variables and functions static and
removing abs() macro.

24 years agoPrevent CUMBER from going negative; avoid division by zero if it is
jsm [Sun, 24 Sep 2000 09:41:53 +0000 (09:41 +0000)]
Prevent CUMBER from going negative; avoid division by zero if it is
zero.

24 years agoAttempt to disambiguate BODY for kicking. Avoid crashing or nonsense
jsm [Sun, 24 Sep 2000 09:39:56 +0000 (09:39 +0000)]
Attempt to disambiguate BODY for kicking.  Avoid crashing or nonsense
messages on "kick door" and "kick man".  From OpenBSD.

24 years agoAllow for bathing goddess in love(); give better message for a lover
jsm [Sat, 23 Sep 2000 19:51:02 +0000 (19:51 +0000)]
Allow for bathing goddess in love(); give better message for a lover
that isn't present and for certain choices of lover.  From OpenBSD.

24 years agoAllow for the bathing goddess in ravage(). From OpenBSD.
jsm [Sat, 23 Sep 2000 19:45:07 +0000 (19:45 +0000)]
Allow for the bathing goddess in ravage().  From OpenBSD.

24 years agoUse a lookup table to identify whether objects are plural or singular,
jsm [Sat, 23 Sep 2000 19:23:57 +0000 (19:23 +0000)]
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".

24 years agoUse ${COPY} instead of -c for ${INSTALL} commands.
simonb [Sat, 23 Sep 2000 13:53:41 +0000 (13:53 +0000)]
Use ${COPY} instead of -c for ${INSTALL} commands.

24 years agoCorrect descriptions of "marked" vs. "ignored" -- they were swapped.
jhawk [Sat, 23 Sep 2000 01:52:50 +0000 (01:52 +0000)]
Correct descriptions of "marked" vs. "ignored" -- they were swapped.

24 years agoDon't say "Kicked." of an object not present; give sensible messages.
jsm [Fri, 22 Sep 2000 12:38:10 +0000 (12:38 +0000)]
Don't say "Kicked." of an object not present; give sensible messages.
From OpenBSD.

24 years agoCheck for an object being taken not being there before checking for
jsm [Fri, 22 Sep 2000 12:37:32 +0000 (12:37 +0000)]
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.

24 years agoGive appropriate messages (rather than saying nothing) if an verb is
jsm [Fri, 22 Sep 2000 08:19:57 +0000 (08:19 +0000)]
Give appropriate messages (rather than saying nothing) if an verb is
used with "all" and nothing relevant is present.  From OpenBSD.

24 years agoRemove all adjectives in parse(), since they are nowhere used. Fixes
jsm [Fri, 22 Sep 2000 08:19:21 +0000 (08:19 +0000)]
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>.

24 years agoGive an appropriate error on "kill all" rather than a crash or
jsm [Fri, 22 Sep 2000 08:18:20 +0000 (08:18 +0000)]
Give an appropriate error on "kill all" rather than a crash or
nonsense message.  From OpenBSD.

24 years agoVarious improvements to parsing in battlestar, mostly from OpenBSD.
jsm [Thu, 21 Sep 2000 17:44:34 +0000 (17:44 +0000)]
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.

24 years agoDon't try to wear anything that isn't OBJECT or NOUNS. Don't try to
jsm [Thu, 21 Sep 2000 10:38:50 +0000 (10:38 +0000)]
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.

24 years agoIf no hand-to-hand weapons are available, try using the laser to kill
jsm [Thu, 21 Sep 2000 10:22:36 +0000 (10:22 +0000)]
If no hand-to-hand weapons are available, try using the laser to kill
in murder().  From OpenBSD.

24 years agodie() on EOF; based on OpenBSD.
jsm [Thu, 21 Sep 2000 09:49:03 +0000 (09:49 +0000)]
die() on EOF; based on OpenBSD.

24 years agoFrom OpenBSD: in kiss(), "take" the bathing goddess if required, and
jsm [Thu, 21 Sep 2000 09:48:10 +0000 (09:48 +0000)]
From OpenBSD: in kiss(), "take" the bathing goddess if required, and
give a better error message if the person to kiss is not present.