summaryrefslogtreecommitdiff
path: root/games/grdc
AgeCommit message (Collapse)Author
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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-06missing word found in my treeIngo Schwarze
2019-01-06allow q to exit the program.Ted Unangst
ok cheloha deraadt schwarze
2018-08-23reduce pledge(2) to "stdio tty" after ncurses initialization.Ricardo Mestre
OK tb@
2017-12-11The code can be simplified by using clock_gettime(2)'s CLOCK_REALTIMETheo Buehler
instead of gettimeofday(2). From Scott Cheloha, ok jca
2017-07-13Convert fprintf(stderr, ...) to errx/warnx (with slight change of output).Theo Buehler
From Scott Cheloha
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
2016-01-03About 13 years ago when the idiom srandom(time()), and sometimesmestre
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@
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-12-09include err.h for err()Jonathan Gray
2015-11-30unspectacular pledge "stdio rpath tty" for grdctb
2014-11-19Bugfix: run for the specified number of seconds as described in the manual,Ingo Schwarze
not for a fixed number of iterations. This makes a difference on terminals not fast enough to update every second, in particular in -s mode. Inspired by FreeBSD, but implemented differently with less bugs. Patch from pjanzen@, slightly tweaked by me.
2014-11-18sigwinch support for resizing. from pjanzenTed Unangst
2014-11-18Center the clock. Based on an idea and an original diff from tedu@,Ingo Schwarze
arithmetics and validity constraints fixed by me. OK pjanzen@ tedu@
2014-11-17Multiple improvements from pjanzen@:Ingo Schwarze
* properly delay scrolling with nanosleep(2), relevant on fast terminals * change timing to end scrolling on the second instead of starting it * error out if the terminal is too small instead of garbling the output * use strtonum(3) rather than strtol(3) and terminate error message with \n
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2008-03-17synchronization between usage and synopsis; add some missing "usage:"'sIgor Sobrado
ok jmc@
2007-05-31convert to new .Dd format;Jason McIntyre
2004-11-29Use volatile sig_atomic_t rather than int for sigtermed, from pjanzen@Jonathan Gray
ok miod@, otto@
2004-11-29ansi. ok deraadt@Jonathan Gray
2002-07-26The elusive original author of this program and man page surfaced long enoughPaul Janzen
to state the following, when asked about licensing issues: "It's ok to put any copyright as long as it stays in the public domain. ... Since I did not write it to make any profit or fame in the first place, I guess its use is not limited by any license. Of course I would not object to my name being mentioned." Then he disappeared again. So I've put on a current copyright to him, and labelled the code explicitly as public domain.
2002-05-31No dm -> no need to revoke setegid.Paul 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-17section consistency: AUTHOR -> AUTHORS, even if only one listed;Paul Janzen
mpech@prosoft.org.lv
2001-08-18FormattingPaul Janzen
2000-07-05nanosleep() no longer returns earlyPaul Janzen
2000-01-24parse command line more carefully; watch out for nanosleep() ending aPaul Janzen
little too early; and do some general tidying
2000-01-21Hide cursor if possiblePaul Janzen
2000-01-20track seconds more accurately. ok pjanzen@David Leonard
1999-05-23remove argument from .Os macros so value in /usr/share/tmac/mdoc/doc-commonAaron Campbell
is used instead; kwesterback@home.com
1998-12-15Always provide an argument to .Nm in SYNOPSIS sectionPaul Janzen
1998-07-24-lcurses, not termcap/termlibTodd C. Miller
1998-03-19Minor tweaks, mainly setgid-relatedPaul Janzen
1997-09-21$OpenBSD$Theo de Raadt
1997-08-04And another one bites the dust.Jason Downs
1997-07-31time_t is not longTheo de Raadt
1996-12-22proper gid revokeTheo de Raadt
1996-12-19setgid games, not setuid games. closes a neat set of holesTheo de Raadt
1996-08-21From FreeBSD.Jason Downs