summaryrefslogtreecommitdiff
path: root/games/tetris/tetris.c
AgeCommit message (Collapse)Author
2019-05-18Unveil tetris.rob
ok brynet@, tedu@
2018-04-25Use a NUMKEYS macro instead of magic and use a more familiar idiomTheo Buehler
in for loops. ok stsp, bcallah
2017-08-13replace gettimeofday with monotonic gettime. from Scott ChelohaTed Unangst
ok tb
2016-06-10When eliding a row, clear the invisible row zero, so that no columnsTheo Buehler
can become unusable during game play. Same fix was made in NetBSD's tetris.c -r1.31 by Christos Zoulas almost exactly a year ago. ok tedu
2016-03-07- General changes:mestre
- Remove -? from getopt(3) options, but still keep (or add) -h where applicable - Replace hardcoded program strings by getprogname(3) - Specific changes: - atc(6): this used -? and -u for usage(), remove both from game and manpage - bcd(6): use __progname instead of getprogname(3), no need to include stdlib.h - hunt(6): replace fputs(3) by fprintf(3) OK tb@ after his suggestions
2016-01-07Some basic code maintenance in games/tb
- in main() replace exit with return - drop some /* NOTREACHED */ lint comments along the way. - make more use of standard CFLAGS, esp. -Wimplicit-function-declaration - add and sort some headers when needed - add straightforward pledges to some programs used at compile time discussed with and ok mestre@
2016-01-04More cleanup and sorting on header sectionmestre
OK tb@ and he also pointed out that for consistency with rest of the tree we should include termios.h instead of sys/ttydefaults.h, where applicable
2015-12-25Declare usage() functions as __dead void, if they don't return, on games ↵mestre
section. Found another one in arithmetic(6) which also didn't return, and removed a function from number(6) which is not used anymore. OK tb@
2015-11-20pledge "stdio rpath wpath cpath tty"tb
"stdio rpath tty" for game play "rpath wpath cpath" for maintaining highscores in $USER ok deraadt@ sthen@
2014-11-16Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,Philip Guenther
and <sys/ttydefaults.h> Replace MAXPATHLEN with PATH_MAX and MAXLOGNAME with LOGIN_NAME_MAX Pull in <limits.h> where needed Prefer sizeof(var) over MAXFOO or FOO_MAX ok deraadt@
2013-08-29replace srandomdev()+random() with the arc4random*() familyChristian Weisgerber
tweaks and ok millert@, ok deraadt@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. spotted by schwarze
2008-03-17synchronization between usage and synopsis; add some missing "usage:"'sIgor Sobrado
ok jmc@
2006-04-20Clean up getopt stuff and use strtonum instead of atoi.Ray Lai
OK jaredy@
2004-07-10more ansi; khalek@linuxgamers.netTheo de Raadt
2004-01-10bonus points for completing rows, like most variants.Ted Unangst
ok deraadt mcbride millert nick otto pjanzen
2003-06-03Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-04-08string cleaning; ok pjanzenTheo de Raadt
2003-04-062451 lines of strdup/sprintf/strcpy whacking. mostly ok'd by pjanzenTheo de Raadt
already, but he may have later changes to make still.
2002-12-06Replace things like srandom(time(NULL)) with srandomdev(3). random(3)Todd C. Miller
good enough for games but we should at least use a decent seed. pjanzen@ OK
2002-07-26give it some healthy dosage of vitamin constMichael Shalayeff
2002-07-26add classic mode, closer to the way tetris felt a couple decades ago; ↵Michael Shalayeff
pjanzen@ ok
2002-05-31de-registerPaul Janzen
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-11-19mark signal race, fix half of itTheo de Raadt
2001-02-04Long usernames. This really messes up the scoreboard printout, so changePaul Janzen
it from two columns to one column with leaders printed every third score to guide the eye across the vast whitespace that's left with the traditional 8-char usernames.
2000-01-03extern rather than linker commons; jsm@netbsd.orgPaul Janzen
1999-03-22Many fixes, most either from or based on NetBSD changes:Paul Janzen
get rid of unused function improve output format allow previewing of next piece randomize initial rotation angle of falling blocks.
1999-03-22cosmetic changes from soren@t.dkPaul Janzen
1999-02-12kill old mips compiler hack; simonb@netbsdTheo de Raadt
1998-09-24NetBSD changes and a few obvious fixesPaul Janzen
1997-01-15getopt(3) returns -1 when out of args, not EOF, whee!Todd C. Miller
1996-12-21Relinguish SGID games, restore it only when opening the score fileThorsten Lockert
1995-10-18initial import of NetBSD treeTheo de Raadt