Remove a few too early pledge(2)s on games/ and apply them a little bit laterbut with much reduced permissions ("stdio tty" if ncurses based and "stdio"for the ones that only perform basic operatio
Remove a few too early pledge(2)s on games/ and apply them a little bit laterbut with much reduced permissions ("stdio tty" if ncurses based and "stdio"for the ones that only perform basic operations).There's still a few games that we cannot yet remove their fs access, throughpledge(2), since they open files on demand and too late, this might getrevisited in the future.OK tb@
show more ...
Some basic code maintenance in games/- in main() replace exit with return- drop some /* NOTREACHED */ lint comments along the way.- make more use of standard CFLAGS, esp. -Wimplicit-function-decl
Some basic code maintenance in games/- 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 timediscussed with and ok mestre@
More cleanup and sorting on header sectionOK tb@ and he also pointed out that for consistency with rest of the tree weshould include termios.h instead of sys/ttydefaults.h, where applicable
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@
Set as __dead a few more functions, that don't return, on games/With precious tip, help and also OK from tb@
pledge the wyrms
replace setbuf with setvbuf, from Frederic Nowak
Replace clock_gettime UPTIME with MONOTONIC to improve worm portability.ok deraadt@, guenther@.
Fix cheating bug by using unused time variables and replace poll() withppoll() to better use the timespec struct.ok deraadt@.
remove malloc/calloc/realloc* casts, due to stdlib.h being present; ok millert krw
KNF
make the worm grow faster on larger terminals. this is more fun thanstarting with an enormous pile of worm at the start.
select() to poll() conversionsok tedu (... other games maintainer absent)
from pjanzen:Start with the cursor on the worm's head.ok millert
from pjanzen:Use strtonum() and error out on an unacceptable length argument rather thanreverting to default values; document maximum initial length limit.started by a diff From: Jan Stary, who r
from pjanzen:Use strtonum() and error out on an unacceptable length argument rather thanreverting to default values; document maximum initial length limit.started by a diff From: Jan Stary, who requested we document default behaviourok millert
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
arguments to name description (.Nd) macros are usually lower case;fix superfluous double space in manual page body; fix typo.from Alan R. S. Bueno.ok jmc@
convert to new .Dd format;
ansi. ok deraadt@
Remove the advertising clause in the UCB license which Berkeleyrescinded 22 July 1999. Proofed by myself and Theo.
removed unnecessary .Ns;
ANSI
volatile sig_atomic_t
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
12