Commit Graph

31 Commits

Author SHA1 Message Date
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz
0d22e30cd0 New sentences begin on new lines.
Patch from Richard Elz, slightly improved by yours truly.
2002-09-26 16:12:39 +00:00
blymn
07fc67f670 Change deprecated curses function to new equivalent. 2001-12-06 12:24:00 +00:00
jsm
20af46d385 Keep track of visible worm length. If nowhere is available for the
new prize, have the player win rather than hanging.  Bug reported by
Malcolm Parsons <malcolm@ivywell.screaming.net>.
2001-08-31 07:15:44 +00:00
jsm
adba02cb44 Check for screen sizes that are too small. Fix off-by-one error in
trying to place the prize.  Position the score appropriately for
screens that may not be 80 columns wide.
2001-08-30 10:49:50 +00:00
jsm
67d5106d8a Remove documented bug with long worm lengths, and improve handling of
non-standard screen sizes.  From OpenBSD.
2001-08-29 23:25:58 +00:00
mycroft
f9eca6973d Use setgid(), not setregid(). 2000-05-08 07:55:59 +00:00
jsm
a5da40c55a Use err(1, NULL) and warn(NULL) for `out of memory' error messages. 2000-01-09 17:17:19 +00:00
cgd
ec6fa7bcf2 support arrow keys. 1999-10-26 06:35:49 +00:00
jsm
5367f3400c Security improvements for games (largely from or inspired by OpenBSD).
Games which run setgid from dm, but don't need to, should drop their
privileges at startup.

Games which have a scorefile should open it at startup, then drop all
privileges leaving just the open writable file descriptor.  If the
game can invoke subprocesses, this should be made close-on-exec.

Games with scorefiles should make sure they do not get a file
descriptor < 3.  (Otherwise, they could get confused and corrupt the
scorefile when using stdin, stdout or stderr.)

Some old setuid revokes from the days of setuid games change into gid
revokes.
1999-09-12 09:02:20 +00:00
jsm
a9c7f9b096 Check for failure of malloc() and calloc() at various places in the games. 1999-09-09 17:27:58 +00:00
jsm
b03d4fa882 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).
1999-09-08 21:45:25 +00:00
jsm
092d313019 Add use of `const' 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).

Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-08 21:17:44 +00:00
hubertf
ead3c28a8d Leave ^Z-handling to the system (curses? no idea, at least it works :-),
and don't wait for two seconds when game is over.
1999-08-10 21:52:43 +00:00
hubertf
2e41cf04d2 Print score after endwin() so it isn't deleted immediately afterward. 1999-08-08 03:08:08 +00:00
hubertf
18ee317315 This patch makes worm(6) keep the cursor on the head of the worm.
Submitted by Joseph Myers <jsm28@cam.ac.uk> in PR 8103.
1999-07-28 23:09:45 +00:00
hubertf
1c9494f62b mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>) 1998-09-13 15:27:25 +00:00
jtc
2065ddb3da Simply include -lcurses instead of -lcurses -ltermcap 1998-02-18 22:37:30 +00:00
lukem
e9954a7422 WARNSify 1997-10-12 02:12:45 +00:00
mycroft
716b7f24ce Remove incorrect (but unused) definition of baudrate(). 1995-04-29 01:12:41 +00:00
cgd
c4816c32b3 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.
1995-04-24 12:21:37 +00:00
cgd
ffe77265f3 clean up import, fix up Ids 1995-04-22 07:53:41 +00:00
cgd
c4c01d75b2 specify man pages the new way. 1994-12-22 09:31:26 +00:00
mycroft
fd50e57bd1 Restructure a switch to eliminate a compiler warning. 1993-12-03 10:12:57 +00:00
mycroft
4167d4b72c Compare baudrate() with 1200, not B1200. 1993-08-10 02:05:36 +00:00
jtc
defa0d9f09 Update to use new -mandoc macros. 1993-08-05 01:46:15 +00:00
mycroft
e9d867ef50 Add RCS identifiers. 1993-08-01 17:54:45 +00:00
mycroft
b1bd4afedc Add RCS indentifiers. 1993-08-01 07:42:49 +00:00
mycroft
cda4f8f6ee Add RCS identifiers. 1993-08-01 05:37:30 +00:00
cgd
f620d7d9f6 got rid of unnecessary -lcompat and associated dependency 1993-03-23 02:44:38 +00:00
cgd
61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00