summaryrefslogtreecommitdiffstats
path: root/games/robots
AgeCommit message (Collapse)AuthorFilesLines
2020-02-14no need to declare "extern optarg" and "extern optind"schwarze1-2/+1
when <unistd.h> is included; patch from Jan Stary <hans at stare dot cz>; OK millert
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt2-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.
2019-02-26g/c unused robots_roll file.tb1-5/+1
From Randy Hartman
2018-08-23reduce pledge(2) to "stdio tty" after ncurses initialization. robots(6) uses amestre1-1/+5
scorefile nevertheless an fd is opened way in advance and therefore we can disable any further access to the filesystem. OK tb@
2017-05-28remove some escapes that are unnecessary/harmful. ok jmc schwarzetedu1-5/+5
2017-05-28remove unused macrotedu1-3/+1
2017-05-28there are no bugs; i fixed themtedu1-7/+2
2017-05-28if your dying scream would escape the death field, realign to stay withintedu1-2/+5
2017-05-28high scores printed too far to the right, move it left a littletedu1-2/+2
2016-08-27Pull in <sys/time.h> for struct timespec, gettimeofday(), clock_gettime(),guenther2-2/+4
and setitimer() ok deraadt@
2016-03-07- General changes:mestre1-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
2016-01-07Some basic code maintenance in games/tb1-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@
2016-01-04More cleanup and sorting on header sectionmestre11-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
2015-12-26Set as __dead a few more functions, that don't return, on games/mestre1-2/+2
With precious tip, help and also OK from tb@
2015-12-25Declare usage() functions as __dead void, if they don't return, on games section.mestre1-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@
2015-12-04put FILES into a similar format as ENVIRONMENT;jmc1-2/+2
2015-12-04Drop pledge("getpw") and pwd.h and use the now usualtb4-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
2015-11-29Move scorefile to $HOME. The nice implementation of the score filetb5-56/+29
depends on getpwuid(), so add "getpw" to the rest of the required pledges: "stdio rpath wpath cpath tty".
2015-11-24In 1995, all of the games were setuid games. At end of 1996, I took them allderaadt1-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
2015-08-26Improve robots(6) by using timespec*() functions, replacing gettimeofday()rzalamena4-22/+19
with clock_gettime(MONOTONIC) to avoid clock changes and replacing poll() with ppoll() to deal better with timespec. ok guenther@.
2014-11-16Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,guenther2-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@
2014-11-03select() to poll() conversionsderaadt4-9/+11
ok tedu (... other games maintainer absent)
2014-09-08obvious cases of missing .An;schwarze1-3/+3
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2013-08-29replace srandomdev()+random() with the arc4random*() familynaddy2-4/+3
tweaks and ok millert@, ok deraadt@
2009-10-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt10-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
2007-05-31convert to new .Dd format;jmc1-2/+2
2005-05-01use setresgid() to drop privs, it is simply a better and less ambiguous API;djm1-5/+6
ok deraadt@ and millert@ a while ago, more to come
2005-04-10sort options + sync usage();jmc2-13/+13
2004-11-29ansi. ok deraadt@jsg9-53/+41
2003-06-03Remove the advertising clause in the UCB license which Berkeleymillert13-88/+36
rescinded 22 July 1999. Proofed by myself and Theo.
2002-12-06Replace things like srandom(time(NULL)) with srandomdev(3). random(3)millert1-3/+3
good enough for games but we should at least use a decent seed. pjanzen@ OK
2002-05-31crmode -> cbreakpjanzen1-3/+3
2002-05-31de-registerpjanzen8-35/+35
2002-05-31No dm -> games with high score files etc. must explicitly be setgid games.pjanzen1-1/+2
2002-05-23The troll strikes.. The troll strikes.. The dungeon master dies.distrib/sets/listsderaadt1-2/+1
2002-02-16Part 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.millert1-23/+23
2001-11-17section consistency: AUTHOR -> AUTHORS, even if only one listed;pjanzen1-2/+2
mpech@prosoft.org.lv
2001-08-18Formattingpjanzen1-7/+7
2001-08-12Nothing but comments after #endif; heko@pjanzen1-6/+6
2001-08-06Nothing but comments after #endif and #else; heko@iki.fipjanzen1-3/+3
2001-06-06reorder sections, minor tidying; mpech@prosoft.org.lvpjanzen1-3/+3
2000-07-23Handle EOF on stdin.pjanzen1-2/+3
2000-01-21Remove unused function; jsm@netbsd.orgpjanzen1-9/+2
1999-12-18Enable realtime mode, use native curses functions when available, tidy manpjanzen10-173/+144
page, and use MAXLOGNAME for scorefile (this makes new scorefiles incompatible with old ones). Realtime idea and some code from d@.
1999-07-09- remove all trailing whitespaceaaron1-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...
1998-12-15Always provide an argument to .Nm in SYNOPSIS sectionpjanzen1-2/+2
1998-11-29Don't capitalize game names at the beginning of sentences.pjanzen1-2/+2
1998-08-22More largely NetBSD-inspired code cleanuppjanzen7-29/+27
1998-07-24-lcurses, not termcap/termlibmillert1-3/+3
1998-07-09Scorefile bugfix and minor code cleaning, some from NetBSDpjanzen12-144/+186