Home | History | Annotate | Download | only in tetris
History log of /src/games/tetris/tetris.c
RevisionDateAuthorComments
 1.34  01-Jul-2023  nia tetris(6): Support the informal standard of allowing setting NO_COLOR
in the environment to disable the use of color. (no-color.org)
 1.33  21-Jul-2020  nia tetris: Use arc4random_uniform instead of modulo for better randomness
 1.32  03-Mar-2016  nat Center game board on screen. OK from christos@.
 1.31  06-Nov-2015  christos PR/50411: Rin Okuyama: fix two bugs:
- clear blocks in the 0 row, otherwise the pile up forever.
- black (white) blocks are not shown as "next shape":
 1.30  13-Jun-2015  dholland add -b to usage, from leot
 1.29  13-Jun-2015  dholland Fix the list of keys across the bottom so it fits on an 80-column screen
again. Fixes PR 49937.

HI MRG
 1.28  19-Feb-2015  mrg add a 'down' key to tetris, defaulting to 'n'. it move the block down
a line, if it fits. like most other tetris games have.

minor clean up of magic number usage while here.
 1.27  13-Jul-2014  pgoyette branches: 1.27.2;
At suggestion of christos@, use -b for b&w rather than -c
 1.26  13-Jul-2014  pgoyette Provide an option to restore traditional black-and-white mode.
 1.25  11-Jun-2014  christos Add a little color. In order to minimize logic differences, keep 0 as the
empty board value, and since 7 is white, turn white into black (0) when
painting.
 1.24  31-Aug-2011  plunky branches: 1.24.8; 1.24.18;
NULL does not need a cast
 1.23  05-Dec-2010  pgoyette Fix a few of the games to use getprogname() in their usage() functions.

Suggested by Joerg.

XXX There are probably many more that have their progname hard-coded, but
XXX I'm not up for a wholesale roto-till at the moment.
 1.22  12-Aug-2009  dholland sprinkle static
 1.21  25-May-2009  dholland ANSIfy function declarations.

Some object file diffs, but they are harmless. (Mostly they seem to
come from internal counters in gcc... and in one case the order of two
instructions was harmlessly swapped, which is odd and annoying.)
 1.20  25-May-2009  dholland sprintf -> snprintf
 1.19  20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
 1.18  15-Dec-2007  perry branches: 1.18.6;
convert __attribute__s to applicable cdefs.h macros
 1.17  27-Jan-2004  jsm branches: 1.17.22;
Remove uses of __P.
 1.16  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.15  02-Jun-2002  wiz de-register
 1.14  21-Jan-2000  jsm Clean up error reporting in tetris.
 1.13  01-Jan-2000  jsm Declare variables as extern in headers rather than using linker commons.
 1.12  12-Sep-1999  jsm 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.11  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.10  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.9  22-Mar-1999  abs Newline and usage cosmetics from Soren S. Jorvang <soren@t.dk> PR7205
 1.8  11-Feb-1999  simonb Remove unneeded "mips compiler bug" workaround from original code imported
in 1994.
 1.7  03-Jan-1999  hubertf only show preview if the -p option is given
 1.6  03-Jan-1999  hubertf Add previewing of next shape. Old (previous) behaviour can be
restored by compiling with NO_PREVIEW defined.
 1.5  13-Sep-1998  hubertf mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>)
 1.4  10-Aug-1998  perry bzero->memset
 1.3  12-Oct-1997  lukem minor WARNSify
 1.2  22-Apr-1995  cgd NetBSD RCS Ids
 1.1  06-May-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1  06-May-1994  cgd ascii tetris!
 1.17.22.1  09-Jan-2008  matt sync with HEAD
 1.18.6.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.24.18.1  10-Aug-2014  tls Rebase.
 1.24.8.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.2.1  18-Mar-2015  snj Pull up following revision(s) (requested by mrg in ticket #622):
games/tetris/tetris.6: revision 1.15
games/tetris/tetris.c: revision 1.28
add a 'down' key to tetris, defaulting to 'n'. it move the block down
a line, if it fits. like most other tetris games have.
minor clean up of magic number usage while here.

RSS XML Feed