Age | Commit message (Collapse) | Author |
|
|
|
getopt(3) returns '?' when it encounters a flag not present in the in
the optstring or if a flag is missing its option argument. We can
handle this case with the "default" failure case with no loss of
legibility. Hence, remove all the redundant "case '?':" lines.
Prompted by dlg@. With help from dlg@ and millert@.
Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2
ok naddy@ millert@ dlg@
|
|
ncurses applications, e.g.:
/usr/games/worms 2>&1 | cat
solve this by only calling pledge(2) after initscr(3) is set and done, or
whatever function that calls it. since pledge(2) is called later now the
promises might be reduced, but this a diff for another day.
found by naddy@ almost a year ago, discussed with him deraadt@ and tb@
ok tb@
|
|
when <unistd.h> is included;
patch from Jan Stary <hans at stare dot cz>;
OK millert
|
|
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.
|
|
From Randy Hartman
|
|
scorefile nevertheless an fd is opened way in advance and therefore we can
disable any further access to the filesystem.
OK tb@
|
|
|
|
|
|
|
|
|
|
|
|
and setitimer()
ok deraadt@
|
|
- 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
|
|
- 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
|
|
With precious tip, help and also OK from tb@
|
|
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@
|
|
|
|
LOGNAME -> USER -> getlogin() -> ??? fallback
in the score file, as requested by tedu@
Man page bits adapted from jmc@'s tweaks to snake.6
|
|
depends on getpwuid(), so add "getpw" to the rest of the required
pledges: "stdio rpath wpath cpath tty".
|
|
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
|
|
with clock_gettime(MONOTONIC) to avoid clock changes and replacing poll()
with ppoll() to deal better with timespec.
ok guenther@.
|
|
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@
|
|
ok tedu (... other games maintainer absent)
|
|
found with the new mandoc(1) MANDOCERR_AN_MISSING warning;
no text changes
|
|
tweaks and ok millert@, 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 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.
|
|
mpech@prosoft.org.lv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page, and use MAXLOGNAME for scorefile (this makes new scorefiles incompatible
with old ones). Realtime idea and some code from d@.
|
|
* 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...
|
|
|
|
|