summaryrefslogtreecommitdiff
path: root/games
AgeCommit message (Collapse)Author
2016-01-08Straightforward headers cleanupmestre
2016-01-08ANSIfy monop(6)mestre
OK tb@
2016-01-08Headers cleanup and removal where suitablemestre
OK tb@
2016-01-08ANSIfy mille(6)mestre
OK tb@
2016-01-08Headers cleanup and also the following:mestre
mille.h: #define CTRL locally, which is used by move.c and misc.c, to avoid including termios.h or sys/ttydefaults.h where it's actually defined varpush.c: Change _PATH_DEVNULL to "/dev/null" since other systems may not have it defined but also avoids including <paths.h> Included a few sugestions from tb@ who also gave his OK
2016-01-08add missing 'void'tb
ok mestre@
2016-01-08Structural integrity hasn't improved in over twenty years.tb
ok mestre@
2016-01-07ANSIfy hunt(6)mestre
Note: casted 2 args to struct sockaddr * on list.c to shut off compiler warnings, and also changed an int len to socklen_t since recvfrom(2) receives the last argument as the latter. I'm running out of credits, but this was once again with great help and OK from tb@
2016-01-07Headers cleanup and sortingmestre
OK tb@
2016-01-07hack expects to be able to read ^Z as a normal character so disableTodd C. Miller
SUSP in the termios settings. Presumably this is how things worked before the conversion to termios. Fixes suspend/resume in hack.
2016-01-07Some basic code maintenance in games/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@
2016-01-07ANSIfy trek(6)mestre
Note: Binary change is introduced due to function schedule() where its args are (int,double,char,char,char), but on trek.h are (int,double,int,int,int). Changed to the latter since the 3 last args are coordinates. OK tb@
2016-01-07Remove unnecessary headers and sort the remaining alphabeticallymestre
OK tb@
2016-01-06Forgot to remove this file on my previous commitmestre
2016-01-06Remove unnecessary header files from phantasia(6)mestre
Lesson learnt: don't include an header sorted alphabetically just because. The external definition of variables was done on phantglobs.h but their declaration was on phantstruct.h and therefore the latter must be included before the former. It's easier to just include phantstruct.h inside phantglobs.h since it always need it. With help and OK from tb@
2016-01-06ansifytb
ok mestre@
2016-01-06Last step of ansification of phantasia:tb
Convert function() to function(void). ok mestre@
2016-01-06Ansify the bulk of phantasia. No binary change on amd64. Basedtb
on an older diff by mestre. ok mestre@
2016-01-06Ansify map.c.tb
ok mestre@
2016-01-06Use return instead of exit from main.tb
ok mestre@
2016-01-04More cleanup and sorting on header sectionmestre
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
2016-01-04More headers removal and sorted the remaining alphabetically.mestre
Most noticeable that were removed are sys/types.h which will be included from stdlib.h and in turn also brings along sys/cdefs.h. The other one is limits.h that was used with the old idiom (denom * random() / LONG_MAX), although it was only removed were applicable (some files still need that header). OK tb@
2016-01-03About 13 years ago when the idiom srandom(time()), and sometimesmestre
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@
2016-01-01don't declar main. from Michal MazurekTed Unangst
2015-12-31Include only needed header files per each source filemestre
This one was also OK'ed by tb@
2015-12-31Include only needed header files per each source filemestre
OK tb@
2015-12-31Remove unused filemestre
Alerted by tb@
2015-12-31Include only needed header files per each source filemestre
OK tb@
2015-12-31Include only needed header files per each source filemestre
OK tb@
2015-12-31Include only needed header files per each source filemestre
With help and OK from tb@
2015-12-30Michal Mazurek pointed out on tech@ that the factor.6 manual needs a bittb
of clarification. Thus, express the description both more concisely and more precisely. Drop details about spaces in the output formatting. While there, update the corresponding comment in the source code. With input from jmc@ and mestre@; detailed discussion with sobrado@. ok sobrado@
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@