summaryrefslogtreecommitdiffstats
path: root/tetris
Commit message (Collapse)AuthorAgeFilesLines
* games: remove trailing whitespace in *.c and *.hrillig2021-05-052-8/+8
|
* Use PREFIX nowCameron Katri2021-03-282-5/+7
|
* Get all the games compiling for iOSCameron Katri2021-02-224-12/+25
|
* avoid uninit memory and use memmove vs strncpy for a will bemrg2020-09-071-3/+3
| | | truncated on purpose string.
* apply ${GCC_NO_FORMAT_TRUNCATION} to scores.cmrg2020-09-061-1/+2
|
* tetris: Use arc4random_uniform instead of modulo for better randomnessnia2020-07-212-4/+3
|
* introduce some common variables for use in GCC warning disables:mrg2019-10-131-1/+3
| | | | | | | | | | | | | | | | | GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8) GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8) GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8) GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8) use these to turn off warnings for most GCC-8 complaints. many of these are false positives, most of the real bugs are already commited, or are yet to come. we plan to introduce versions of (some?) of these that use the "-Wno-error=" form, which still displays the warnings but does not make it an error, and all of the above will be re-considered as either being "fix me" (warning still displayed) or "warning is wrong."
* fix the previous. the code was right, just badly formatted before.mrg2018-06-241-4/+3
| | | should fix infinite loops reported in some cases.
* fix issues found by GCC 6.4:mrg2018-02-041-2/+3
| | | | | | | | | | | | | | | | | battlestar was missing some {} in its insane printf()+puts() usage. this is a literal code sequence i found: printf("The blast catches "); printf("the goddess in the "); printf("stomach, knocking "); puts("her to the ground."); printf("She writhes in the "); printf("dirt as the agony of "); puts("death taunts her."); puts("She has stopped moving."); no lines inserted or removed. tetris' checkscores() had wrong and missing {} usage.
* elide compiler stupidity.christos2017-03-201-11/+13
|
* tetris(6) is not limited to CRT displays. noted by tnndholland2016-03-121-2/+2
|
* Center game board on screen. OK from christos@.nat2016-03-033-4/+7
|
* PR/50411: Rin Okuyama: fix two bugs:christos2015-11-062-3/+5
| | | | - clear blocks in the 0 row, otherwise the pile up forever. - black (white) blocks are not shown as "next shape":
* Fixes color scheme white on black and black on white.nat2015-07-071-3/+8
| | | This commit was approved by christos@
* add -b to usage, from leotdholland2015-06-131-2/+2
|
* Fix the list of keys across the bottom so it fits on an 80-column screendholland2015-06-131-2/+2
| | | | | again. Fixes PR 49937. HI MRG
* Use Pp (mdoc) instead of sp (roff).wiz2015-02-191-7/+14
| | | Use An in AUTHORS section.
* add a 'down' key to tetris, defaulting to 'n'. it move the block downmrg2015-02-192-12/+23
| | | | | a line, if it fits. like most other tetris games have. minor clean up of magic number usage while here.
* Bump date for -c (exactly one year after previous bump)wiz2014-07-151-2/+2
|
* At suggestion of christos@, use -b for b&w rather than -cpgoyette2014-07-132-8/+8
|
* Provide an option to restore traditional black-and-white mode.pgoyette2014-07-134-6/+18
|
* Add a little color. In order to minimize logic differences, keep 0 as thechristos2014-06-114-24/+46
| | | | empty board value, and since 7 is white, turn white into black (0) when painting.
* Revert part of previous -r1.21 and fix the errno-handling bug instead.dholland2014-03-221-1/+4
|
* fix unused variable warningschristos2013-10-191-5/+2
|
* 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
|