Commit graph

1054 commits

Author SHA1 Message Date
Ed Schouten 3b9fe1e175 Add static keywords to variables and functions where possible in games/.
This allows us to detect unused functions and variables and allows the
compiler to do a better job at optimisation.
2011-11-05 07:18:53 +00:00
Doug Barton 5db2dc2a3a Fix the text and attribution of the poem "Youth" by Samuel Ullman.
Our copy was a bastardization of the "older" (probably original?) and
shorter version of the poem; and the "newer" version that is better
known, and arguably more popular. Standardize on the latter.

Cf. http://www.bartleby.com/73/2099.html
2011-10-29 06:33:12 +00:00
Doug Barton 3f6c8f3765 Minor typo, fix 2 attributions 2011-06-09 06:10:39 +00:00
Ulrich Spörlein 1372d81a40 Convert a file to UTF-8. This only changes a character in the
copyright section and will not require UTF-8 for fortune(6).
2011-05-14 19:03:54 +00:00
Ulrich Spörlein ad85c5040d fortune(6): fix typos and misspellings.
While here, drop words in the spelling files that are no longer used
anywhere.

Speling errors found via:	codespell from Lucas De Marchi
2011-05-14 19:03:45 +00:00
Ulrich Spörlein 690af69ec0 morse(6): fix typos and space-before-tabs 2011-05-14 19:03:30 +00:00
Nathan Whitehorn 99ad39c822 Improve the distributeworld target in Makefile.inc1 and update the release
infrastructure to use it. make distributeworld can now be used without
preparing its environment first and installs games into its distribution
using the regular make distribute logic instead of post-processing with
a script.

Also add two new targets, packageworld and packagekernel, that tar up the
results of distributeworld and distributekernel (also new), respectively.
2011-03-02 14:39:26 +00:00
Rebecca Cran d886030b8a Move potentially offensive fortune to fortunes-o.
PR:	bin/137702
MFC after:	3 days
2011-02-13 18:18:56 +00:00
Ulrich Spörlein bf55df1986 factor(6): Check return values of BN_* functions.
Coverity Prevent:	CID 4862, 8771, 8772, 8773
2010-12-20 19:07:56 +00:00
Ulrich Spörlein dfc0276185 Drop advertising clause in manpages. It was done a long time ago
for the source code.

Discussed with:	core
2010-12-06 19:12:51 +00:00
Ulrich Spörlein 0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Colin Percival 0873fefd57 Add advice to new fathers from Thomas Ptacek.
Suggested by:	wilko
Approved by:	Thomas Ptacek
Security:	New parents often feel very insecure.
2010-09-29 23:47:06 +00:00
John-Mark Gurney ec6f1f4a71 fix the move so that it matches what the rest of the internet
says about this game...  This move also makes more sense...

MFC after:	1 week
2010-09-03 03:20:34 +00:00
Max Khon 1dd592007a "whereis netscape" gives empty output for quite a long time already.
Suggest to use "whereis firefox" instead.
2010-08-09 09:26:17 +00:00
Ulrich Spörlein ec2368eb92 grdc(6): de-obfuscate the timekeeping of now/delay
- 'now' only contains current time readings
- delay is only used as parameter to nanosleep
- prev_sec contains the time_t of the previous loop iteration

Submitted by:	bde
MFC after:	2 weeks
2010-08-03 20:56:23 +00:00
Ulrich Spörlein 1c9d5fc21b grdc(6): Partial backout of r210755
The previous revision was flawed in numerous ways:
- the if condition would depend on garbage stack values
- grdc(6) would loop n times, not n seconds. This only makes
  a difference if it takes more than 1 second to recalculate/redraw
  the display.
- style(9) violations

The following change adds argument checking and tracks the elapsed time
between loops explicitly and will exit after roughly n seconds.

While here sort headers and remove bogus #ifndef

Submitted by:	bde
MFC after:	2 weeks
2010-08-03 16:02:57 +00:00
Ulrich Spörlein de1070d4d8 grdc(6): fix timekeeping for user-supplied value n
- Keep timespec 'now' and 'delay' separate to avoid confusion
- Increase user-supplied n to run _at least_ n seconds, not max n

PR:            bin/149130 (based on)
Submitted by:  Andy Farkas
MFC after:     2 weeks
2010-08-02 12:15:22 +00:00
Ulrich Spörlein 684eaf44c0 Fix indention of attribution line for some recent additions.
MFC after:	3 days
2010-07-30 20:20:14 +00:00
Ulrich Spörlein 3f2b3942c9 Fix typo in pom(6) manpage
PR:		docs/148825
Submitted by:	Anatoly Borodin
MFC after:	1 week
2010-07-30 09:34:40 +00:00
Doug Barton 19b7052d55 Correct a Cecil Beaton quote
PR:		docs/148916
Submitted by:	Rob Farmer <rfarmer@predatorlabs.net>
2010-07-25 21:35:56 +00:00
Ed Maste f42e89b842 Add -p option to have pom(6) print just the percentage, without extra text.
PR:		bin/51070
Submitted by:	Matt Koivisto mkoivisto sandvine com
MFC after:	1 week
2010-07-15 00:16:04 +00:00
Doug Barton 9dad55defc Taken from actual police videos ... 2010-06-26 07:02:31 +00:00
Ulrich Spörlein a118325368 random(6): avoid dead assignments
Found by:	clang static analyzer
2010-06-14 13:03:25 +00:00
Ulrich Spörlein e10c1be450 mdoc cleanup
Garbage collect unused sections, macros and arguments. Fix prologue and
remove empty lines.

Found by: mdocml
2010-06-02 10:20:23 +00:00
Ulrich Spörlein 5889adb09d Sync fortunes with other *BSDs
- Spelling errors
- Typographical fixes
- Consistent attributions
- Use Jr. more consistently
- Capitalization of dictionary-like entries
- Sorting using tools/do_sort
- Remove duplicate fortunes
- Style according to the Notes file
- Reflect correct default fortune name in Notes
- Remove some no longer needed spelling hints
- Drop latin1 characters (sorry Mårten)

This is a partial sync against the DragonflyBSD sources, where a lot of
fixes from Free, Net and OpenBSD were merged previously. Only about 50%
of the changes originate from there, the rest was done by dougb and
yours truly.

Partial review by:	wilko (earlier version), ed (dito)
In collaboration with:	dougb
Approved by:		ed (co-mentor)
2010-03-31 18:21:25 +00:00
Ulrich Spörlein 63d46d1d5e Fix several typos in macros or macro misusage.
Found by:	make manlint
Reviewed by:	ru
Approved by:	philip (mentor)
2010-03-12 10:01:06 +00:00
Wilko Bulte fb24fced05 s/all ready/already/
Submitted by:	ru@, gj@
2010-02-26 16:27:11 +00:00
Wilko Bulte 499608ad34 On the (non)sense of legal disclaimers in emails. 2010-02-25 15:03:57 +00:00
Ulrich Spörlein cd6ceabc3d Prefer exit(0) from main over return(0).
Although not explicitly mentioned in style(9), it allows for easier
grepping of exit points. This reverts part of r203926.

Requested by:	des
Approved by:	philip (mentor)
2010-02-21 21:03:15 +00:00
Warner Losh f5144a270d Remove the third clause for the Berkeley parts of games, per the
letter in /COPYRIGHT.
2010-02-15 18:46:02 +00:00
Ulrich Spörlein 5499562eca fortune(6) switch to 3-clause BSDL; style(9)
This reduces the diff to other *BSD and makes it possible to actually
see the code differences.

Approved by:	ed (Co-mentor)
2010-02-15 15:10:21 +00:00
Ulrich Spörlein f6a71b56a1 games: make WARNS=6 the default, remove overrides
This also bumps factor, fortune, primes, and random to WARNS=6.

Approved by:	ed (Co-mentor)
2010-02-15 14:32:00 +00:00
Ulrich Spörlein 21b0c303a4 fortune(6) make WARNS=6 clean
Fixes taken mostly from DragonflyBSD.

Approved by:	ed (Co-mentor)
2010-02-15 14:31:30 +00:00
Ulrich Spörlein 7fdefc0bf8 morse(6) make WARNS=6 clean
Approved by:	ed (Co-mentor)
2010-02-15 14:31:05 +00:00
Ulrich Spörlein 72cb6052bd grdc(6) make WARNS=6 clean and bump accordingly
Approved by:		ed (Co-mentor)
2010-02-15 14:30:37 +00:00
Xin LI eb1930d3f2 Improve time precision for grdc(6):
Traditionally, grdc would obtain time through time(3) which in turn gets
only the second part of clock (CLOCK_SECOND), and sleep for 1 second after
each screen refresh.

This approach would have two problems.  First, we are not guaranteed to
be waken up at the beginning of a whole second, which will typically
exhibit as a "lag" on second number.  Second, because we sleep for whole
second, and the refresh process would take some time, the error would
accumulate from time to time, making the lag variable.

Make grdc(6) to use time(3) to get time only at the beginning, and sample
time in CLOCK_REALTIME_FAST granularity after refreshing, and use the
nanosecond part to caculate how much time we want to sleep.

PR:		bin/120813
MFC after:	1 month
2010-02-10 18:20:20 +00:00
George V. Neville-Neil c97a53e8b9 Add the definition of Mistakeholder 2010-02-09 14:51:39 +00:00
Warner Losh 96974de8bb Always compile in the speaker code. There's little savings by
omitting it, and other platforms may implement /dev/speaker in the
future.
2010-02-04 07:08:06 +00:00
Gavin Atkinson 1b19ce3e0a Our standard "xterm" termcap entry supports colour, so this tip is redundant.
As it happens, "xterm-color" has just been an alias for "xterm" since
src/share/termcap/termcap.src 1.131 in September 2002.

PR:		docs/132959
Approved by:	ed (mentor)
2010-01-11 21:17:49 +00:00
Doug Barton c670f97a6b For the now-infamous Rumsfeld quote:
Change "there're" to "there are" which is consistent with the vast
majority of on line references.

Remove a spurious trailing "

Update the citation text with a suggestion from des.
2010-01-07 23:30:10 +00:00
Xin LI 64c50c6403 Fix build: getopt() returns int so use an integer to get the value. 2010-01-06 00:20:37 +00:00
Stanislav Sedov e851fd040e - Move potentially offensive quotes I committed recently to fortunes-o.
- Reference date.
- Be more clear on context.

Suggested by:	dougb
2010-01-05 23:35:43 +00:00
Edwin Groothuis 6846bee277 Be able to specify a certain date and/or time for which to calculate
the phase of the moon.
While not worlds best improvements, it will help calendar(1) later on.
2010-01-05 21:14:48 +00:00
Doug Barton a573c11cf5 Remove more duplicates
Minor reformatting on a few
2010-01-05 19:40:32 +00:00
Stanislav Sedov 8d7446f925 - Add two particulary interesting quotes from the past decade. 2010-01-04 09:16:35 +00:00
Ed Schouten e6281cf106 Use ANSI C function declarations. 2009-12-29 08:43:32 +00:00
Ed Schouten f29b2b9bef Use ANSI C function declarations. 2009-12-29 08:42:58 +00:00
Tony Finch 38281fea3e Fix a performance bug in factor(6).
Check if large factor is prime before applying Pollard's algorithm;
fixes "factor 2147483647111311".  Increase base if p-1 algorithm
reaches 1; fixes "factor 99999999999991".

Testcases from David A Bagley <bagleyd@tux.org>.
Fixes from Joseph Myers <jsm@NetBSD.org>.
Problem rediscovered by an attempt to factor my phone number.

A few other incidental fixes: correct a couple of factually incorrect
comments; use ident string macros; move from 4-clause to 3-clause
BSD licence (University of California copyright).

Obtained from:	NetBSD
2009-11-26 00:38:13 +00:00
Doug Barton 79b871ac8a Properly sort a math fortune after the changes in r193486
Properly sort fortunes added in r174879 and r174959
2009-11-07 22:13:29 +00:00
Doug Barton 152f5570db Move Warner's very funny comparison of VCS to anal sex into fortunes-o 2009-11-07 21:28:21 +00:00