Age | Commit message (Collapse) | Author | |
---|---|---|---|
2015-12-26 | Set as __dead a few more functions, that don't return, on games/ | mestre | |
With precious tip, help and also OK from tb@ | |||
2015-12-25 | - use strtonum(3) instead of atoi(3) | Gleydson Soares | |
- while here switch main() to return instead of exit(3), makes stack protector happy. OK tb@ | |||
2015-12-25 | Declare usage() functions as __dead void, if they don't return, on games ↵ | mestre | |
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@ | |||
2015-12-25 | Apply some more KNF to the declaration of functions, but keep style to the ↵ | mestre | |
rest of code for now. OK tb@ | |||
2015-12-24 | Function prototypes and a little bit of KNF. | tb | |
Committing on behalf of mestre@ who has more to come. | |||
2015-12-18 | KNF: add a missing space after an 'if'. | tb | |
2015-12-16 | Use __progname instead of hand-rolled parsing of argv[0]. | tb | |
Inspired by similar diffs by tobias@ and millert@. "I like the concept" pjanzen@ ok tedu@ | |||
2015-12-16 | Use __progname instead of hand-rolled parsing of argv[0]. | tb | |
Inspired by similar diffs by tobias@ and millert@. "I like the concept" pjanzen@ ok tedu@ | |||
2015-12-15 | Cleanup: pwd.h is no longer needed. | tb | |
2015-12-15 | Replace 'arc4random() % range' by 'arc4random_uniform(range)'. | 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@ | |||
2015-12-09 | include err.h for err() | Jonathan Gray | |
2015-12-06 | Use __progname instead of manually handling argv[0]. | Tobias Stoeckmann | |
ok deraadt, mmcc, tedu | |||
2015-12-06 | pledge "getpw" is not needed here. | tb | |
ok semarie@ | |||
2015-12-06 | Treat quiz the same way as the other games and try to preserve the look | tb | |
and feel. Revert previous and allow the pager with pledge "proc exec". Play the game with pledge "stdio rpath". Discussed with tedu@ | |||
2015-12-05 | add missing #include "hack.h" | tb | |
2015-12-04 | Tweak alignment of ENVIRONMENT and FILES. | tb | |
Use sentence format for the highscore file, too. Discussed with jmc@ | |||
2015-12-04 | put FILES into a similar format as ENVIRONMENT; | Jason McIntyre | |
2015-12-04 | cleanup: remove pwd.h, delete a stray comment and a const qualifier | tb | |
2015-12-04 | Drop pledge("getpw") and pwd.h and use the now usual | tb | |
LOGNAME -> USER -> getlogin() -> ??? fallback in the score file, as requested by tedu@ Man page bits adapted from jmc@'s tweaks to snake.6 | |||
2015-12-04 | assume modern curses and unifdef ancient feature tests | Ted Unangst | |
2015-12-02 | Drop the argument passing between backgammon and teachgammon. | tb | |
It's broken. Instead, make -d imply -n. You're supposed to know the rules before you start tweaking them. Issue reported by and ok pjanzen@ Patient help with the manual jmc@ | |||
2015-12-02 | KNF: I forgot to join two lines. | tb | |
2015-12-02 | treat getenv("HOME") safely also when LOGGING is defined. from mestre. | tb | |
plus fix some ghastly whitespace. | |||
2015-12-02 | add const and remove unused variable. | tb | |
from mestre. | |||
2015-12-01 | Make sure "exec" rights are dropped asap in all code paths. | tb | |
The game also needs "wpath cpath" for supporting the score file, so add those. | |||
2015-12-01 | Answering "yes" to the question "Do you want to see the rules of the game?" | tb | |
execs teachgammon. Allow this and drop this pledge afterward. Spotted by Paul Janzen, thanks! | |||
2015-11-30 | delete useless BUGS section; patch from Jan Stary <hans at stare dot cz> | Ingo Schwarze | |
2015-11-30 | last but not least: add pledge for wump(6) | tb | |
one more of those games which fork a pager with instructions, so first pledge "stdio rpath proc exec", then drop to pledge "stdio" afterwards. | |||
2015-11-30 | pledge "stdio rpath wpath cpath" for this one. | tb | |
2015-11-30 | primes only needs pledge "stdio". | tb | |
2015-11-30 | The usual deal for a curses game with the possibility of saving a game: | tb | |
pledge "stdio rpath wpath cpath tty" | |||
2015-11-30 | unspectacular pledge "stdio rpath tty" for grdc | tb | |
2015-11-30 | straightforward pledge "stdio rpath wpath cpath tty" for gomoku | tb | |
2015-11-30 | slightly interesting pledge for fish: | tb | |
start with "stdio rpath proc exec" since it pipes instructions to a pager afterwards "stdio" is enough | |||
2015-11-30 | pledge "stdio rpath wpath cpath tty" for canfield | tb | |
pledge "stdio rpath" for cfscores made possible by Ricardo Mestre's earlier work | |||
2015-11-30 | pledge "stdio rpath tty" for bs | tb | |
2015-11-30 | pledge "stdio rpath tty" for boggle. | tb | |
skip mkdict and mkindex for now, they aren't installed anyway. | |||
2015-11-30 | Pledge for backgammon and teachgammon. | tb | |
Both are straightforward "stdio rpath tty" programs; teachgammon exec's backgammon at the end, so give it "exec" in addition. While there, ANSIfy | |||
2015-11-30 | Straightforward pledge "stdio rpath wpath cpath" for adventure. | tb | |
It is possible to make it finer grained, but try to keep it simple for now. | |||
2015-11-29 | tidy here too; | Jason McIntyre | |
2015-11-29 | adjust width list: Ds is unfortunate here; | Jason McIntyre | |
2015-11-29 | tidy up ENVIRONMENT and FILES; | Jason McIntyre | |
2015-11-29 | Move score file to $HOME and add pledge "stdio rpath wpath cpath". | tb | |
For high score entries, try LOGNAME, then USER, then getlogin() then fall back to ???. | |||
2015-11-29 | Add pledge support and move score file to $HOME. | tb | |
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. | |||
2015-11-29 | Move scorefile to $HOME. The nice implementation of the score file | tb | |
depends on getpwuid(), so add "getpw" to the rest of the required pledges: "stdio rpath wpath cpath tty". | |||
2015-11-29 | pledge "stdio rpath tty proc exec" since instructions() might fork a pager. | tb | |
actual game place takes place with "stdio tty". OK deraadt@ on an earlier version | |||
2015-11-29 | Prefer $LOGNAME over $USER, since the latter is deprecated, | tb | |
see environ(7). Pointed out by millert@. Fall back to getlogin(2) before defaulting to ???. looks good to deraadt@ | |||
2015-11-27 | Fix after removal of the setgid bit: | tb | |
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@ | |||
2015-11-26 | Fix copy-paste error in scorefile name | tb | |
From Ricardo Mestre | |||
2015-11-26 | Add checks for getenv(), snprintf() and getlogin(). | tb | |
From Ricardo Mestre (up to a small tweak). Thanks! |