summaryrefslogtreecommitdiff
path: root/games
AgeCommit message (Collapse)Author
2015-12-28Build most of games/ with -Werror-implicit-function-declaration.tb
Prompted by benno's addition of the flag to most of usr.sbin/. ok benno@
2015-12-28update the us army democracy excerpt to more closelyJason McIntyre
match the format of the original; from andre smagin
2015-12-28andy finkel confimed himself as the originator of the rigged demo quote;Jason McIntyre
from netbsd pr 49451
2015-12-27remove unused variablesCharles Longeau
ok mmcc@
2015-12-27remove unused variableCharles Longeau
ok tb@
2015-12-26Set 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-25Declare 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-25Apply some more KNF to the declaration of functions, but keep style to the ↵mestre
rest of code for now. OK tb@
2015-12-24Function prototypes and a little bit of KNF.tb
Committing on behalf of mestre@ who has more to come.
2015-12-18KNF: add a missing space after an 'if'.tb
2015-12-16Use __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-16Use __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-15Cleanup: pwd.h is no longer needed.tb
2015-12-15Replace '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-09include err.h for err()Jonathan Gray
2015-12-06Use __progname instead of manually handling argv[0].Tobias Stoeckmann
ok deraadt, mmcc, tedu
2015-12-06pledge "getpw" is not needed here.tb
ok semarie@
2015-12-06Treat quiz the same way as the other games and try to preserve the looktb
and feel. Revert previous and allow the pager with pledge "proc exec". Play the game with pledge "stdio rpath". Discussed with tedu@
2015-12-05add missing #include "hack.h"tb
2015-12-04Tweak alignment of ENVIRONMENT and FILES.tb
Use sentence format for the highscore file, too. Discussed with jmc@
2015-12-04put FILES into a similar format as ENVIRONMENT;Jason McIntyre
2015-12-04cleanup: remove pwd.h, delete a stray comment and a const qualifiertb
2015-12-04Drop pledge("getpw") and pwd.h and use the now usualtb
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-04assume modern curses and unifdef ancient feature testsTed Unangst
2015-12-02Drop 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-02KNF: I forgot to join two lines.tb
2015-12-02treat getenv("HOME") safely also when LOGGING is defined. from mestre.tb
plus fix some ghastly whitespace.
2015-12-02add const and remove unused variable.tb
from mestre.
2015-12-01Make 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-01Answering "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-30delete useless BUGS section; patch from Jan Stary <hans at stare dot cz>Ingo Schwarze
2015-11-30last 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-30pledge "stdio rpath wpath cpath" for this one.tb
2015-11-30primes only needs pledge "stdio".tb
2015-11-30The usual deal for a curses game with the possibility of saving a game:tb
pledge "stdio rpath wpath cpath tty"
2015-11-30unspectacular pledge "stdio rpath tty" for grdctb
2015-11-30straightforward pledge "stdio rpath wpath cpath tty" for gomokutb
2015-11-30slightly interesting pledge for fish:tb
start with "stdio rpath proc exec" since it pipes instructions to a pager afterwards "stdio" is enough
2015-11-30pledge "stdio rpath wpath cpath tty" for canfieldtb
pledge "stdio rpath" for cfscores made possible by Ricardo Mestre's earlier work
2015-11-30pledge "stdio rpath tty" for bstb
2015-11-30pledge "stdio rpath tty" for boggle.tb
skip mkdict and mkindex for now, they aren't installed anyway.
2015-11-30Pledge 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-30Straightforward 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-29tidy here too;Jason McIntyre
2015-11-29adjust width list: Ds is unfortunate here;Jason McIntyre
2015-11-29tidy up ENVIRONMENT and FILES;Jason McIntyre
2015-11-29Move 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-29Add 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-29Move scorefile to $HOME. The nice implementation of the score filetb
depends on getpwuid(), so add "getpw" to the rest of the required pledges: "stdio rpath wpath cpath tty".