summaryrefslogtreecommitdiff
path: root/games/hangman
AgeCommit message (Collapse)Author
2021-12-24Filter out all symbols starting with a double underbar. In particular,Theo Buehler
this filters out all retguard symbols, which are no fun to guess. One recognizes them easily but can get yourself hanged by a single digit! An earlier version filtering only __retguard symbols was ok deraadt, jsing guenther agreed that filtering all double underbar symbols makes sense. He also suggested to filter out symbols containing several consecutive digits, but how much fun is guessing libcrypto symbols without all the X509 goodness?
2021-10-23if both stdout and stderr are redirected to a non-tty, pledge(2) will killRicardo Mestre
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@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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.
2017-10-27Use <elf.h> instead of <elf_abi.h>Martin Pieuchot
ok jasper@, jca@, deraadt@
2016-09-11KNF: Break an overlong line. No binary change.Theo Buehler
2016-02-28Add back undocumented -h switch defaulting to usage().tb
pjanzen@ correctly pointed out that a majority of games do this, so no need to deviate here.
2016-02-26- Remove -h and -? from getopt(3), they weren't documented on manpage anywaymestre
- Replace hardcoded string "hangman" by getprogname(3) OK tb@
2016-01-10As per style(9), remove remaining lint-style comments from games/mestre
OK tb@
2016-01-08add missing 'void'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
2015-12-31Include only needed header files per each source filemestre
With help and OK from 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-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-10-24Cast islower()'s argument to unsigned char.mmcc
ok guenther@
2015-10-22Pledge "stdio rpath tty" for hangman(6).Doug Hogan
Patch submitted by Ricardo Mestre <serial@helheim.mooo.com> ok semarie@
2015-02-07allow ctrl-d to quit after a game as wellTed Unangst
2015-02-07use unsigned char type to avoid many castsTed Unangst
2015-02-07by popular request, stop giving away numeric letters. no more will theTed Unangst
appearance of 509 in a symbol name tell you what letter to guess first.
2015-02-07unsigned char for ctype functionsTed Unangst
2015-02-07Ignore ELF symbols containing dots or dollar signs. Suggested by millert@Miod Vallat
2015-02-07clear to end of line when printing error messages so that previousTed Unangst
messages don't remain and pollute the line
2015-02-07By popular demand, allow any ELF file to be passed to -d as a word list, inMiod Vallat
which case its symbols will be used. Which means that `hangman -k' is equivalent to `hangman -d /bsd' now. ok beck@ tedu@
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2013-10-15remove conditionals for ELF; prodding by patrick keshishianTheo de Raadt
2013-10-15no more a.out support hereTheo de Raadt
2013-08-29replace srandomdev()+random() with the arc4random*() familyChristian Weisgerber
tweaks and ok millert@, 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
2008-04-05a little tidy up;Jason McIntyre
2008-04-02order the options correctly;Jason McIntyre
2008-04-01Add a -k option to use the kernel symbols as the words file.Miod Vallat
2007-05-31convert to new .Dd format;Jason McIntyre
2007-04-02-d takes an argument; from Igor SobradoJason McIntyre
2006-10-24Check strlen(buf) to be > 0 before accessing buf[strlen(buf)-1].Moritz Jodeit
OK ray@ cloder@
2005-04-13use STD{IN,OUT,ERR}_FILENOTheo de Raadt
2004-11-29ansi. ok deraadt@Jonathan Gray
2003-06-03Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-05-19Standard capitalizationPaul 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-05-31crmode -> cbreakPaul 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-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-11-17fixes based on ones suggested by mpech@prosoft.org.lvPaul Janzen
2001-11-17fixes from mpech@prosoft.org.lvPaul Janzen
2001-11-17section consistency: AUTHOR -> AUTHORS, even if only one listed;Paul Janzen
mpech@prosoft.org.lv
2001-08-18FormattingPaul Janzen
2001-01-28$OpenBSD$Niklas Hallqvist
1999-09-25Merge NetBSD changes (use const where appropriate; allow alternate wordlists).Paul Janzen
Add some code beyond that so the game doesn't hang if it gets a badly formatted alternate wordlist.
1999-04-20Don't allow guessed letters to wrap; closes PR800. Based on fix fromPaul Janzen
krw@tcn.net. Also, check to make sure the screen is big enough.
1998-12-15Always provide an argument to .Nm in SYNOPSIS sectionPaul Janzen