summaryrefslogtreecommitdiff
path: root/games
AgeCommit message (Collapse)Author
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2014-07-16replace beforeinstall target with LINKS; rot13 becomes a hardlink toOkan Demirmen
caesar instead of a symlink. agreed by deraadt, sobrado, guenther
2014-07-13calling this "encryption" makes me cringe. "slightly obfuscated" is better.Ted Unangst
2014-07-13if not seeded explicitly, use arc4random instead. ok deraadtTed Unangst
2014-07-13long live BSD, SYSV is dead!Ted Unangst
2014-07-12mlarkin found disabled code to print a battleship. improve it and enable.Ted Unangst
ok mlarkin
2014-07-12Remove a pile of (obviously unused) #ifdef SYSV and BSD41 and BSD42Theo de Raadt
code that catches lots of signals, and then re-enters curses... before exiting.
2014-07-03Mark functions calling exit(3) as __dead.Ingo Schwarze
Issue reported by David Crosby <dave at dafyddcrosby dot com> on tech@. ok miod@
2014-07-01Fix typo in Hoare quotePhilip Guenther
2014-05-25use calloc. from Benjamin BaierTed Unangst
2014-05-09Various cleanup in incard():Ingo Schwarze
* get_line() always returns the same non-NULL pointer, so testing the return value is useless. * Garbage collect the unused variable *line. * Check for end-of-buffer before parsing the next word instead of after it. * Skip strlen() when the length has been measured three lines before anyway. * Do not initialize local variables over and over again. feedback and ok pjanzen@
2014-05-09Fix a mini-bug reported by pjanzen@:Ingo Schwarze
When entering card names, you can use multiple words (like KING OF SPADES). If you entered more than one consecutive blank character between words, the function incard() took that as end-of-string and ignored the rest. Fix this by dropping duplicate blanks up front, in get_line(). Patch simplified by me, ok pjanzen@. While here, use beep(3) in an adjacent line instead of manually fiddling with control characters, suggested by pjanzen@.
2014-05-09pjanzen pointed out that case is irrelevant, so document it; while here,Jason McIntyre
zap an old workaround needed to insert a space - it's now useless (was actually generating a second space); original diff from pjanzen
2014-05-09KNF: unify style and reduce indentation in get_line(), no binary changeIngo Schwarze
ok cmp(1)
2014-05-09After entering an invalid three-letter card name, one letter card namesIngo Schwarze
stopped working because the third letter remained in the buffer, incard() skipped the NUL and used the old garbage. Fix this bug reported by pjanzen@, but in a simpler way than he suggested, by just clearing any trailing garbage from the buffer. ok pjanzen@
2014-05-09Various cleanup:Ingo Schwarze
1. Style: Don't use variables as format strings. NetBSD rev. 1.26 (May 23, 2011) joerg@NetBSD via maintainer pjanzen@. 2. Style: Avoid needless pointer arithmetics. NetBSD rev. 1.27 (Oct 13, 2012) dholland@NetBSD via pjanzen@, who also applied some KNF to the indentation while here. 3. End curses before printing fatal error messages; from pjanzen@.
2014-05-08Do not read from index -1 of an array.Ingo Schwarze
NetBSD rev. 1.16 (Oct 13, 2012) by dholland@NetBSD via maintainer pjanzen@.
2014-04-25This manual was lacking it's most important section, HISTORY.Ingo Schwarze
While here, add .An (author name) macros.
2014-04-25Security is square, gaming is hip,Ingo Schwarze
so extend the Valhalla Rampage to where it really matters. Tedu 118 lines of dead code containing 77 dead magic numbers, rotting in the tree since June 24, 2001. Spotted by and ok jsg@, ok sthen@.
2014-03-30typo fix From: Josh Grosse;Jason McIntyre
2014-03-23some minor cleanup:Jason McIntyre
- new sentence, new line - no need to quote Sh lines, or Pa args
2014-03-23stop using libwrap. ok deraadtTed Unangst
2014-03-11Match bwrite()'s prototype with write()'s, zapping a lint commentPhilip Guenther
Delete casts to char* of arguments to bwrite() and free()
2014-03-11Welcome to 1989: we can ask for signed chars when we want themPhilip Guenther
2014-03-11lint is dead (long live the lint!)Philip Guenther
Declare play() and pl_main() as __dead, to solve the original problem
2014-03-11lint is dead (long live the lint!)Philip Guenther
2014-02-16malcolm macdougall, not dacdougall;Jason McIntyre
From: Joe Marcus Clarke
2014-02-12remove an obsolete man(7) .TP macro that was forgottenIngo Schwarze
when converting this page to mdoc(7) in revision 1.4; noticed by Jan Stary <hans at stare dot cz>
2014-02-11clean up AUTHORS section, no content change:Ingo Schwarze
* add missing .An * do not use .nf and .fi in mdoc(7) code * avoid bare TAB outside literal context * remove pointless .Ss from Jan Stary <hans at stare dot cz>, tweaked by me
2014-01-28from pjanzen:Jason McIntyre
Start with the cursor on the worm's head. ok millert
2014-01-28from pjanzen:Jason McIntyre
Use strtonum() and error out on an unacceptable length argument rather than reverting to default values; document maximum initial length limit. started by a diff From: Jan Stary, who requested we document default behaviour ok millert
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze
2014-01-11optarg/optind are declared in <unistd.h>, so kill the externs herePhilip Guenther
2013-12-11typo fix from gavin atkinson, freebsd -r259189;Jason McIntyre
2013-11-27remove erroneous char cast to switch expression processing getopt(3);Okan Demirmen
not used in any cases. ok deraadt@, guenther@, millert@
2013-10-25start_time should be time_t, not int since it holds the reasult ofTodd C. Miller
time(0). OK guenther@
2013-10-25Use arc4random_uniform() insead of rand() and modulus.Todd C. Miller
OK deraadt@
2013-10-15remove conditionals for ELF; prodding by patrick keshishianTheo de Raadt
2013-10-15no more a.out support hereTheo de Raadt
2013-09-12Misc time_t tweaks. %ld / (long)tv_sec -> %lld / (long long)tv_sec.Kenneth R Westerback
Eliminate unneeded casts. suggestions from & ok millert@ guenther@
2013-08-29replace srandomdev()+random() with the arc4random*() familyChristian Weisgerber
tweaks and ok millert@, ok deraadt@
2013-08-29Tournament mode uses a deterministic random seed for reproducible games.Christian Weisgerber
Switch seeding from srand() to srandom(), corresponding to the change in random number generator from rand() to random() fifteen years ago. ok pjanzen@ bluhm@ millert@
2013-08-22Correct format string mismatches turned up by -Wformat=2Philip Guenther
suggestions and ok millert@
2013-08-18Fix calls to printf-like functions which passed a non-fixed stringPhilip Guenther
as the format and no variable args. Replace "%#0.*X" with "%#.*X": the zero-fill flag is ignored/implied on numeric conversions when a precision is specified. ok jung@ millert@ krw@
2013-08-14no longer any need to quote macro lines with >9 args;Jason McIntyre
From: Jan Stary
2013-07-17add missing .An and .Mt macro; from Jan Stary <hans at stare dot cz>; ok jmc@Ingo Schwarze
2013-07-16use .Mt for AUTHORS email; from Jan Stary <hans at stare dot cz>; ok jmc@Ingo Schwarze
2013-06-02Correct obviously exchanged labels in the "computer warpcost" output andIngo Schwarze
fix a typo in a comment; from <Ted dot Roby at gmail dot com> on tech@.
2013-05-09teenagers from *outer* space ("they blast the flesh off hunmans!");Jason McIntyre
2013-04-05this doesn't need to be time_t ok deraadtTed Unangst