Home | History | Annotate | Download | only in worm
History log of /src/games/worm/worm.c
RevisionDateAuthorComments
 1.32  11-Dec-2024  maya Add a message when malloc fails

from nightquick in PR misc/58706
 1.31  17-Aug-2015  dholland branches: 1.31.28;
remove cpp abuse
 1.30  23-May-2011  joerg ANSIfy
 1.29  12-Aug-2009  dholland sprinkle static
 1.28  08-Aug-2008  drochner if initscr() fails, exit with a message rather than crash in the
next curses call
 1.27  20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
 1.26  15-Dec-2007  perry branches: 1.26.6;
convert __attribute__s to applicable cdefs.h macros
 1.25  27-Jan-2004  jsm branches: 1.25.22;
Remove uses of __P.
 1.24  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.23  06-Dec-2001  blymn Change deprecated curses function to new equivalent.
 1.22  31-Aug-2001  jsm 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>.
 1.21  30-Aug-2001  jsm 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.
 1.20  29-Aug-2001  jsm Remove documented bug with long worm lengths, and improve handling of
non-standard screen sizes. From OpenBSD.
 1.19  08-May-2000  mycroft Use setgid(), not setregid().
 1.18  09-Jan-2000  jsm Use err(1, NULL) and warn(NULL) for `out of memory' error messages.
 1.17  26-Oct-1999  cgd support arrow keys.
 1.16  12-Sep-1999  jsm branches: 1.16.2;
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.
 1.15  09-Sep-1999  jsm Check for failure of malloc() and calloc() at various places in the games.
 1.14  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.13  08-Sep-1999  jsm 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.
 1.12  10-Aug-1999  hubertf Leave ^Z-handling to the system (curses? no idea, at least it works :-),
and don't wait for two seconds when game is over.
 1.11  08-Aug-1999  hubertf Print score after endwin() so it isn't deleted immediately afterward.
 1.10  28-Jul-1999  hubertf 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.
 1.9  13-Sep-1998  hubertf mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>)
 1.8  12-Oct-1997  lukem WARNSify
 1.7  29-Apr-1995  mycroft Remove incorrect (but unused) definition of baudrate().
 1.6  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.5  22-Apr-1995  cgd clean up import, fix up Ids
 1.4  03-Dec-1993  mycroft Restructure a switch to eliminate a compiler warning.
 1.3  10-Aug-1993  mycroft Compare baudrate() with 1200, not B1200.
 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  22-Apr-1995  cgd src/games/worm from Lite
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.16.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.25.22.1  09-Jan-2008  matt sync with HEAD
 1.26.6.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.31.28.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed