summaryrefslogtreecommitdiff
path: root/games
AgeCommit message (Collapse)Author
2023-06-03drop `uptodate()' check from hack(6)Omar Polo
hack(6) scrapes $PATH to find its executable and compare the mtime to the save file and bone file. If the game is newer than those, they're not loaded. Drop this feature. /usr/games is not in the default $PATH anymore, and the format for those file didn't change since the import. Diff from Anton Konyahin (me [at] konyahin [dot] xyz)
2023-05-05Convert K&R function definition to ansi to make clang 15 happierTheo Buehler
2023-03-08this morning's fortune was missing an apostrophe;Jason McIntyre
2023-02-18Put explicit ULL suffix to constants which won't fit in 32 bits.Miod Vallat
2023-01-04Christos Zoulas agreed to rescind clause 3 and 4 inJonathan Gray
NetBSD fsck.8 rev 1.35 fsutil.h rev 1.14 pathnames.h rev 1.2 netgroup_mkdb.8 rev 1.9 netgroup_mkdb.c rev 1.18 str.c rev 1.7 str.h rev 1.4 rdate.8 rev 1.11 rdate.c rev 1.19 extern.h rev 1.14 getnetgrent.c rev 1.41 netgroup.h rev 1.10 fparseln.3 rev 1.4 fparseln.c rev 1.10 our stringlist.c/stringlist.h are derived from getnetgrent.c rfc868time.c from rdate.c newfs/pathnames.h from fsck/pathnames.h https://mail-index.netbsd.org/source-changes/2009/10/21/msg002182.html Not all files are covered as some had copyright assigned to TNF in 1998.
2022-12-18add Czechia as an alternative for Czech RepublicDaniel Dickman
2022-12-04userspace: remove vestigial '?' cases from top-level getopt(3) loopsScott Soule Cheloha
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines. Prompted by dlg@. With help from dlg@ and millert@. Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2 ok naddy@ millert@ dlg@
2022-09-27typing ^C and seeing "terminated by signal %d" is so ... I don'tTheo de Raadt
have the words ok florian
2022-09-24There are time zones that have minute offsets, display thoseFlorian Obser
correctly. Pointed out by pjanzen@. To display the offset, use ISO 8601, as suggested by David Goerger. While here check if tm->tm_gmtoff changed which probably means that we moved in or out of daylight savings time. Input & OK millert, deraadt
2022-09-17Show time zone name and offset in clock border if TZ environmentFlorian Obser
variable is set. This is useful when running multiple clocks in different time zones. From James Russell Stickney (jrs AT outband.net), tweaked by me. Input & OK kn
2022-08-23Rework random(6)Theo Buehler
Fix putchar(3) handling and a number of other issues in the random(6) code. In -e mode, avoid bias due to truncation of the return code to 8 bits. In default mode, actually treat the denominator as a floating point number and print the line with a probability of 1 / denominator. This allows e.g. printing 2/3 of stdin with 'random 1.5'. Includes code for uniform random floats by Taylor R. Campbell from https://mumble.net/~campbell/2014/04/28/uniform-random-float and clz64() by me. From lucic71 () bronze ! ctrl-c ! club, thanks. ok deraadt
2022-08-08switch fgetln remnants to getline. ok millert@Omar Polo
2022-08-08fully switch quiz(6) to getline; diff from Ben Fuller (ben [at] bvnfOmar Polo
space), ok millert@
2022-08-04change some 4.4BSD references to earlier releasesJonathan Gray
ok schwarze@
2022-07-11remove the "tbl" suffix for a few man pagesDaniel Dickman
Over a decade ago, the build infrastructure had special logic to process man pages that ended with the suffix "tbl". This infrastructure is long gone and the special naming for these man pages is no longer needed. Revert the naming of these man pages for consistency with all other man pages in the tree. As a bonus, we remove a few lines from some of the Makefiles making them simpler. ok jmc@, and no objection from schwarze@
2022-07-06update countres and capitals in quiz(6)Daniel Dickman
Changes: - update country and capital names that have changed in recent years - remove the formal prefix from South Africa for consistency with other country names - add additional capitals for countries with multiple capitals - add "The" as optional prefix for The Gambia and The Bahamas - add missing suffix "City" to a few capitals - add many missing countries NetBSD appears to have also added territories which I've not added in this update. The removal of The Hague for The Netherlands was taken from NetBSD and confirmed by otto@ The duplicate Turkey and Georgia entries have not been touched. Prompted by a diff by Ben Fuller, who also provided much helpful feedback.
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2022-02-18Avoid gendered language in man pages when not referring to a specificJonathan Gray
person. Rewrite or use singular they. ok thfr@ sthen@ daniel@ ian@ job@ kmos@ jcs@ ratchov@ phessler@ and others I'm likely missing on an earlier version. feedback tj@, feedback and ok jmc@
2022-02-18prefer https links in man pagesJonathan Gray
ok gnezdo@ miod@ jmc@
2022-02-05Fix UB "shift-out-of-bounds" in battlestarGreg Steuck
OK millert@
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-12-15The PATH_MAX+1 bites. The PATH_MAX+1 bites. You die...Theo de Raadt
ok millert mlarkin
2021-11-20since it's unlikely that i'll get away with changing fortune's real usage toJason McIntyre
the string below (unfortunately), settle for making it more realistic: Usage->usage -Usage: fortune -P [] -a [xsz] [Q: [file]] [rKe9] -v6[+] dataspec ... inputdir +usage: fortune -P [] -a [xsz] [Q: [file]] [rKe9] -v6[+] dataspec ... inputdir
2021-10-23missed in previous commitRicardo Mestre
this was ok tb@
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@
2021-08-24- guiness -> guinnessJason McIntyre
- heros -> heroes - kill a dup from tom
2021-08-24vini vidi vici -> veni vidi viciJason McIntyre
2021-07-12Change the error reporting pattern throughout the tree when unveilBob Beck
fails to report the path that the failure occured on. Suggested by deraadt@ after some tech discussion. Work done and verified by Ashton Fagg <ashton@fagg.id.au> ok deraadt@ semarie@ claudio@
2021-04-29Remove extraneous for() likely caused by copy & paste.Todd C. Miller
From trondd, OK pjanzen@
2021-03-11quiz: handle line continuation in data files correctly, switch to getline(3)Christian Weisgerber
Specifically, the following quiz.db line foo:\ bar was parsed into "foo:bar\n", which made it impossible to answer correctly. Bug reported and inital fix from Alex Karle, partially reworked by yours truly, further input from millert@
2021-03-08Add some references, most of these were removed when we stopped buildingJonathan Gray
and installing USD/SMM/PSD docs. jmc@ agrees with the direction, ok millert@ on an earlier diff
2021-03-07Fix intercardinal directions in hack help.Theo Buehler
From Raf Czlonka
2021-02-06while learning (teachgammon(1)) you might want to save your game so "{w,c}path"Ricardo Mestre
pledge(2) permissions are required
2021-01-27satisfy -fno-common by duplicating deck chairs as requiredTheo de Raadt
ok mortimer millert
2021-01-27satisfy -fno-commonTheo de Raadt
similar to the approach used by mortimer
2021-01-26Fix build with -fno-common. OK deraadt@Todd C. Miller
2021-01-21Ignore special keys returned by the curses getch() function.Todd C. Miller
Prevents canfield from suspending itself when you resize the window. Canfield is not prepared to deal with anything other than normal characters so just ignore them. OK tb@ pjanzen@
2021-01-21some updates from pjanzen;Jason McIntyre
2021-01-03add the missing EXIT STATUS and HISTORY sectionsIngo Schwarze
2021-01-03Obvious bugfix: requesting a long dictum from a file containing shortIngo Schwarze
ones only or vice versa is an error rather than a recipe for success.
2021-01-02fix inverted exit status of fortune -m;Ingo Schwarze
bug reported and patch provided by Tilo Stritzky <lfsdc at gmx dot de> on bugs@; OK martijn@
2020-12-15Avoid NULL dereference after returning from copy().Vadim Zhukov
okay martijn@
2020-12-15the names com1 to com9 are reserved filenames on windowsDaniel Dickman
Rename these files in the same way as NetBSD did in 2001. Requested by John Carmack so OpenBSD source code can be checked out on Windows. ok deraadt@, sthen@, "go ahead" jsg@
2020-12-13fix unmarked/ignored descriptive mix up;Jason McIntyre
from rafa
2020-06-06grdc(6): implement timeout with alarm(3)cheloha
grdc(6) has an optional argument indicating a timeout in seconds. For example, one could do: $ grdc 60 to to tell grdc(6) to run for sixty seconds and then exit gracefully. As implemented, however, the timeout may occur too early or too late if the system clock is reset with settimeofday(2). To avoid this problem we can instead use alarm(3) and a signal handler to implement the timeout. alarm(3) is unaffected by settimeofday(2).
2020-06-06grdc(6): miscellaneous style(9)cheloha
- Sort includes alphabetically - Sort function prototypes alphabetically - Add missing whitespace after commas - Remove extra whitespace after commas - Add missing whitespace between binary operators - Add missing whitespace between reserved words and parens, i.e. fix "if(" - Add missing __dead to usage() definition
2020-02-14no need to declare "extern optarg" and "extern optind"Ingo Schwarze
when <unistd.h> is included; patch from Jan Stary <hans at stare dot cz>; OK millert
2019-12-21a few depend:-related thingies that were still in.Marc Espie
okay millert@, tb@
2019-09-27fix gary zukav's "acceptance without proof" quote, which just appeared onJason McIntyre
my screen. i don;t have a copy of this book, and a brief search online shows conflicting punctuation, but i've chosen to replace the comma splice with a full stop, which is at least grammatically correct, and seems the most likely solution. whether this quote needs to be in two files escapes me...
2019-09-08Be more specific regarding which encoding this simulator generates:Ingo Schwarze
the existing text encouraged the misconception that punched card encodings were somehow standardized, which they were not. Lots of different encodings existed, and the one simulated here was a proprietary one of one specific vendor (GE). Also correct the history: the folks at Bell Labs already played with this. HISTORY mistake noticed by Sevan Janiyan <venture37 at geeklan dot co dot uk>, who also agrees with the final patch. tweak and OK jmc@