]> git.cameronkatri.com Git - bsdgames-darwin.git/log
bsdgames-darwin.git
12 years agoMove scratch variables of main to main, instead of having them be
dholland [Sat, 13 Oct 2012 19:44:36 +0000 (19:44 +0000)]
Move scratch variables of main to main, instead of having them be
file-static.

12 years agoAdd strategic assertion, now passes -Wstrict-overflow.
dholland [Sat, 13 Oct 2012 19:39:57 +0000 (19:39 +0000)]
Add strategic assertion, now passes -Wstrict-overflow.

12 years agoRemove ifdefs for V7 (as opposed to older) unix.
dholland [Sat, 13 Oct 2012 19:25:22 +0000 (19:25 +0000)]
Remove ifdefs for V7 (as opposed to older) unix.

12 years agoPass the move info around instead of using it as a global.
dholland [Sat, 13 Oct 2012 19:19:38 +0000 (19:19 +0000)]
Pass the move info around instead of using it as a global.

12 years agoCrack down on global variables with single-letter names.
dholland [Sat, 13 Oct 2012 18:44:14 +0000 (18:44 +0000)]
Crack down on global variables with single-letter names.

12 years agofix previous, thanks asau@
dholland [Fri, 12 Oct 2012 15:41:10 +0000 (15:41 +0000)]
fix previous, thanks asau@

12 years agoDon't use ++ to set flags to true. Now passes -Wstrict-overflow.
dholland [Fri, 12 Oct 2012 10:44:20 +0000 (10:44 +0000)]
Don't use ++ to set flags to true. Now passes -Wstrict-overflow.

12 years agoPass -Wstrict-overflow.
dholland [Fri, 12 Oct 2012 10:38:53 +0000 (10:38 +0000)]
Pass -Wstrict-overflow.

12 years agoif 0 is used for the dimensions, compute the maximum size.
christos [Sat, 6 Oct 2012 19:39:51 +0000 (19:39 +0000)]
if 0 is used for the dimensions, compute the maximum size.

12 years agoBump date for previous.
wiz [Wed, 3 Oct 2012 19:50:43 +0000 (19:50 +0000)]
Bump date for previous.

12 years ago- improve wording and overall program description (notably for `-f');
wiz [Wed, 3 Oct 2012 19:50:11 +0000 (19:50 +0000)]
- improve wording and overall program description (notably for `-f');
- improve macro usage;
- bump date.

From Bug Hunting.

12 years ago- correct `usage' message;
wiz [Wed, 3 Oct 2012 19:50:06 +0000 (19:50 +0000)]
- correct `usage' message;
- improve wording.

From Bug Hunting.

12 years agoAdd a remarkably percipient fortune cookie.
riastradh [Wed, 3 Oct 2012 19:41:46 +0000 (19:41 +0000)]
Add a remarkably percipient fortune cookie.

12 years agoFix formatting of Churchill quote on declarations of war.
riastradh [Wed, 3 Oct 2012 19:04:55 +0000 (19:04 +0000)]
Fix formatting of Churchill quote on declarations of war.

12 years ago- improve wording
wiz [Sun, 12 Aug 2012 17:30:03 +0000 (17:30 +0000)]
- improve wording
- sort option list
- add argument names in option list and descriptions and adjust table width
- improve punctuation
- bump date

From Bug Hunting.

12 years agosrc/games/fortune/fortune/fortune.6:
jdf [Sat, 4 Aug 2012 22:29:58 +0000 (22:29 +0000)]
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.

12 years agoWARNS=5, and make WARNS=5 the default for src/games.
dholland [Tue, 19 Jun 2012 05:46:08 +0000 (05:46 +0000)]
WARNS=5, and make WARNS=5 the default for src/games.

12 years agoWARNS=5
dholland [Tue, 19 Jun 2012 05:45:00 +0000 (05:45 +0000)]
WARNS=5

12 years agoWARNS=5
dholland [Tue, 19 Jun 2012 05:30:43 +0000 (05:30 +0000)]
WARNS=5

12 years agoTypo. Reported by I-forget-who-but-they'd-probably-rather-not-be-credited,
dholland [Tue, 19 Jun 2012 04:59:19 +0000 (04:59 +0000)]
Typo. Reported by I-forget-who-but-they'd-probably-rather-not-be-credited,
during the -6 freeze, and then forgotten until now.

12 years agoRemove unused fields
joerg [Fri, 15 Jun 2012 10:51:25 +0000 (10:51 +0000)]
Remove unused fields

12 years agoConsistently use major/minor for NetBSD version.
njoly [Sat, 9 Jun 2012 23:15:13 +0000 (23:15 +0000)]
Consistently use major/minor for NetBSD version.

12 years agoAdd missing terminfo
martin [Sat, 9 Jun 2012 09:22:21 +0000 (09:22 +0000)]
Add missing terminfo

12 years agorcsid, warns
christos [Wed, 6 Jun 2012 00:34:32 +0000 (00:34 +0000)]
rcsid, warns

12 years agoSort sections; remove trailing whitespace.
wiz [Wed, 6 Jun 2012 00:28:02 +0000 (00:28 +0000)]
Sort sections; remove trailing whitespace.

12 years agoadd colorbars
christos [Wed, 6 Jun 2012 00:16:01 +0000 (00:16 +0000)]
add colorbars

12 years agonew colorbars program from Nathanial Sloss
christos [Wed, 6 Jun 2012 00:13:36 +0000 (00:13 +0000)]
new colorbars program from Nathanial Sloss

12 years agoAttribute the `Consequences, Schmonsequences...' quote to Daffy Duck.
riastradh [Tue, 5 Jun 2012 19:35:44 +0000 (19:35 +0000)]
Attribute the `Consequences, Schmonsequences...' quote to Daffy Duck.

12 years agouse modern shell constructs
christos [Thu, 26 Apr 2012 03:16:13 +0000 (03:16 +0000)]
use modern shell constructs

12 years agoallow multiple '-f acronyms' arguments to be given, which makes this behave
jschauma [Thu, 26 Apr 2012 01:55:14 +0000 (01:55 +0000)]
allow multiple '-f acronyms' arguments to be given, which makes this behave
more consistently with ACRONYMSDB, which may also point to multiple files

12 years agoAdd capfile(5) to describe the termcap format.
roy [Sat, 21 Apr 2012 12:27:24 +0000 (12:27 +0000)]
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.

12 years agoFix various format string mismatches.
joerg [Wed, 29 Feb 2012 23:39:53 +0000 (23:39 +0000)]
Fix various format string mismatches.

12 years agoMan page and usage cleanups from Bug Hunting in PR 46103.
wiz [Sun, 26 Feb 2012 21:06:59 +0000 (21:06 +0000)]
Man page and usage cleanups from Bug Hunting in PR 46103.

12 years agoFix conflicting variable definitions
matt [Sat, 18 Feb 2012 06:57:23 +0000 (06:57 +0000)]
Fix conflicting variable definitions

13 years agoPR/45842: Henning Petersen: compare fgets with NULL not 0
christos [Mon, 16 Jan 2012 17:38:16 +0000 (17:38 +0000)]
PR/45842: Henning Petersen: compare fgets with NULL not 0

13 years agogrumble.
dholland [Sun, 8 Jan 2012 18:17:41 +0000 (18:17 +0000)]
grumble.

13 years agoOops, I forgot to actually implement the checksumming code for the new
dholland [Sun, 8 Jan 2012 18:16:00 +0000 (18:16 +0000)]
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.

13 years agoRedo save file handling. The old save files were unportable, had no
dholland [Sat, 7 Jan 2012 22:23:16 +0000 (22:23 +0000)]
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.

13 years agoMake this not crash on machines that are (a) 64 bit, or (b) have signed
dholland [Sat, 7 Jan 2012 18:08:35 +0000 (18:08 +0000)]
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.

13 years agoPer [1] the speed of light in a vaccum is exactly 299792458 m/s.
jakllsch [Tue, 6 Dec 2011 19:41:03 +0000 (19:41 +0000)]
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

13 years agohandle EOF in input
ahoka [Thu, 1 Dec 2011 07:05:52 +0000 (07:05 +0000)]
handle EOF in input

13 years agogrammar fix
jnemeth [Sat, 19 Nov 2011 20:44:58 +0000 (20:44 +0000)]
grammar fix

13 years agoremove duplicated #defines (in a usually unused part of the code)
drochner [Wed, 9 Nov 2011 20:17:44 +0000 (20:17 +0000)]
remove duplicated #defines (in a usually unused part of the code)

13 years agoUse tiparm instead of vtparm.
roy [Mon, 3 Oct 2011 12:32:15 +0000 (12:32 +0000)]
Use tiparm instead of vtparm.

13 years agoreinstate NULL cast by request, where the NULL was being passed as a vararg
plunky [Thu, 1 Sep 2011 07:18:50 +0000 (07:18 +0000)]
reinstate NULL cast by request, where the NULL was being passed as a vararg

13 years agoNULL does not need a cast
plunky [Wed, 31 Aug 2011 16:24:54 +0000 (16:24 +0000)]
NULL does not need a cast

13 years agoNo need to cast double to ubig (aka uintmax_t) through int.
jakllsch [Tue, 30 Aug 2011 02:58:04 +0000 (02:58 +0000)]
No need to cast double to ubig (aka uintmax_t) through int.

This change prevents a modulo by zero in a invocation such as:
primes 18446744073709551000 18446744073709551615
on a LP64 machine.

13 years agoUse __dead
joerg [Mon, 29 Aug 2011 20:30:36 +0000 (20:30 +0000)]
Use __dead

13 years agoMark error() as dead, so that validation for setclipped works correctly.
joerg [Sat, 27 Aug 2011 23:42:33 +0000 (23:42 +0000)]
Mark error() as dead, so that validation for setclipped works correctly.

13 years agoAvoid non-literal format strings.
tron [Fri, 26 Aug 2011 09:01:07 +0000 (09:01 +0000)]
Avoid non-literal format strings.

13 years agoUse __dead and __printflike instead of __attribute__.
dholland [Fri, 26 Aug 2011 06:18:16 +0000 (06:18 +0000)]
Use __dead and __printflike instead of __attribute__.

13 years agoadd printf attributes.
christos [Thu, 25 Aug 2011 16:18:28 +0000 (16:18 +0000)]
add printf attributes.

13 years agoUses non-literal format strings
joerg [Thu, 25 Aug 2011 15:50:45 +0000 (15:50 +0000)]
Uses non-literal format strings

13 years ago-Wno-shadow is no longer needed for HAVE_PCC, here
plunky [Wed, 24 Aug 2011 17:39:32 +0000 (17:39 +0000)]
-Wno-shadow is no longer needed for HAVE_PCC, here

13 years agouse const char [] for format.
christos [Sun, 21 Aug 2011 08:50:08 +0000 (08:50 +0000)]
use const char [] for format.

13 years agoRemove redundant set of prototypes for local functions, exposed by
dholland [Wed, 17 Aug 2011 18:17:40 +0000 (18:17 +0000)]
Remove redundant set of prototypes for local functions, exposed by
previous.

13 years agoMove some things around so declarations appear in a reasonable order.
dholland [Wed, 17 Aug 2011 18:16:51 +0000 (18:16 +0000)]
Move some things around so declarations appear in a reasonable order.

13 years agoUse __dead instead of __attribute__((__noreturn__)).
dholland [Tue, 16 Aug 2011 19:53:03 +0000 (19:53 +0000)]
Use __dead instead of __attribute__((__noreturn__)).

13 years agodocument non-literal string formats
christos [Tue, 16 Aug 2011 11:28:18 +0000 (11:28 +0000)]
document non-literal string formats

13 years agoavoid non-literal format string
christos [Tue, 16 Aug 2011 11:26:16 +0000 (11:26 +0000)]
avoid non-literal format string

13 years agoeliminate/document non-literal format strings
christos [Tue, 16 Aug 2011 11:19:41 +0000 (11:19 +0000)]
eliminate/document non-literal format strings

13 years agoeliminate non-literal format strings
christos [Tue, 16 Aug 2011 11:14:04 +0000 (11:14 +0000)]
eliminate non-literal format strings

13 years agoavoid non-literal format strings.
christos [Tue, 16 Aug 2011 11:10:54 +0000 (11:10 +0000)]
avoid non-literal format strings.

13 years agokill homebrew error functions
christos [Tue, 16 Aug 2011 11:06:34 +0000 (11:06 +0000)]
kill homebrew error functions

13 years agodocument non-literal format strings
christos [Tue, 16 Aug 2011 10:14:40 +0000 (10:14 +0000)]
document non-literal format strings

13 years ago- document non-literal format strings
christos [Tue, 16 Aug 2011 09:26:22 +0000 (09:26 +0000)]
- document non-literal format strings
- avoid strict aliasing violations, but adding an intermediate function.

13 years agoFix up some lint.
dholland [Sun, 7 Aug 2011 06:03:45 +0000 (06:03 +0000)]
Fix up some lint.

13 years agoFix up still more casts; use NULL instead of (char *)0.
dholland [Sat, 6 Aug 2011 20:42:43 +0000 (20:42 +0000)]
Fix up still more casts; use NULL instead of (char *)0.

13 years agoRemove *another* set of useless casts. sheesh
dholland [Sat, 6 Aug 2011 20:32:25 +0000 (20:32 +0000)]
Remove *another* set of useless casts. sheesh

13 years agoRemove more silly casts.
dholland [Sat, 6 Aug 2011 20:29:37 +0000 (20:29 +0000)]
Remove more silly casts.

13 years agodrop private (and wrong) definition of NULL
dholland [Sat, 6 Aug 2011 20:24:35 +0000 (20:24 +0000)]
drop private (and wrong) definition of NULL

13 years agoUse the right type for the malloc wrapper function, and don't cast the
dholland [Sat, 6 Aug 2011 20:18:26 +0000 (20:18 +0000)]
Use the right type for the malloc wrapper function, and don't cast the
return value.

(XXX: Except for a pile of allocation macros that produce typed pointer
results; there the typechecking of the result assignment is more valuable
than the warning if the alloc function isn't declared properly. These
macros should go away.)

13 years agoRemove silly casts.
dholland [Sat, 6 Aug 2011 20:00:33 +0000 (20:00 +0000)]
Remove silly casts.

13 years ago<sys/wait.h> is standard, so just use it instead of fiddling about with
dholland [Sat, 6 Aug 2011 19:53:24 +0000 (19:53 +0000)]
<sys/wait.h> is standard, so just use it instead of fiddling about with
ifdefs for long-dead systems. While here, remove union wait.

13 years agoabolish references to index/rindex
dholland [Sat, 6 Aug 2011 19:47:54 +0000 (19:47 +0000)]
abolish references to index/rindex

13 years agoRemove the PYRAMID_BUG code. I don't think Pyramids are coming back, nor
dholland [Sat, 6 Aug 2011 19:32:58 +0000 (19:32 +0000)]
Remove the PYRAMID_BUG code. I don't think Pyramids are coming back, nor
do we care if their compiler vomits trying to decrement a bitfield.

13 years agoDon't refer to index() in comments; use strchr().
dholland [Sat, 6 Aug 2011 19:23:38 +0000 (19:23 +0000)]
Don't refer to index() in comments; use strchr().

13 years agoInclude system headers before private headers. Avoids various possible
dholland [Wed, 20 Jul 2011 07:04:30 +0000 (07:04 +0000)]
Include system headers before private headers. Avoids various possible
symbol conflicts.

13 years agoapply some -O0 with gcc 4.5 and vax.
mrg [Sun, 3 Jul 2011 15:29:34 +0000 (15:29 +0000)]
apply some -O0 with gcc 4.5 and vax.

13 years agouse DBL_MIN from <float.h> instead of a hard coded small value (that
mrg [Sun, 3 Jul 2011 06:44:01 +0000 (06:44 +0000)]
use DBL_MIN from <float.h> instead of a hard coded small value (that
becomes zero for vax fp.)

13 years agoinclude sys/time.h earlier (rather than implicitly via fcntl.h) so that
mrg [Sat, 2 Jul 2011 02:10:33 +0000 (02:10 +0000)]
include sys/time.h earlier (rather than implicitly via fcntl.h) so that
the "u" variable doesn't shadow stuff, found later in time.h inlines.

kind of a hack, but i don't want to modify time.h either.

XXX: seems kind of annoying

13 years agorename a variable from "time" to "stime" (it's a string)
mrg [Sat, 2 Jul 2011 02:09:08 +0000 (02:09 +0000)]
rename a variable from "time" to "stime" (it's a string)

13 years agoapply some -Wno-error and/or -fno-strict-aliasing.
mrg [Wed, 22 Jun 2011 02:49:41 +0000 (02:49 +0000)]
apply some -Wno-error and/or -fno-strict-aliasing.

all of this should be looked at closer, but some of them are not
very trivial.

13 years agoUse consistent sign in compare, the function is only called with
joerg [Mon, 30 May 2011 03:11:15 +0000 (03:11 +0000)]
Use consistent sign in compare, the function is only called with
constants as third argument anyway.

13 years agoMap RCSID to __RCSID
joerg [Mon, 23 May 2011 23:06:41 +0000 (23:06 +0000)]
Map RCSID to __RCSID

13 years agoANSIfy
joerg [Mon, 23 May 2011 23:03:38 +0000 (23:03 +0000)]
ANSIfy

13 years agoDon't use variables as format string.
joerg [Mon, 23 May 2011 23:02:07 +0000 (23:02 +0000)]
Don't use variables as format string.

13 years agoKill some pointer indirections. Don't use variables as format strings.
joerg [Mon, 23 May 2011 23:01:17 +0000 (23:01 +0000)]
Kill some pointer indirections. Don't use variables as format strings.

13 years agoANSIfy
joerg [Mon, 23 May 2011 22:59:27 +0000 (22:59 +0000)]
ANSIfy

13 years ago#if 0 some unused code.
joerg [Mon, 23 May 2011 22:58:44 +0000 (22:58 +0000)]
#if 0 some unused code.

13 years agoDon't use variables as format string.
joerg [Mon, 23 May 2011 22:56:11 +0000 (22:56 +0000)]
Don't use variables as format string.

13 years agoCorrectly print variables as strings, not as format string.
joerg [Mon, 23 May 2011 22:53:25 +0000 (22:53 +0000)]
Correctly print variables as strings, not as format string.

13 years agoProperly print string.
joerg [Mon, 23 May 2011 22:49:59 +0000 (22:49 +0000)]
Properly print string.

13 years agoDon't use variables as format strings.
joerg [Mon, 23 May 2011 22:48:52 +0000 (22:48 +0000)]
Don't use variables as format strings.

13 years agoANSIfy
joerg [Mon, 23 May 2011 22:47:22 +0000 (22:47 +0000)]
ANSIfy

13 years agoDon't use strings from arrays as format string.
joerg [Mon, 23 May 2011 22:46:35 +0000 (22:46 +0000)]
Don't use strings from arrays as format string.

13 years agoDon't use return value of a function as format string.
joerg [Mon, 23 May 2011 22:44:18 +0000 (22:44 +0000)]
Don't use return value of a function as format string.

13 years agoBug fix: in a game with 26 planes, the last one to be allocated wouldn't
is [Tue, 15 Feb 2011 08:25:25 +0000 (08:25 +0000)]
Bug fix: in a game with 26 planes, the last one to be allocated wouldn't
be allocated if it was the only eligible one.
From Jonathan David Amery via Debian Bug report 214626.

13 years agoFix spelling: it's *Jef* Raskin, not Jeff Raskin.
dyoung [Mon, 24 Jan 2011 15:30:54 +0000 (15:30 +0000)]
Fix spelling: it's *Jef* Raskin, not Jeff Raskin.

14 years agoavoid unnecessary cast (hi wiz)
dholland [Wed, 5 Jan 2011 15:52:20 +0000 (15:52 +0000)]
avoid unnecessary cast (hi wiz)