Age | Commit message (Collapse) | Author |
|
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.
|
|
files. This fixes up parallel builds in the default case.
FreeBSD does something similar.
okay millert@
|
|
okay millert@
|
|
|
|
M_PI is always defined, so we can drop those directives.
OK deraadt@, millert@
|
|
ok deraadt
|
|
and setitimer()
ok deraadt@
|
|
then additionally it calls clearerr(3) deliberately but we want to catch any
error that may happen and this way we couldn't catch it
OK tb@
|
|
|
|
- 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
|
|
OK tb@
|
|
ok mestre@
|
|
- 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@
|
|
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@
|
|
Alerted by tb@
|
|
OK tb@
|
|
With precious tip, help and also OK from tb@
|
|
|
|
Do this by introducing atcrandom_uniform(range) which returns
deterministic randomness or good randomness depending on whether
a seed was specified with the -r option.
Diff by Matthew Martin, reviewed by deraadt@ and me.
ok deraadt@
|
|
|
|
For high score entries use the same logic as in snake(6) and tetris(6):
Try LOGNAME then USER then getlogin(2) and fall back to ???.
For variety, atc(6) uses flock(2), so add a "flock" promise to the usual
"stdio rpath rpath cpath tty" for games.
|
|
|
|
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
|
|
ok deraadt@
|
|
|
|
millert krw
|
|
|
|
from pjanzen
|
|
save / replay modes of operation that have not yet been cleaned up).
OK, I've let the cat out of the bag, now some of you know you can cheat
at them..
ok millert guenther tedu
|
|
escape it when it appears on a macro line.
|
|
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@
|
|
found with the new mandoc(1) MANDOCERR_AN_MISSING warning;
no text changes
|
|
|
|
|
|
time(0). OK guenther@
|
|
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
|
|
OK millert
|
|
ok ray@ gilles@
|
|
unused variable `variable'
`variable' might be used uninitialized in this function
ok gilles@ ray@
|
|
ok pyr@, ray@, millert@, moritz@, chl@
|
|
ok deraadt@
|
|
|
|
I missed synchronizing the usage() function.
problem noticed by jmc@
|
|
names to both flags are the same.
spotted by jmc@ with relation to other manual page.
ok by jmc@
|
|
|
|
request to go to the same altitude as already at. pr 3448
|
|
Initial patch from Charles Longeau <chl at tuxfamily dot org>.
OK moritz@.
|
|
now done by bsd.*.mk
|
|
|
|
|