summaryrefslogtreecommitdiffstats
path: root/tetris
Commit message (Collapse)AuthorAgeFilesLines
* Use tiparm instead of vtparm.roy2011-10-031-2/+2
|
* NULL does not need a castplunky2011-08-311-2/+2
|
* Fix fd leak in error cases. Found by cppcheck.wiz2011-01-051-12/+12
|
* Fix a few of the games to use getprogname() in their usage() functions.pgoyette2010-12-051-2/+3
| | | | | | 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.
* Userland now builds and uses terminfo instead of termcap.roy2010-02-033-150/+44
| | | OK: core@, jdc@
* Hide the cursor during the game.ahoka2009-12-191-2/+10
|
* Disable writing scores when built for /rescue. PR 42009dholland2009-09-081-2/+18
|
* sprinkle staticdholland2009-08-124-17/+14
|
* Don't use a variable-size array here. There's not really that much point.dholland2009-06-011-2/+2
|
* Clean up scorefile handling.dholland2009-05-252-36/+556
| | | | | | | | | | | | | | | | | | | | | | This was writing time_t to disk. Worse, the time_t member was at an unaligned offset in the structure in question, so after the time_t change the structure layout depended on compiler-inserted structure padding. This gives three legacy formats: one with 32-bit time, one with 64-bit time, and one with 64-bit time and 4 bytes of structure padding. And of course the file didn't have a header or version coding or anything. The new code writes a structure of well-defined size that should not receive unexpected padding, and gives the file a header and version number. It reads that format and any of the three legacy formats, figuring out which one it's dealing with by inspecting the file contents. For good measure, it also now handles opposite-endian files, doesn't bail out unceremoniously unless necessary, and won't croak if the file is corrupt and e.g. contains unterminated strings. (Was it worth going to this length? Maybe not. But it didn't seem right to just leave it, and it's not clear where to stop halfway.)
* ANSIfy function declarations.dholland2009-05-256-58/+34
| | | | | 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.)
* sprintf -> snprintfdholland2009-05-251-2/+2
|
* Remove the \n and tabs from the __COPYRIGHT() strings.lukem2008-07-201-3/+3
|
* Make the default WARNS for games 4. The only game that needs to set WARNSdholland2008-01-281-2/+1
| | | to anything else now is rogue, so clear WARNS from the other makefiles.
* Build with WARNS=4. (All fixes are cosmetic, except that it's definitelydholland2008-01-282-28/+29
| | | | bad karma to shadow a local variable with another of the same name in a nested block...)
* convert __attribute__s to applicable cdefs.h macrosperry2007-12-152-6/+6
|
* include sys/cdefs.h so that __attribute__ can be fixed laterperry2007-12-151-1/+2
|
* don't discard const. GCC 4.1-20061021 doesn't like that...mrg2006-10-221-3/+3
|
* Better check data read from tetris.scores before use as array indices etc.drochner2006-06-011-9/+12
| | | | | | This is CVE-2006-1539, files against Gentoo Linux, the patch is from Gentoo. A standard NetBSD installation is not as much risk because tetris is sgid "games", and users shouldn't be in that group.
* Coverity CID 868: Fix possible NULL deref (after INFTIM passes :-)christos2006-03-191-3/+5
|
* Use standard AUTHORS section header. From YOMURA Masanori in private mailwiz2005-09-151-4/+3
| | | Sort sections if necessary. Use more/better markup.
* Remove uses of __P.jsm2004-01-277-36/+36
|
* Move UCB-licensed code from 4-clause to 3-clause licence.agc2003-08-0711-66/+22
| | | Patches provided by Joel Baker in PR 22269, verified by myself.
* Correct some comments and error messages that still talked about "select".kristerw2002-12-291-10/+5
| | | Solves the last part of PR 18905.
* Fix a bug in rwait() introduced during the select() to poll() conversionjmmv2002-12-261-5/+6
| | | that caused tetris to crash when pausing the game. Approved by tron.
* Lots of minor fixes resulting from reading these man pages in detail.wiz2002-09-261-4/+4
|
* select() -> poll()mycroft2002-09-191-4/+6
|
* de-registerwiz2002-06-025-40/+40
|
* Generate <>& symbolically. I'm avoiding .../dist/... directories for now.ross2002-02-081-3/+3
|
* Update to the new t_agetstr() API.christos2001-11-021-6/+3
|
* Whitespace and/or punctuation fixes.wiz2001-04-021-2/+2
|
* Fix core dump.blymn2000-05-241-2/+2
|
* Converted games to use the new termcap interface.blymn2000-05-222-11/+20
|
* Clean up error reporting in tetris.jsm2000-01-212-11/+7
|
* Fix high score table formatting bug.jsm2000-01-211-3/+2
| | | Bug report and fix from Malcolm Parsons <malcolm@bits.bris.ac.uk>.
* Declare variables as extern in headers rather than using linker commons.jsm2000-01-013-13/+26
|
* update after change to return value of tputs() third argumentlukem1999-10-042-5/+5
|
* Fix -Wsign-compare warnings.jsm1999-09-181-2/+2
|
* Convert tetris to use <err.h> functions.jsm1999-09-171-15/+8
|
* Security improvements for games (largely from or inspired by OpenBSD).jsm1999-09-123-3/+26
| | | | | | | | | | | | | | | 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.
* Add `__noreturn__' and `__unused__' attributes where appropriate tojsm1999-09-082-4/+4
| | | | | | | | | | | | 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).
* Add use of `const' where appropriate to the games.jsm1999-09-085-19/+19
| | | | | | | | | 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.
* Adapt to change of "termcap.h".tron1999-08-141-2/+2
|
* Newline and usage cosmetics from Soren S. Jorvang <soren@t.dk> PR7205abs1999-03-221-4/+4
|
* Remove unneeded "mips compiler bug" workaround from original code importedsimonb1999-02-111-5/+1
| | | in 1994.
* only show preview if the -p option is givenhubertf1999-01-034-16/+16
|
* Add previewing of next shape. Old (previous) behaviour can behubertf1999-01-036-27/+62
| | | restored by compiling with NO_PREVIEW defined.
* mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>)hubertf1998-09-132-5/+5
|
* bzero->memsetperry1998-08-102-4/+4
|
* install games that need it setgid.mrg1997-11-201-1/+2
|