Commit Graph

1001 Commits

Author SHA1 Message Date
ache
2e0fd6b4c3 Suggections from bde@
1) Split too long source lines
2) Portable code should not assume that null pointer == all-bits-0,
so back out prev. calloc() change.

Submitted by:   bde
2008-08-11 23:24:42 +00:00
ache
7b638af8ac All cosmetic.
1) Rename RANDOM_MAX to RANDOM_MAX_PLUS1 to not confuse with random()'s max
2) Use calloc() instead of zeroing fields explicitly
3) "too many lines" -> "too many delimiters" for err()
2008-08-10 11:31:56 +00:00
ache
42825e9561 1) Fix longstanding math bug with denominator > 1 (wrong probability).
Test case:
	random -f some_small_file 10000
(in most cases must be no output)
2) Prevent number of lines > RANDOM_MAX (overflow or nothing may be
choosed) with EFBIG err()
3) After line is found, terminate list loop for -U case too,
since nothing to do in the rest of the loop left.
2008-08-08 02:46:47 +00:00
ache
823689b09c I was confused a bit by the wrong construction with RAND_MAX
used in randomize_fd.c.
Although the max value is the same currently, RAND_MAX is for rand(),
not for random().
So move RANDOM_MAX const to the common file now, make it UL and
use in randomize_fd.c too.
(in any case its old value was 1 less then must be, as noted in
the prev. commit)
2008-08-08 01:42:17 +00:00
ache
c14ceb129d 1) Replace hardcoded RANDOM_MAX macro with wrong (1 less than must be)
value with ((double)RAND_MAX + 1)
2) For exit code increase valid denominator upper range from 255 to 256
since returned value is [0 .. denom - 1]
2008-08-08 01:02:30 +00:00
ache
47725620b7 Use __FreeBSD_version check since it is bootstrap tool 2008-08-07 21:36:09 +00:00
ache
33d0c4b593 Add reference to arc4random_uniform(3) 2008-08-07 20:07:30 +00:00
ache
e1d97badbc Use arc4random_uniform(3) 2008-08-07 20:05:51 +00:00
ache
61c55e8d27 Use arc4random_uniform(3)
Obtained from:  OpenBSD
2008-08-07 20:02:42 +00:00
phk
62173de879 Add a quote too good to miss from:
http://www.schneier.com/blog/archives/2008/08/schneier_misquo.html

(and reorder one I appearantly didn't get in the right place last time.)
2008-08-02 20:11:56 +00:00
maxim
3348213ee8 o Alan Shepard was first American in the space; fix attribution.
o Correct Alan's surname.

PR:		bin/125812
Submitted by:	Derek Taylor [1], gavin [2]
MFC after:	1 week
2008-07-22 14:21:56 +00:00
phk
35ea526131 Unmangle an E.W.Dijkstra quote. 2008-07-14 18:45:06 +00:00
phk
55dcd10be4 Apply learning from RAIEC (Redundant Array of Independeng English Courses)
kindly provided by four different correspondents since my last commit.
2008-07-07 10:04:16 +00:00
phk
b754e07b66 Two quotes too good to miss. 2008-07-05 08:54:58 +00:00
wollman
0ed5f14f61 Months in English are capitalized (even when abbreviated). 2008-06-25 04:56:08 +00:00
phk
24cfc84964 +Computers can't cruise. Meandering is a foreign concept to them.
+The computer assumes that all behavior is in pursuit of an ultimate
+goal.  Whenever a motorist changes his or her mind and veers off
+course, the GPS lady issues that snippy announcement: "Recalculating!"
+               -- Joel Achenbach (www.slate.com, 20 jun 2008)
2008-06-23 20:27:37 +00:00
scf
c25b436504 Fixed the output grammar to properly speak non-terminal dits.
Updated Lyndon Nerenberg's radio callsign and E-mail address.

PR:		bin/7868
Submitted by:	Lyndon Nerenberg <lyndon@orthanc.ca>
MFC after:	1 week
2008-06-08 19:35:47 +00:00
remko
64ffd17398 Remove a quote about the instant-workstation, this port
has been removed ages ago.

PR:		docs/124166
Submitted by:	keramida
Prodded by:	novel,keramida
2008-05-31 18:07:16 +00:00
phk
6f0b87d389 This bloke has his priorities straight:
+"Can you be more stupid than aggravating the judge AND your lawyer?
+No? Oh yes you can: You can aggravate the whole kernel community."
+               -- Alexander Lyamin (about Hans Reisers murder trial)

Found at: http://www.news.com/8301-10784_3-9925607-7.html?tag=nefd.top
2008-04-29 13:02:21 +00:00
yar
fe216cb310 Add a missing quote symbol. 2008-04-26 22:15:03 +00:00
yar
d250673e6a Just met Kurt Vonnegut's quote remarkably relevant
to open software development (as well as to the other
kinds of human activity.)
2008-04-26 22:12:31 +00:00
yar
42186e4f70 Put back the quote from Chinggis Khan removed in rev. 1.259.
The quote predated rev. 1.232, which rev. 1.259 was to correct;
therefore it was protected by the "Don't remove fortunes" rule.

Noticed by:	ceri
Pointy hat to:	yar
2008-04-03 10:22:56 +00:00
ganbold
142c75022d Improve some quotes of Chinggis Khan.
Remove militant and moralized quotes of Chinggis Khan.
Add one more quote of Chinggis Khan.

Reviewed by: yar
Approved by: keramida(mentor)
2008-03-31 10:28:09 +00:00
dds
c29fa92243 Fix typo. 2008-03-03 10:06:52 +00:00
yar
81520a3e82 Add another very relevant quote from "The Elements of Programming Style"
by Kernighan and Plauger.
2008-02-28 15:16:24 +00:00
yar
429cd30f27 It was Plauger, not Ritchie, who co-authored both editions
of "The Elements of Programming Style".  Also spell the name
of the book properly.
2008-02-28 15:12:05 +00:00
ru
2aa5a61fd3 getopt(3) returns -1, not EOF. 2008-02-19 07:09:19 +00:00
des
512275f6c4 A real gem from freebsd-current@ 2008-01-10 14:51:24 +00:00
schweikh
d65b2b4159 Typo; s/relied/replied 2008-01-07 10:31:17 +00:00
dougb
d317da326d Fix a few small typos, and remove one duplicate.
I'm intentionally not sorting this file since it won't be added to.
(Although, if it were sorted the duplicate would have been easier to see.)

:)
2007-12-31 18:38:32 +00:00
wilko
84caa23bad Aussie New Years wish 2007-12-28 17:57:25 +00:00
schweikh
e3b63ab417 Typos corrected. 2007-12-25 16:36:52 +00:00
wilko
602d82ddca On Christmas lights. 2007-12-23 16:31:05 +00:00
julian
a2af805019 Warner lets a good one out.. 2007-12-21 00:56:16 +00:00
des
da17d8d478 Typo 2007-12-14 21:58:58 +00:00
wes
c6ebd74e98 Add my all-time favorite quote, from one of my all-time favorite people. 2007-12-14 01:47:11 +00:00
dougb
d030746b0b A few more cleanups. 2007-12-09 01:00:11 +00:00
dougb
a9c785f085 The ../tools/do_sort script could not differentiate between
a few very slightly diffrent versions of tcsh prompts, so
restore the 2 that were lost, and consolidate them all in
a way that will prevent them from being lost again.
2007-12-08 00:20:33 +00:00
dougb
6bd01c70a2 Combine the fortunes-o.real and the fortunes2-o file, as was done
with fortunes and fortunes2 2 years and 2 days ago. The fortunes2-o
file was brought in with the original import of the 4.4 Lite games
directory, but has always consisted in large part of fortunes
duplicated from other files.

The combined size of the two files is still only 631K, or less
than 1/3rd of the size of the fortunes file.

Combining them has the added benefit of making the fortunes from
fortunes2-o visibile to fortune(6)'s -m option.

This change should probably not be MFC'ed beyond RELENG_7.
2007-12-07 22:56:10 +00:00
dougb
8248da9b7f Sort these files using: sh ../tools/do_sort < $file > $file.sorted
This greatly aids in detecting duplicates, among other things.
2007-12-07 22:41:39 +00:00
dougb
a738f66c05 This is a massive cleanup of the fortune files, including removal
of many duplicates, formatting/whitespace fixes, spelling fixes,
and a host of others. Note: No fortunes were intentionally removed
(other than duplicates) as part of this cleanup. In removing dupes
I tried to be generous in not removing similarly worded fortunes
that had even slightly different punch lines.

Duplicates were resolved as follows (in this order):
* + limerick		-> limerick
* + fortunes-o.real	-> fortunes-o.real
* + fortunes2-o		-> fortunes2-o
* + zippy		-> zippy
murphy + fortunes	-> fortunes

In correcting spelling I've tried to leave colloquial variations
(especially British'isms) intact, as well as to not "correct"
errors that are part of the joke.

In fortunes and fortunes2-o I combined a couple of fortunes that
were adjacent to each other that seemed like they should have
originally been combined, and split a couple that seemed like they
should have originally been split.

Miscellaneous:
1. Fixed underlining
2. Capitalized proper names
3. Removed quotation marks from "freestanding" quotes for consistency
4. Added quotation marks to QOTD fortunes that needed them
5. Corrected or added many attributions
6. Removed apostrophes from trailing 's' that are plural, not possessive
7. Updated the path to fortune stuff included in some of the jokes
8. Updated several fortunes to their original version, and added attribution
9. Split up compound words that ispell tripped over
2007-12-07 22:28:08 +00:00
dougb
f58287ad3e Add speller files for fortune files that did not have them,
and update the ones that already existed.
2007-12-07 22:27:04 +00:00
dougb
9dd0e8826f Add some quotes from the television show "Buffy the Vampire Slayer" 2007-12-07 22:22:35 +00:00
dougb
ceaefbbb9b Add the text of a sign that I've seen on other desks, and
always wanted to put on mine.
2007-12-07 22:21:37 +00:00
ru
efa644585c Revise the markup. 2007-11-07 12:08:03 +00:00
edwin
6700ec8520 After discussions with grog@ (mentor):
- When none of the directories in FORTUNE_PATH exist, abort instead
  of using the default FORTDIR.
- Little stylify changes.
- Add documentation about the FORTUNE_PATH variable.

MFC after:	1 week
2007-11-07 01:14:28 +00:00
edwin
b67c0e7d8f Another typo in the previous commited fix. That makes four typos
in one fortune of only 32 words. Based on that single ratio, there
are 50453 more typos in the rest of the fortunes file....

Noticed by:	Nate Lawson <nate@root.org>
MFC after:	1 week
2007-11-06 22:40:16 +00:00
edwin
6aff7d5aab games/fortune: add FORTUNE_PATH env var, so ports of fortunes can work sanely
This patch adds an environment variable FORTUNE_PATH, which
	works like PATH for fortune files.

PR:		bin/36867
Submitted by:	Alan Eldridge <ports@geeksrus.net>

[patch] fortune -e implementation bug

	Fix the behaviour of "-e file1 file2" to equally pick them
	instead of only picking the first one.

PR:		bin/70182
Submitted by:	Martin Kulas <coolaz@web.de>

MFC after:	1 week
Approved by:	grog (mentor)
2007-11-06 22:03:24 +00:00
edwin
9f312690bc [patch] Fortune typos, around line 57346 of fortunes datfile
Small typos -- saw in a fortune today that 'equipped' is
	spelled 'equpped'. Also, 'vacuum' is spelled 'vaccuum'.
	Corrected diff provided below.

PR:		misc/112049
Submitted by:	Seth Hieronymus <shieronymus@speakeasy.net>
MFC after:	1 week
2007-11-06 21:55:56 +00:00
dougb
3a538b738e Correct, add or improve attributions for, and add to quotations from
"The Wizard of Oz"

One duplicate was also removed that wasn't the right quote anyway
2007-10-28 07:02:10 +00:00