summaryrefslogtreecommitdiffstats
path: root/games/tetris (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-282-5/+5
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Remove unused variables; no binary change.lteo2019-05-201-3/+3
| | | | From Jake Champlin
* Unveil tetris.rob2019-05-183-14/+27
| | | | ok brynet@, tedu@
* Use a NUMKEYS macro instead of magic and use a more familiar idiomtb2018-04-251-6/+7
| | | | | | in for loops. ok stsp, bcallah
* replace gettimeofday with monotonic gettime. from Scott Chelohatedu2017-08-134-59/+45
| | | | ok tb
* No need for a conditional to choose between nroff and troff.bentley2017-06-191-4/+3
| | | | ok jmc@
* According to termcap(3), char PC, *BC, *UP need to be extern. Fixes antb2017-04-161-2/+2
| | | | | | ld(1) error found by mestre a while ago. fix suggested and ok naddy
* Pull in <sys/time.h> for struct timespec, gettimeofday(), clock_gettime(),guenther2016-08-271-1/+2
| | | | | | and setitimer() ok deraadt@
* Pull in <time.h> for time() and perhaps other functionsguenther2016-08-271-1/+2
| | | | ok deraadt@
* Clean up gcc -Wshadow warnings: 'numnames' is public in <term.h>.tb2016-06-102-8/+7
| | | | | | | 'i' shadows the local loop indexing variable of scr_update(), so no need to rename it. No binary change on amd64. ok millert
* When eliding a row, clear the invisible row zero, so that no columnstb2016-06-101-1/+2
| | | | | | | 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
* Prefer fseek(3) over rewind(3) since the latter although it also calls fseekmestre2016-03-161-2/+3
| | | | | | | then additionally it calls clearerr(3) deliberately but we want to catch any error that may happen and this way we couldn't catch it OK tb@
* - General changes:mestre2016-03-071-2/+3
| | | | | | | | | | | | - 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
* As per style(9), remove remaining lint-style comments from games/mestre2016-01-101-2/+1
| | | | OK tb@
* Some basic code maintenance in games/tb2016-01-071-3/+3
| | | | | | | | | | - 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@
* More cleanup and sorting on header sectionmestre2016-01-045-22/+12
| | | | | 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
* About 13 years ago when the idiom srandom(time()), and sometimesmestre2016-01-031-5/+4
| | | | | | | | | | | | srandom(time()+getpid()), was changed by srandomdev(), but #include <time.h> lived up until this day so remove it. Additionally, earlier than that, 18 years ago, random(6) was one of the first consumers of arc4random(3) family, and was pulling it from dev/rndvar.h but these days we pull it from stdlib.h, which is already done, so while here remove dev/rndvar.h also. "seems comprehensive to me" deraadt@ and OK tb@
* remove unused variablechl2015-12-271-2/+2
| | | | ok tb@
* Declare usage() functions as __dead void, if they don't return, on games section.mestre2015-12-251-2/+2
| | | | | | 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@
* Tweak alignment of ENVIRONMENT and FILES.tb2015-12-041-4/+4
| | | | | | Use sentence format for the highscore file, too. Discussed with jmc@
* Prefer $LOGNAME over $USER, since the latter is deprecated,tb2015-11-292-6/+14
| | | | | | | see environ(7). Pointed out by millert@. Fall back to getlogin(2) before defaulting to ???. looks good to deraadt@
* Fix copy-paste error in scorefile nametb2015-11-261-2/+2
| | | | From Ricardo Mestre
* Add missing checks for getenv() and snprintf()tb2015-11-261-6/+12
| | | | From Ricardo Mestre, thanks!
* The scorefile is hidden.tb2015-11-251-4/+4
| | | | From Ricardo Mestre, thanks!
* pledge "stdio rpath wpath cpath tty"tb2015-11-203-12/+9
| | | | | | | "stdio rpath tty" for game play "rpath wpath cpath" for maintaining highscores in $USER ok deraadt@ sthen@
* remove setgid flag.tedu2015-11-173-81/+16
| | | | | in turn, move score files into user's home directory. will let theo buehler continue with a smaller pledge set.
* use file system path (.Pa) semantic markup macros where appropriate.sobrado2015-07-271-3/+3
|
* simplify poll() conversion. from patrick keshishiantedu2014-12-311-8/+6
|
* we do not use pcc on the vaxderaadt2014-12-071-5/+1
|
* Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,guenther2014-11-163-11/+12
| | | | | | | | | 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@
* don't deref timeout if null. from theo buehler.tedu2014-11-051-6/+7
|
* select() to poll() conversionsderaadt2014-11-031-10/+6
| | | | ok tedu (... other games maintainer absent)
* obvious cases of missing .An;schwarze2014-09-081-6/+12
| | | | | found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
* replace srandomdev()+random() with the arc4random*() familynaddy2013-08-291-4/+3
| | | | tweaks and ok millert@, ok deraadt@
* Hide the cursor during game. From NetBSD.dcoppa2011-04-031-2/+10
| | | | OK nicm@
* sub-function needs const, tooderaadt2010-07-201-3/+3
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-281-7/+1
| | | | | unmaintainable). these days, people use source. spotted by schwarze
* 'coordiates' -> 'coordinates' from Dawe via tech@.krw2008-08-101-2/+2
|
* synchronization between usage and synopsis; add some missing "usage:"'ssobrado2008-03-171-2/+2
| | | | ok jmc@
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* Replace magic numbers with sizeof(array).ray2006-04-202-5/+5
| | | | OK jaredy@
* Clean up getopt stuff and use strtonum instead of atoi.ray2006-04-201-6/+6
| | | | OK jaredy@
* use STD{IN,OUT,ERR}_FILENOderaadt2005-04-131-3/+3
|
* more ansi; khalek@linuxgamers.netderaadt2004-07-105-57/+33
|
* bonus points for completing rows, like most variants.tedu2004-01-102-2/+22
| | | | ok deraadt mcbride millert nick otto pjanzen
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-0311-66/+22
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* string cleaning; ok pjanzenderaadt2003-04-081-2/+2
|
* 2451 lines of strdup/sprintf/strcpy whacking. mostly ok'd by pjanzenderaadt2003-04-062-4/+4
| | | | already, but he may have later changes to make still.
* Replace things like srandom(time(NULL)) with srandomdev(3). random(3)millert2002-12-061-2/+2
| | | | | good enough for games but we should at least use a decent seed. pjanzen@ OK
* give it some healthy dosage of vitamin constmickey2002-07-264-21/+21
|