summaryrefslogtreecommitdiffstats
path: root/games/random
AgeCommit message (Collapse)AuthorFilesLines
2016-03-07- General changes:mestre1-3/+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
2016-01-10As per style(9), remove remaining lint-style comments from games/mestre1-3/+1
OK tb@
2016-01-07Some basic code maintenance in games/tb1-2/+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 headers removal and sorted the remaining alphabetically.mestre1-4/+1
Most noticeable that were removed are sys/types.h which will be included from stdlib.h and in turn also brings along sys/cdefs.h. The other one is limits.h that was used with the old idiom (denom * random() / LONG_MAX), although it was only removed were applicable (some files still need that header). OK tb@
2016-01-03About 13 years ago when the idiom srandom(time()), and sometimesmestre1-4/+1
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 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-11-04replace setbuf with setvbuf, from Frederic Nowaktedu1-2/+2
2015-10-14Pledge "stdio" for simple games.doug1-1/+4
ok semarie@
2009-10-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt1-15/+1
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
2008-04-13Use arc4random_buf() when requesting more than a single word of outputdjm1-5/+5
Use arc4random_uniform() when the desired random number upper bound is not a power of two ok deraadt@ millert@
2007-05-31convert to new .Dd format;jmc1-2/+2
2004-07-10more ansi; khalek@linuxgamers.netderaadt1-6/+4
2003-06-03Remove the advertising clause in the UCB license which Berkeleymillert2-13/+5
rescinded 22 July 1999. Proofed by myself and Theo.
2002-05-31No dm -> no need to revoke setegid.pjanzen1-6/+2
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-3/+3
1999-05-23remove argument from .Os macros so value in /usr/share/tmac/mdoc/doc-commonaaron1-2/+2
is used instead; kwesterback@home.com
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 cleanuppjanzen2-7/+7
1997-10-01use arc4randomkstailey1-8/+6
1997-09-21$OpenBSD$deraadt1-2/+1
1997-01-15getopt(3) returns -1 when out of args, not EOF, whee!millert1-1/+1
1996-12-22proper gid revokederaadt1-0/+2
1996-12-19setgid games, not setuid games. closes a neat set of holesderaadt1-0/+2
1995-10-18initial import of NetBSD treederaadt3-0/+233