convert to unsigned variables to avoid some overflows.analysis and patch from David Fifield
Callers of time(3) should #include <time.h>.ok deraadt
- optarg and optind are declared by unistd.h, so remove them...- use strtonum rather than atoi- zap case '?' in getopt(3) switch- use _exit(2) in signal handler- use __progname in usage() instead
- optarg and optind are declared by unistd.h, so remove them...- use strtonum rather than atoi- zap case '?' in getopt(3) switch- use _exit(2) in signal handler- use __progname in usage() instead of hardcoded nameOK tb@ mestre@
show more ...
Remove unused header
As per style(9), remove remaining lint-style comments from games/OK tb@
About 13 years ago when the idiom srandom(time()), and sometimessrandom(time()+getpid()), was changed by srandomdev(), but #include <time.h>lived up until this day so remove it.Additionally, earl
About 13 years ago when the idiom srandom(time()), and sometimessrandom(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 firstconsumers of arc4random(3) family, and was pulling it from dev/rndvar.h butthese days we pull it from stdlib.h, which is already done, so while hereremove dev/rndvar.h also."seems comprehensive to me" deraadt@ and OK tb@
Declare usage() functions as __dead void, if they don't return, on games section.Found another one in arithmetic(6) which also didn't return, and removed a function from number(6) which is not used
Declare usage() functions as __dead void, if they don't return, on games 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@
Cast ctype functions' arguments to unsigned char.ok guenther@
Pledge that arithmetic only takes "stdio".
use .Cm rather than .Ar for fixed string arguments
remove malloc/calloc/realloc* casts, due to stdlib.h being present; ok millert krw
replace srandomdev()+random() with the arc4random*() familytweaks and ok millert@, ok deraadt@
rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andunmaintainable). these days, people use source. these id's do not provideany benefit, and do hurt the small install media(th
rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andunmaintainable). these days, people use source. these id's do not provideany 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;
-o and -r take arguments; from Igor Sobrado
remove some bogus *p tests from charles longeauok deraadt millert
replace bad macro;
ansi; khalek@linuxgamers.net
Remove the advertising clause in the UCB license which Berkeleyrescinded 22 July 1999. Proofed by myself and Theo.
some typos, and clarification of game rules;help, suggestions and ok pjanzen@
Replace things like srandom(time(NULL)) with srandomdev(3). random(3)good enough for games but we should at least use a decent seed.pjanzen@ OK
no more err(3) newlines in games; ok pjanzen@
de-register
No dm -> no need to revoke setegid.
The troll strikes.. The troll strikes.. The dungeon master dies.distrib/sets/lists
12