summaryrefslogtreecommitdiff
path: root/games
AgeCommit message (Collapse)Author
2018-04-25Use a NUMKEYS macro instead of magic and use a more familiar idiomTheo Buehler
in for loops. ok stsp, bcallah
2018-02-07slightly reduce the difficulty of the adventure game that is readingTed Unangst
the battlestar code by reformatting a few lines. special request from mlarkin so he'll go back to fixing meltdown.
2018-01-23Fix table wrt missing element and `, detailed analysis and diff fromOtto Moerbeek
David Fifield; ok tb@
2018-01-12apostrophe fix;Jason McIntyre
2017-12-24Consolidate printf(3) calls at the end of main().cheloha
Makes reading the classification algorithm easier. ok tb@
2017-12-24Use more libm.cheloha
adj360() is a modulo operation: use fmod(3) to simplify things. Adding 0.5 to the phase to steer implicit truncation is a hack: use lround(3) to simplify things. Product of a discussion with pjanzen@/jca@/tb@ regarding floating-point rounding and the importance of correctly classifying a gibbous moon. ok pjanzen@ jca@ tb@
2017-12-23As we only use the .tv_sec field, simplify gettimeofday(2) -> time(3).cheloha
ok tb@ jca@
2017-12-11The code can be simplified by using clock_gettime(2)'s CLOCK_REALTIMETheo Buehler
instead of gettimeofday(2). From Scott Cheloha, ok jca
2017-11-25than -> thenTheo Buehler
from scott cheloha
2017-11-02Straightforward conversion to strtonum. Slight change of behavior in thatTheo Buehler
trailing whitespace is no longer permitted when invoked from stdin. From Scott Cheloha. ok jca
2017-10-27Use <elf.h> instead of <elf_abi.h>Martin Pieuchot
ok jasper@, jca@, deraadt@
2017-08-15typo: on -> ofTheo Buehler
From Scott Cheloha
2017-08-13replace gettimeofday with monotonic gettime. from Scott ChelohaTed Unangst
ok tb
2017-08-10convert source code frequencies to match those in the man pageTed Unangst
2017-08-10Treat backspace as printable in sanitize() for non-UTF8 locales.Todd C. Miller
Fixes printing of fortunes that use a combination of backspace and underbars for underlining in non-UTF8 locales. OK schwarze@
2017-07-13Convert fprintf(stderr, ...) to errx/warnx (with slight change of output).Theo Buehler
From Scott Cheloha
2017-07-13Use an umlaut in Mobius and uppercase one instance of möbius visible inTheo Buehler
bentley's previous commit.
2017-07-13Convert fortunes to UTF-8 from the old "backspace punctuation" method.Anthony J. Bentley
suggested by tedu, ok schwarze@ stsp@ tb@
2017-07-12Inspect LC_CTYPE and if it isn't UTF-8, weed out bytes that are notIngo Schwarze
printable ASCII. That makes using UTF-8 in fortune datfiles safe. Potential usefulness of UTF-8 in fortune datfiles noticed by bentley@. OK tedu@ millert@.
2017-07-11User count checks have been compiled out since 1998, get rid of them.Frederic Cambus
OK mlarkin@
2017-07-10remove misc. depend and yacc nits that no longer matter.Marc Espie
okay millert@
2017-07-09have bsd.prog.mk/bsd.lib.mk generate .y -> .c/.h rules without intermediateMarc Espie
files. This fixes up parallel builds in the default case. FreeBSD does something similar. okay millert@
2017-07-09Remove old junk. From Matthew MartinTheo Buehler
ok bentley
2017-07-07we're not shooting yacceptionMarc Espie
okay millert@
2017-07-01missed BUILDFIRST. Allow stuff to proceed without dependsMarc Espie
as found by krw@
2017-06-30Add missing rot13 function prototypeRicardo Mestre
2017-06-23Remove unused confirm() and datime() functions.Frederic Cambus
Those functions are unused and have been compiled out since 1998, it's time to let them go. OK sthen@, tom@, mestre@
2017-06-20Fix a path in Makequest and remove hack.sh (it never worked).Michal Mazurek
OK tb@
2017-06-19No need for a conditional to choose between nroff and troff.Anthony J. Bentley
ok jmc@
2017-06-15Remove the Installation section and fix a nonexistent path.Michal Mazurek
OK tb@ (fix paths diff) deraadt@
2017-06-12/usr/games/lib doesn't exist any more, use the new path.Michal Mazurek
OK tb@ deraadt@
2017-06-12destroy lint remnants.Marc Espie
okay millert@ deraadt@
2017-06-09Correct number of players, the program enforces a range from 2 to 9.Frederic Cambus
OK tb@, jmc@
2017-06-04Use proper bool types in fortune(6).Frederic Cambus
OK tb@, phessler@ (previous version)
2017-06-02Fix an infinite loop in fortune(6).Frederic Cambus
When invoking fortune with the -l option (to get long dictums only), the program gets stuck in an infinite loop because fortlen() doesn't return the fortune length correctly. OK mestre@, tb@, deraadt@, schwarze@
2017-05-31late game space battles require tty pledge to clear screen, etc.Ted Unangst
from tomr
2017-05-28remove some escapes that are unnecessary/harmful. ok jmc schwarzeTed Unangst
2017-05-28remove unused macroTed Unangst
2017-05-28there are no bugs; i fixed themTed Unangst
2017-05-28if your dying scream would escape the death field, realign to stay withinTed Unangst
2017-05-28high scores printed too far to the right, move it left a littleTed Unangst
2017-05-26forgot to remove mention of deleted dump/restart.Ted Unangst
also delete ancient todo file: Frankly, I am getting pretty sick of playing this game. Hence, the version which you get may have several bugs
2017-05-26save and restore hasn't worked for some time, not since -fPIE, since itTed Unangst
uses a pointer equality check for save game validity. remove it. discovered by the ever inquisitive mlarkin
2017-05-19Silence a whole slew of clang warnings by doing a no-op in the crazyTheo Buehler
internal obfuscation scheme the other way around, thereby avoiding a signed underflow. ok mestre
2017-04-16According to termcap(3), char PC, *BC, *UP need to be extern. Fixes anTheo Buehler
ld(1) error found by mestre a while ago. fix suggested and ok naddy
2017-04-10Clean up disabled declaration in the text struct.Frederic Cambus
OK deraadt@
2017-04-08snprintf() format string should be literalGleydson Soares
avoid compiler silly warnings sure deraadt@
2017-04-08format string is better be literalGleydson Soares
OK deraadt
2017-01-21Nuke whitespace foolish enough to expose itself during the greatKenneth R Westerback
"warning:" rectification.
2017-01-20In "%.*s" the * takes (int). gcc whines if you try to use the resultKenneth R Westerback
of pointer subtraction without a cast. So cast those expressions to (int). Switch one local variable to the same type as the parameter it is compared to. ok deraadt@ guenther@ beck@