Age | Commit message (Collapse) | Author |
|
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
|
|
- And while here, fwrite(3) returns size_t whereas nscores is an int, so cast
nscores to u_int. This is a false positive, but silences a compiler warning
with -Wextra -pedantic
tb@ : "Looks ok to me" after suggestion from him
|
|
- Swap fputs(3) for fprintf(3)
- Use getprogname(3) instead of hardcoded string
OK and help from 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@
|
|
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
|
|
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@
|
|
|
|
plus fix some ghastly whitespace.
|
|
|
|
see environ(7). Pointed out by millert@. Fall back to getlogin(2)
before defaulting to ???.
looks good to deraadt@
|
|
Add pledge "stdio rpath wpath cpath tty".
Move score file to $HOME, add $USER as high score entry.
Maintain hall of fame of 10 high scores, make snake wink if
it ate you while you were eligible for eternal fame.
Based on an initial diff by Ricardo Mestre and with helpful input from tedu@.
ok beck@
|
|
|
|
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 espie@ deraadt@ millert@ tedu@
|
|
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@
|
|
tweaks and ok millert@, ok deraadt@
|
|
|
|
|
|
|
|
found by parfait
ok deraadt@
|
|
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 moritz@ jaredy@
|
|
ok deraadt@ and millert@ a while ago, more to come
|
|
|
|
|
|
|
|
rescinded 22 July 1999. Proofed by myself and Theo.
|
|
good enough for games but we should at least use a decent seed.
pjanzen@ OK
|
|
|
|
|
|
|
|
dies.distrib/sets/lists
|
|
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* except when it is escaped with a `\' at the end of the line
- fix remaining .Nm usage as well
- this is from a patch I received from kwesterback@home.com, who has been
working on some scripts for fixing formatting errors in mdoc'd man pages
Ok, so there could be a cost/benefit debate with this commit, but since I have
the patch we might as well commit it...
|
|
|
|
speed is correct on xterms; put snscore functionality inside snake and
make snscore a symbolic link (to be phased out); clean up formatting;
install score file properly; disable the log file by default (logging should
be done through dm).
|
|
|
|
|
|
|