summaryrefslogtreecommitdiff
path: root/games/fortune
AgeCommit message (Collapse)Author
2022-08-04change some 4.4BSD references to earlier releasesJonathan Gray
ok schwarze@
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@
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-08-24- guiness -> guinnessJason McIntyre
- heros -> heroes - kill a dup from tom
2021-08-24vini vidi vici -> veni vidi viciJason 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-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-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-08-30Move 4 manual pages from not-a-function filenames to a correct filename,Theo de Raadt
and correct Xr. ok jmc
2019-08-22spelling fix and zap a stray line while here;Jason McIntyre
2019-02-03give the fake latin proverb "per aspera ad astra" in the moreIngo Schwarze
commonly used and metrically and logically more pleasant word order, and fix the wrong translation; translation error reported by Alessandro de Laurenzis on tech@; OK pascal@ jmc@
2018-09-15Fix fortune underlines and use the right number of underscores in Notes.Anthony J. Bentley
ok sthen@
2018-01-12apostrophe fix;Jason McIntyre
2017-11-25than -> thenTheo Buehler
from scott cheloha
2017-08-15typo: on -> ofTheo Buehler
From Scott Cheloha
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-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-09Remove old junk. From Matthew MartinTheo Buehler
ok bentley
2017-06-30Add missing rot13 function prototypeRicardo Mestre
2017-06-12/usr/games/lib doesn't exist any more, use the new path.Michal Mazurek
OK tb@ deraadt@
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@
2016-11-05spelling fix from eric van gyzen, freebsd r308293;Jason McIntyre
2016-09-02Make build deterministic by not randomizing the datfiles themselves,Theo Buehler
random lines are selected on output and that's enough. From daniel, ok tb
2016-08-27the quotes in "unkempt thoughts" were authored by stanislaw lec,Jason McIntyre
not stanislaw lem (an easy blunder, i'd say); i've also inserted the "J." into one of these credits (Stanislaw J. Lec) since all the others have them; credit to antoni grzymala; diff pockled from netbsd
2016-03-07eliminate do_malloc() and do_free().tb
These are wrappers for malloc(3) and free(3) with NULL checks. do_free() is pointless since free() already checks for NULL. do_malloc() is used only three times, once asprintf(3) seems more appropriate, and for just two calls the benefit of a custom wrapper is minimal. ok millert@
2016-03-07Remove unused fields posfile and was_pos_file from FILEDESC andtb
simplify is_fortfile() accordingly. The last use of them was guarded by OK_TO_WRITE_DISK, which was unifdef'ed in revision 1.43 last fall. tweak + ok mestre@
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-03-05Convert a hand-rolled strtonum to a call to strtonum(3). This preventstb
integer overflow on bogus input and bizarre error messages. Moreover, fortune files can now be named anything except names matching the regex ^[0-9][0-9.]*%$ ok mestre@
2016-01-10As per style(9), remove remaining lint-style comments from games/mestre
OK tb@
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-04More headers removal and sorted the remaining alphabetically.mestre
Most noticeable that were removed are sys/types.h which will be included from stdlib.h and in turn also brings along sys/cdefs.h. The other one is limits.h that was used with the old idiom (denom * random() / LONG_MAX), although it was only removed were applicable (some files still need that header). OK tb@
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-28update the us army democracy excerpt to more closelyJason McIntyre
match the format of the original; from andre smagin
2015-12-28andy finkel confimed himself as the originator of the rigged demo quote;Jason McIntyre
from netbsd pr 49451
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-11-15fix a double space issue in the following, rather wonderful, fortune:Jason McIntyre
On two occasions I have been asked [by members of Parliament!], `Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. -- Charles Babbage
2015-11-10another open(path, 0)...Theo de Raadt
2015-11-10pledge "stdio rpath" at the top. (Ricardo's 2nd chunk which reducesTheo de Raadt
further is not placed right, so I ignored it for now) from Ricardo Mestre
2015-11-10replace open(path, 0) with open(path, O_RDONLY). amazing to still findTheo de Raadt
sloppiness like this.
2015-10-24Cast ctype functions' argument to unsigned char.mmcc
ok guenther@
2015-10-24Cast isdigit()'s argument to unsigned char.mmcc
ok guenther@
2015-09-25use | rather than / for alternatives and some macro fixesIngo Schwarze
2015-09-16big blocks need braces for supportTed Unangst
2015-08-26remove #ifdef OK_TO_WRITE_DISK which isn't used by default.Sebastien Marie
and few disambiguisations suggested by cc(1) - parentheses around && within || - explicit braces to avoid ambiguous 'else' ok doug@