summaryrefslogtreecommitdiffstats
path: root/games/robots (follow)
Commit message (Collapse)AuthorAgeFilesLines
* no need to declare "extern optarg" and "extern optind"schwarze2020-02-141-2/+1
| | | | | | when <unistd.h> is included; patch from Jan Stary <hans at stare dot cz>; OK millert
* 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.
* g/c unused robots_roll file.tb2019-02-261-5/+1
| | | | From Randy Hartman
* reduce pledge(2) to "stdio tty" after ncurses initialization. robots(6) uses amestre2018-08-231-1/+5
| | | | | | | scorefile nevertheless an fd is opened way in advance and therefore we can disable any further access to the filesystem. OK tb@
* remove some escapes that are unnecessary/harmful. ok jmc schwarzetedu2017-05-281-5/+5
|
* remove unused macrotedu2017-05-281-3/+1
|
* there are no bugs; i fixed themtedu2017-05-281-7/+2
|
* if your dying scream would escape the death field, realign to stay withintedu2017-05-281-2/+5
|
* high scores printed too far to the right, move it left a littletedu2017-05-281-2/+2
|
* Pull in <sys/time.h> for struct timespec, gettimeofday(), clock_gettime(),guenther2016-08-272-2/+4
| | | | | | and setitimer() ok deraadt@
* - General changes:mestre2016-03-071-2/+2
| | | | | | | | | | | | - 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
* Some basic code maintenance in games/tb2016-01-071-3/+2
| | | | | | | | | | - 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-0411-34/+44
| | | | | 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
* Set as __dead a few more functions, that don't return, on games/mestre2015-12-261-2/+2
| | | | With precious tip, help and also OK from 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@
* put FILES into a similar format as ENVIRONMENT;jmc2015-12-041-2/+2
|
* Drop pledge("getpw") and pwd.h and use the now usualtb2015-12-044-12/+22
| | | | | | | LOGNAME -> USER -> getlogin() -> ??? fallback in the score file, as requested by tedu@ Man page bits adapted from jmc@'s tweaks to snake.6
* Move scorefile to $HOME. The nice implementation of the score filetb2015-11-295-56/+29
| | | | | depends on getpwuid(), so add "getpw" to the rest of the required pledges: "stdio rpath wpath cpath tty".
* In 1995, all of the games were setuid games. At end of 1996, I took them allderaadt2015-11-241-2/+1
| | | | | | | | | to setgid games, and we started wittling them down. Nearly 10 years later I am removing all setgid from the games. If any of these have score files they are now broken, and I hope various folk repair them. I have argued for years (and received pushback...) that the score file features must be removed, or rewritten to use private files, because setgid is the wrong tool. ok tedu
* Improve robots(6) by using timespec*() functions, replacing gettimeofday()rzalamena2015-08-264-22/+19
| | | | | | | with clock_gettime(MONOTONIC) to avoid clock changes and replacing poll() with ppoll() to deal better with timespec. ok guenther@.
* Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,guenther2014-11-162-5/+5
| | | | | | | | | 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@
* select() to poll() conversionsderaadt2014-11-034-9/+11
| | | | ok tedu (... other games maintainer absent)
* obvious cases of missing .An;schwarze2014-09-081-3/+3
| | | | | found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
* replace srandomdev()+random() with the arc4random*() familynaddy2013-08-292-4/+3
| | | | tweaks and ok millert@, ok deraadt@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-2710-96/+10
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* use setresgid() to drop privs, it is simply a better and less ambiguous API;djm2005-05-011-5/+6
| | | | ok deraadt@ and millert@ a while ago, more to come
* sort options + sync usage();jmc2005-04-102-13/+13
|
* ansi. ok deraadt@jsg2004-11-299-53/+41
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-0313-88/+36
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Replace things like srandom(time(NULL)) with srandomdev(3). random(3)millert2002-12-061-3/+3
| | | | | good enough for games but we should at least use a decent seed. pjanzen@ OK
* crmode -> cbreakpjanzen2002-05-311-3/+3
|
* de-registerpjanzen2002-05-318-35/+35
|
* No dm -> games with high score files etc. must explicitly be setgid games.pjanzen2002-05-311-1/+2
|
* The troll strikes.. The troll strikes.. The dungeon master dies.distrib/sets/listsderaadt2002-05-231-2/+1
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-23/+23
|
* section consistency: AUTHOR -> AUTHORS, even if only one listed;pjanzen2001-11-171-2/+2
| | | | mpech@prosoft.org.lv
* Formattingpjanzen2001-08-181-7/+7
|
* Nothing but comments after #endif; heko@pjanzen2001-08-121-6/+6
|
* Nothing but comments after #endif and #else; heko@iki.fipjanzen2001-08-061-3/+3
|
* reorder sections, minor tidying; mpech@prosoft.org.lvpjanzen2001-06-061-3/+3
|
* Handle EOF on stdin.pjanzen2000-07-231-2/+3
|
* Remove unused function; jsm@netbsd.orgpjanzen2000-01-211-9/+2
|
* Enable realtime mode, use native curses functions when available, tidy manpjanzen1999-12-1810-173/+144
| | | | | page, and use MAXLOGNAME for scorefile (this makes new scorefiles incompatible with old ones). Realtime idea and some code from d@.
* - remove all trailing whitespaceaaron1999-07-091-3/+3
| | | | | | | | | | * except when it is escaped with a `\' at the end of the line - fix remaining .Nm usage as well - this is from a patch I received from kwesterback@home.com, who has been working on some scripts for fixing formatting errors in mdoc'd man pages Ok, so there could be a cost/benefit debate with this commit, but since I have the patch we might as well commit it...
* Always provide an argument to .Nm in SYNOPSIS sectionpjanzen1998-12-151-2/+2
|
* Don't capitalize game names at the beginning of sentences.pjanzen1998-11-291-2/+2
|
* More largely NetBSD-inspired code cleanuppjanzen1998-08-227-29/+27
|
* -lcurses, not termcap/termlibmillert1998-07-241-3/+3
|
* Scorefile bugfix and minor code cleaning, some from NetBSDpjanzen1998-07-0912-144/+186
|