summaryrefslogtreecommitdiff
path: root/games/bs
AgeCommit message (Collapse)Author
2018-08-24Remove a few too early pledge(2)s on games/ and apply them a little bit laterRicardo Mestre
but with much reduced permissions ("stdio tty" if ncurses based and "stdio" for the ones that only perform basic operations). There's still a few games that we cannot yet remove their fs access, through pledge(2), since they open files on demand and too late, this might get revisited in the future. OK tb@
2018-08-05remove duplicate installation of the SIGINT handler;Ingo Schwarze
from Martin Kopta <martin at kopta dot eu>
2016-03-07- General changes:mestre
- 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
2016-01-10Remove needless casts to (char *) NULL. Some were kept, namely for execl(3)mestre
last arguments since "The list of arguments must be terminated by a null null pointer" of type char * Suggested by and OK tb@
2016-01-08Remove unnecessary headers an sortmestre
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-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@
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-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-04assume modern curses and unifdef ancient feature testsTed Unangst
2015-11-30pledge "stdio rpath tty" for bstb
2015-10-24Cast toupper()'s argument to unsigned char.mmcc
ok guenther@
2015-09-27Make prompt() properly printf-like, eliminating empty dummy argsPhilip Guenther
2015-02-18improve ship placement interface. per the instructions, 2468 should work,Ted Unangst
but the first loop didn't allow them. also allow arrow keys to work, since they work in other modes.
2014-11-16Eliminate pointless use of <sys/param.h>, <sys/file.h>, <sys/sockio.h>,Philip 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@
2014-09-08obvious cases of missing .An;Ingo Schwarze
found with the new mandoc(1) MANDOCERR_AN_MISSING warning; no text changes
2014-07-12mlarkin found disabled code to print a battleship. improve it and enable.Ted Unangst
ok mlarkin
2013-08-29replace srandomdev()+random() with the arc4random*() familyChristian Weisgerber
tweaks and ok millert@, ok deraadt@
2013-07-16use .Mt for AUTHORS email; from Jan Stary <hans at stare dot cz>; ok jmc@Ingo Schwarze
2009-11-14Use getopt() to parse the argument list, shrinking the code andPhilip Guenthe
permitting options to be grouped ok deraadt@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
2009-10-17sort flags; "usage:" is lowercase.Igor Sobrado
2008-05-20remove Xr to non-existent page, rogue(6);Jason McIntyre
2008-05-20tweaks to bs(6):Igor Sobrado
- the document title (.Dt macro) should be BS, not BATTLESHIPS; - fix spacing on DeGaul's name - use .An/.Aq for Raymond's name and email address feedback by jmc@ ok jmc@
2007-05-31convert to new .Dd format;Jason McIntyre
2003-06-11Original author agreed to permit bs to be released under BSD license.Paul Janzen
Many thanks to Nick Stott for his detective work on this.
2003-06-03terms 3 & 4 cleanup based on "terms" fileTheo de Raadt
2003-05-19Remove #ifdef'ed out unnecessary defines.Paul Janzen
2002-12-06Replace things like srandom(time(NULL)) with srandomdev(3). random(3)Todd C. Miller
good enough for games but we should at least use a decent seed. pjanzen@ OK
2002-08-09Only target in the playing field when using mouse.Paul Janzen
2002-08-09Fix an error in the CPU random fire routine that could cause a segfault.Paul Janzen
2002-08-09Bug fix in random placement code from Erik Sigra.Paul Janzen
2002-05-31de-registerPaul Janzen
2002-05-31No dm -> no need to revoke setegid.Paul Janzen
2002-05-23The troll strikes.. The troll strikes.. The dungeon master ↵Theo de Raadt
dies.distrib/sets/lists
2002-02-18more signed char issuesTheo de Raadt
2001-11-17fixes from mpech@prosoft.org.lvPaul Janzen
2001-06-23Make sure screen is big enough to play.Paul Janzen
2001-06-06Better formatting; removed extraneous right parenthesis.Paul Janzen
2001-06-06reorder sections, minor tidying; mpech@prosoft.org.lvPaul Janzen
2001-02-17long usernames, and some -Wall-agePaul Janzen
2000-09-08bools should only be TRUE or FALSE. Negative numbers are right out.Paul Janzen
2000-07-23Handle EOF on stdin.Paul Janzen
1999-09-25gcc optimization bug appears gone since 2.8.1 became history.Paul Janzen
1999-07-09- remove all trailing whitespaceAaron Campbell
* 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...
1999-07-07The proper order of the ``introductory'' macros in a man page is .Dd/.Dt/.Os.Aaron Campbell
Out of the approximately 1450 man pages, only about 90 of them were wrong. Thanks to kwesterback@home.com for coming up with a script and patch to repair this. The patch also inserted a .Os macro in the few man pages that were missing one.
1998-12-31Add ${PIPE}; evanc@concer.toTodd C. Miller
1998-12-15Always provide an argument to .Nm in SYNOPSIS sectionPaul Janzen
1998-11-29Don't capitalize game names at the beginning of sentences.Paul Janzen