Age | Commit message (Collapse) | Author |
|
ok schwarze@
|
|
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|
|
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
|
|
- heros -> heroes
- kill a dup
from tom
|
|
|
|
|
|
ones only or vice versa is an error rather than a recipe for success.
|
|
bug reported and patch provided
by Tilo Stritzky <lfsdc at gmx dot de> on bugs@;
OK martijn@
|
|
okay martijn@
|
|
when <unistd.h> is included;
patch from Jan Stary <hans at stare dot cz>;
OK millert
|
|
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...
|
|
and correct Xr.
ok jmc
|
|
|
|
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@
|
|
ok sthen@
|
|
|
|
from scott cheloha
|
|
From Scott Cheloha
|
|
Fixes printing of fortunes that use a combination of backspace and
underbars for underlining in non-UTF8 locales. OK schwarze@
|
|
bentley's previous commit.
|
|
suggested by tedu, ok schwarze@ stsp@ tb@
|
|
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@.
|
|
ok bentley
|
|
|
|
OK tb@ deraadt@
|
|
OK tb@, phessler@ (previous version)
|
|
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@
|
|
|
|
random lines are selected on output and that's enough.
From daniel, ok tb
|
|
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
|
|
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@
|
|
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@
|
|
- 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
|
|
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@
|
|
OK 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@
|
|
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@
|
|
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@
|
|
match the format of the original;
from andre smagin
|
|
from netbsd pr 49451
|
|
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@
|
|
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
|
|
|
|
further is not placed right, so I ignored it for now)
from Ricardo Mestre
|
|
sloppiness like this.
|
|
ok guenther@
|
|
ok guenther@
|
|
|
|
|
|
and few disambiguisations suggested by cc(1)
- parentheses around && within ||
- explicit braces to avoid ambiguous 'else'
ok doug@
|