Commit Graph

1820 Commits

Author SHA1 Message Date
dholland
a59cfd489a Pass -Wstrict-overflow 2012-10-13 21:03:09 +00:00
dholland
bf33b97c19 Pass -Wstrict-overflow; while here, use curses TRUE and FALSE only with
curses.
2012-10-13 21:01:13 +00:00
dholland
0d0b06a380 Pass -Wstrict-overflow... mostly. 2012-10-13 20:57:35 +00:00
dholland
211b175c28 Pass -Wstrict-overflow. 2012-10-13 20:42:56 +00:00
dholland
0f960348b2 Pass -Wstrict-overflow, and while here, don't read from index -1 of
an array.
2012-10-13 20:36:06 +00:00
dholland
8bde1deef1 Factor out some common code; pass -Wstrict-overflow. 2012-10-13 20:12:18 +00:00
dholland
e31613d908 Pass -Wstrict-overflow. 2012-10-13 19:58:53 +00:00
dholland
44d9434e65 Move scratch variables of main to main, instead of having them be
file-static.
2012-10-13 19:44:36 +00:00
dholland
396c97ad03 Add strategic assertion, now passes -Wstrict-overflow. 2012-10-13 19:39:57 +00:00
dholland
bc604cfe52 Remove ifdefs for V7 (as opposed to older) unix. 2012-10-13 19:25:22 +00:00
dholland
4105daf3e6 Pass the move info around instead of using it as a global. 2012-10-13 19:19:38 +00:00
dholland
8733c61f2c Crack down on global variables with single-letter names. 2012-10-13 18:44:14 +00:00
dholland
24462a68ab fix previous, thanks asau@ 2012-10-12 15:41:10 +00:00
dholland
317c009481 Don't use ++ to set flags to true. Now passes -Wstrict-overflow. 2012-10-12 10:44:20 +00:00
dholland
6dd1299b8b Pass -Wstrict-overflow. 2012-10-12 10:38:53 +00:00
christos
b64afd2168 if 0 is used for the dimensions, compute the maximum size. 2012-10-06 19:39:51 +00:00
wiz
620c663aea Bump date for previous. 2012-10-03 19:50:43 +00:00
wiz
4f7e551cb8 - improve wording and overall program description (notably for `-f');
- improve macro usage;
- bump date.

From Bug Hunting.
2012-10-03 19:50:11 +00:00
wiz
a04ce0cefc - correct `usage' message;
- improve wording.

From Bug Hunting.
2012-10-03 19:50:06 +00:00
riastradh
334a028dd6 Add a remarkably percipient fortune cookie. 2012-10-03 19:41:46 +00:00
riastradh
2a2bf69386 Fix formatting of Churchill quote on declarations of war. 2012-10-03 19:04:55 +00:00
wiz
fb9125d78a - improve wording
- sort option list
- add argument names in option list and descriptions and adjust table width
- improve punctuation
- bump date

From Bug Hunting.
2012-08-12 17:30:03 +00:00
jdf
711e13238a src/games/fortune/fortune/fortune.6:
* reference strfile(8) in `SEE ALSO' section.

src/games/fortune/strfile/strfile.8:
 * remove redundant argument to (successive) `.Nm' macros.

src/games/fortune/datfiles/fortunes2:
 * remove (the least complete variant of a) double fortune.

Patch submitted by Bug Hunting.
2012-08-04 22:29:58 +00:00
dholland
277bd0756c WARNS=5, and make WARNS=5 the default for src/games. 2012-06-19 05:46:08 +00:00
dholland
ccbf74de27 WARNS=5 2012-06-19 05:45:00 +00:00
dholland
c34afa686b WARNS=5 2012-06-19 05:30:43 +00:00
dholland
16c47bfce7 Typo. Reported by I-forget-who-but-they'd-probably-rather-not-be-credited,
during the -6 freeze, and then forgotten until now.
2012-06-19 04:59:19 +00:00
joerg
403de81b16 Remove unused fields 2012-06-15 10:51:25 +00:00
njoly
f273b2e5cb Consistently use major/minor for NetBSD version. 2012-06-09 23:15:13 +00:00
martin
4988efdfdc Add missing terminfo 2012-06-09 09:22:21 +00:00
christos
c7a09b1276 rcsid, warns 2012-06-06 00:34:32 +00:00
wiz
aa7b8d55e1 Sort sections; remove trailing whitespace. 2012-06-06 00:28:02 +00:00
christos
1a812b26a7 add colorbars 2012-06-06 00:16:01 +00:00
christos
5f2f756c3f new colorbars program from Nathanial Sloss 2012-06-06 00:13:36 +00:00
riastradh
6ebd147b51 Attribute the `Consequences, Schmonsequences...' quote to Daffy Duck. 2012-06-05 19:35:44 +00:00
christos
5deb5aa698 use modern shell constructs 2012-04-26 03:16:13 +00:00
jschauma
f25e87abc8 allow multiple '-f acronyms' arguments to be given, which makes this behave
more consistently with ACRONYMSDB, which may also point to multiple files
2012-04-26 01:55:14 +00:00
roy
258cf0abec Add capfile(5) to describe the termcap format.
Adjust various man pages and other documentation to point to capfile(5)
instead of termcap(5).
Remove getcap(3) as curses hasn't been building it for a long time.
Punt wrterm.c as tset no longer uses it.
2012-04-21 12:27:24 +00:00
joerg
202d44a492 Fix various format string mismatches. 2012-02-29 23:39:53 +00:00
wiz
a19484822f Man page and usage cleanups from Bug Hunting in PR 46103. 2012-02-26 21:06:59 +00:00
matt
29f82ac3aa Fix conflicting variable definitions 2012-02-18 06:57:23 +00:00
christos
7f5fd4a5cd PR/45842: Henning Petersen: compare fgets with NULL not 0 2012-01-16 17:38:16 +00:00
dholland
8879f685e9 grumble. 2012-01-08 18:17:41 +00:00
dholland
158b740733 Oops, I forgot to actually implement the checksumming code for the new
savefile format, so any savefiles generated yesterday can be tampered
with. Oh well. While here, tidy up the crc code.
2012-01-08 18:16:00 +00:00
dholland
c99eaa0a43 Redo save file handling. The old save files were unportable, had no
magic number or versioning, relied on random(3) never changing to a
different implementation, and were also saving pointers to disk and
reading them back again. It *looks* as if the pointers thus loaded
were reset before being used, but it's not particularly clear as the
main loop of this thing is goto-based FORTRAN translated lightly to C.
I've changed the logic to null these pointers instead of saving and
loading them, and things seem to still work.

The new save files have a header, support versioning, write only sized
types in network byte order, and for the toy encryption to discourage
cheating do something self-contained instead of using random(3) as a
stream cipher.

Because between the original import from 4.4 until earlier today
trying to save would result in SIGSEGV on most platforms, it's
unlikely anyone has a save file, but just in case (since the pointer
issue appears to be nonlethal) I've kept compat code for old save
files.
2012-01-07 22:23:16 +00:00
dholland
f08dd5ca74 Make this not crash on machines that are (a) 64 bit, or (b) have signed
chars by default (i.e., almost all machines). Makes it possible to save
the game. This has been broken since 4.4 and probably ever since the
FORTRAN -> C translation.

Crash reported by Petri Laakso in private mail.
2012-01-07 18:08:35 +00:00
jakllsch
2ee946b266 Per [1] the speed of light in a vaccum is exactly 299792458 m/s.
Per [2] a furlong is 220 yards and a yard is exactly 0.9144 m.
Per [3] a fortnight is 14 days.

As I didn't find a good authority for what definition of a day a fortnight is
measured in, I'll assume here a day is 86400 SI seconds.

Thus, the speed of light in a vaccum is approximately
1.80*10^12 furlongs per fortnight.

1.80*10^12 = 299792458*86400*14/(220*0.9144)

[1]	Resolution 1 of the 17th meeting of the CGPM (1983)
	http://www.bipm.org/en/CGPM/db/17/1/
[2]	Weights and Measures Act 1985
	http://www.legislation.gov.uk/ukpga/1985/72
[3]	The Concise Oxford Dictionary, 5th Edition, 1964, p. 480
2011-12-06 19:41:03 +00:00
ahoka
c509c6317e handle EOF in input 2011-12-01 07:05:52 +00:00
jnemeth
be8bba3314 grammar fix 2011-11-19 20:44:58 +00:00
drochner
7621b801a7 remove duplicated #defines (in a usually unused part of the code) 2011-11-09 20:17:44 +00:00