]> git.cameronkatri.com Git - bsdgames-darwin.git/log
bsdgames-darwin.git
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)

14 years agoFix fd leak in error cases. Found by cppcheck.
wiz [Wed, 5 Jan 2011 15:48:00 +0000 (15:48 +0000)]
Fix fd leak in error cases. Found by cppcheck.

14 years agoFix realloc error. Found by cppcheck.
wiz [Wed, 5 Jan 2011 15:40:55 +0000 (15:40 +0000)]
Fix realloc error. Found by cppcheck.

14 years agoDon't use the same name for two parameters.
joerg [Wed, 8 Dec 2010 17:08:07 +0000 (17:08 +0000)]
Don't use the same name for two parameters.

14 years agoUse __c99inline from sys/cdefs.h
joerg [Wed, 8 Dec 2010 17:06:35 +0000 (17:06 +0000)]
Use __c99inline from sys/cdefs.h

14 years agoFix a few of the games to use getprogname() in their usage() functions.
pgoyette [Sun, 5 Dec 2010 04:34:22 +0000 (04:34 +0000)]
Fix a few of the games to use getprogname() in their usage() functions.

Suggested by Joerg.

XXX There are probably many more that have their progname hard-coded, but
XXX I'm not up for a wholesale roto-till at the moment.

14 years agoSince this game is installed as 'boggle', fix the usage() text to match.
pgoyette [Sun, 5 Dec 2010 04:11:51 +0000 (04:11 +0000)]
Since this game is installed as 'boggle', fix the usage() text to match.

14 years agoadd one i saw on irc today
pooka [Thu, 25 Nov 2010 13:51:26 +0000 (13:51 +0000)]
add one i saw on irc today

14 years agoAvoid undefined behavior, from Chris Spiegel in PR 43860.
dholland [Sun, 26 Sep 2010 21:12:23 +0000 (21:12 +0000)]
Avoid undefined behavior, from Chris Spiegel in PR 43860.

14 years agoRework the game startup so it uses curses nicely. There are now menus
dholland [Fri, 6 Aug 2010 09:14:40 +0000 (09:14 +0000)]
Rework the game startup so it uses curses nicely. There are now menus
and stuff for picking scenarios and ships and all that.

14 years agoDon't define esc-[ as a custom key sequence because it steps on vt
dholland [Fri, 6 Aug 2010 03:10:26 +0000 (03:10 +0000)]
Don't define esc-[ as a custom key sequence because it steps on vt
function keys.

14 years agoFix some additional typos/grammar slips.
dholland [Sat, 29 May 2010 22:56:01 +0000 (22:56 +0000)]
Fix some additional typos/grammar slips.

14 years agoFix dog-Latin. The plural of wumpus could be wumpi, wumpus, or even wumpora,
dholland [Sat, 29 May 2010 22:53:49 +0000 (22:53 +0000)]
Fix dog-Latin. The plural of wumpus could be wumpi, wumpus, or even wumpora,
but not 'wumpii'. Where does this -ii crap come from?

14 years agoFollow the Fundamental Theory of Algebra. Disallow factorising of
joerg [Sat, 15 May 2010 21:22:39 +0000 (21:22 +0000)]
Follow the Fundamental Theory of Algebra. Disallow factorising of
numbers less than 2 as it is not
- naturally unique (negative numbers)
- finite (0)
- non-empty (1)

Discussed with the kristaps and wiz

14 years ago\\ -> \e
joerg [Fri, 14 May 2010 19:02:28 +0000 (19:02 +0000)]
\\ -> \e

14 years agocast isblank(3)'s argument to unsigned char.
tnozaki [Thu, 13 May 2010 17:52:11 +0000 (17:52 +0000)]
cast isblank(3)'s argument to unsigned char.

14 years agorename pollard_pminus1->pollard_rho for consistency
drochner [Wed, 28 Apr 2010 18:04:31 +0000 (18:04 +0000)]
rename pollard_pminus1->pollard_rho for consistency

14 years ago-Fix an old bug in the "pollard" code: it gets its argument passed
drochner [Tue, 27 Apr 2010 18:11:19 +0000 (18:11 +0000)]
-Fix an old bug in the "pollard" code: it gets its argument passed
 by reference, and changes the value behind the pointer under some
 circumstances (basically if it finds more than 2 different factors).
 It also calls itself if it finds a factor which is not considered prime
 (by openssl's miller-rabin check) and uses the call argument afterwards.
 This doesn't work -- we need to copy the argument into its own storage.
-Modify the code to do the "rho" algorithm as was initially announced.
 It takes somewhat longer in rare cases, but still works in cases where
 the "p-1" algorithm is unusable. This might fix PR misc/43192
 by Luiz Henrique de Figueiredo.
-Add some optional debug support, minor cleanup.

14 years agoDocument the options that actually exist, instead of some other
dholland [Sat, 24 Apr 2010 01:13:37 +0000 (01:13 +0000)]
Document the options that actually exist, instead of some other
completely unrelated set. Bump date. (first time since 1993!)

14 years agoHandle the "diedtime" field of the player log (which is not the high
dholland [Sat, 24 Apr 2010 00:56:14 +0000 (00:56 +0000)]
Handle the "diedtime" field of the player log (which is not the high
scores file, the append-only log of all games) as int32_t instead of
time_t. Log files from before the 64-bit time_t change can now be read
again; however, log files from the last year of -current are hosed.
All none of you who play larn, take note...

14 years agofflush the score file while signals are blocked to decrease the chance of
dholland [Sat, 24 Apr 2010 00:38:30 +0000 (00:38 +0000)]
fflush the score file while signals are blocked to decrease the chance of
it getting corrupted.

14 years agofix an obvious flaw in bounds check: the array of precomputed primes
drochner [Thu, 22 Apr 2010 14:28:48 +0000 (14:28 +0000)]
fix an obvious flaw in bounds check: the array of precomputed primes
could be overrun if its last entry (65537) was a factor of the input
(this does not affect PR misc/43192 -- the factors are much larger
here: 7742394596501*159455563099482401)

14 years agoAdd backslash before a dash to get a minus.
wiz [Thu, 22 Apr 2010 06:57:13 +0000 (06:57 +0000)]
Add backslash before a dash to get a minus.

14 years agoSync with reality. Bump date.
dholland [Thu, 22 Apr 2010 04:42:21 +0000 (04:42 +0000)]
Sync with reality. Bump date.

14 years agohandle ctime returning NULL.
christos [Sun, 4 Apr 2010 00:08:49 +0000 (00:08 +0000)]
handle ctime returning NULL.

14 years agoctime can return NULL.
christos [Fri, 2 Apr 2010 21:40:00 +0000 (21:40 +0000)]
ctime can return NULL.

14 years agofix typo.
christos [Fri, 2 Apr 2010 19:34:44 +0000 (19:34 +0000)]
fix typo.

14 years agohandle ctime returning NULL.
christos [Fri, 2 Apr 2010 15:34:16 +0000 (15:34 +0000)]
handle ctime returning NULL.

14 years agoremove #ifdef SVR4
dholland [Mon, 29 Mar 2010 05:16:08 +0000 (05:16 +0000)]
remove #ifdef SVR4

14 years agoSome improvements to the new UI.
dholland [Mon, 29 Mar 2010 04:28:47 +0000 (04:28 +0000)]
Some improvements to the new UI.

14 years agoreorg for clarity and exposition.
dholland [Mon, 29 Mar 2010 04:00:03 +0000 (04:00 +0000)]
reorg for clarity and exposition.

14 years agoBetter user interface. From OpenBSD, written by Paul Janzen quite a
dholland [Mon, 29 Mar 2010 03:51:55 +0000 (03:51 +0000)]
Better user interface. From OpenBSD, written by Paul Janzen quite a
long time ago. A few minor adjustments by yours truly.

14 years agoSpell "versus" right.
dholland [Mon, 29 Mar 2010 02:48:17 +0000 (02:48 +0000)]
Spell "versus" right.

14 years agoAllow saved game filenames up to PATH_MAX. From OpenBSD.
dholland [Mon, 29 Mar 2010 02:46:05 +0000 (02:46 +0000)]
Allow saved game filenames up to PATH_MAX. From OpenBSD.

14 years agofix quote markup, spotted in openbsd diffs
dholland [Mon, 29 Mar 2010 02:34:50 +0000 (02:34 +0000)]
fix quote markup, spotted in openbsd diffs

14 years agoFix typo. From OpenBSD.
dholland [Mon, 29 Mar 2010 02:32:45 +0000 (02:32 +0000)]
Fix typo. From OpenBSD.

14 years agoDon't exit(0) on failure. Use errx() instead of fprintf.
dholland [Mon, 29 Mar 2010 02:21:04 +0000 (02:21 +0000)]
Don't exit(0) on failure. Use errx() instead of fprintf.

14 years agorename text() to wrtext(), aligning it with most other output routines,
mrg [Mon, 22 Mar 2010 05:10:19 +0000 (05:10 +0000)]
rename text() to wrtext(), aligning it with most other output routines,
and avoiding a compile error on powerpc64.

XXX: this tries to make a ".text" symbol, which already exists...

14 years agoLatin police: use proper conjugation.
dholland [Tue, 16 Feb 2010 09:53:51 +0000 (09:53 +0000)]
Latin police: use proper conjugation.
(whether the rest of the affected fortune is valid either is debatable)

14 years agoWhen using -lcurses, you also need -lterminfo.
he [Sat, 6 Feb 2010 23:45:24 +0000 (23:45 +0000)]
When using -lcurses, you also need -lterminfo.
This fixes the build for sun2, and also builds with LDSTATIC=-static,
since archive libraries don't record inter-library dependencies.

14 years agoUserland now builds and uses terminfo instead of termcap.
roy [Wed, 3 Feb 2010 15:34:37 +0000 (15:34 +0000)]
Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@

15 years agoClose file when finished with it. Found by cppcheck.
wiz [Sun, 17 Jan 2010 22:56:32 +0000 (22:56 +0000)]
Close file when finished with it. Found by cppcheck.

15 years agoSimplify alloc() to avoid ifdef(LINT) workaround.
wiz [Sun, 17 Jan 2010 22:55:20 +0000 (22:55 +0000)]
Simplify alloc() to avoid ifdef(LINT) workaround.

15 years agoClose two file descriptors after using them. Found by cppcheck.
wiz [Sun, 17 Jan 2010 22:52:00 +0000 (22:52 +0000)]
Close two file descriptors after using them. Found by cppcheck.

15 years agoThe default output file extension is '.dat', not '.out'.
mbalmer [Sun, 17 Jan 2010 13:35:00 +0000 (13:35 +0000)]
The default output file extension is '.dat', not '.out'.
From Lars Nooden via OpenBSD.

15 years agoUse .%U instead of .%O for URLs.
joerg [Fri, 15 Jan 2010 19:39:10 +0000 (19:39 +0000)]
Use .%U instead of .%O for URLs.

15 years agoChristos points out that usage should not use errx, but should use
dholland [Sun, 3 Jan 2010 17:08:45 +0000 (17:08 +0000)]
Christos points out that usage should not use errx, but should use
getprogname.

15 years agoNew sentence, new line.
wiz [Fri, 1 Jan 2010 11:45:34 +0000 (11:45 +0000)]
New sentence, new line.

15 years agoAdjust SYNOPSIS for cfscores to better match reality. Note in BUGS
dholland [Fri, 1 Jan 2010 07:35:09 +0000 (07:35 +0000)]
Adjust SYNOPSIS for cfscores to better match reality. Note in BUGS
that the score file isn't portable. Bump date (first time since 1993,
and first in 2010...)

15 years agoSplit struct betinfo into its own header file so it can be shared
dholland [Fri, 1 Jan 2010 06:37:15 +0000 (06:37 +0000)]
Split struct betinfo into its own header file so it can be shared
between canfield and cfscores, instead of copy-pasted.

15 years agoUse NULL instead of 0 for pointer tests. Remove an unnecessary cast.
dholland [Fri, 1 Jan 2010 06:31:18 +0000 (06:31 +0000)]
Use NULL instead of 0 for pointer tests. Remove an unnecessary cast.

15 years agoSend error messages to stderr. Use errx/warnx, not printf.
dholland [Fri, 1 Jan 2010 06:20:45 +0000 (06:20 +0000)]
Send error messages to stderr. Use errx/warnx, not printf.

15 years agoCorrect usage message.
dholland [Fri, 1 Jan 2010 06:16:36 +0000 (06:16 +0000)]
Correct usage message.

15 years agoFix math notation, from PR 41547. While here, fix some potential tab
dholland [Fri, 1 Jan 2010 00:16:54 +0000 (00:16 +0000)]
Fix math notation, from PR 41547. While here, fix some potential tab
damage in the same fortune.

15 years agoHide the cursor during the game.
ahoka [Sat, 19 Dec 2009 19:27:53 +0000 (19:27 +0000)]
Hide the cursor during the game.

15 years agoFix bad merge. (SUBDIR= != SUBDIR +=)
matt [Mon, 14 Dec 2009 20:47:23 +0000 (20:47 +0000)]
Fix bad merge.  (SUBDIR= != SUBDIR +=)

15 years agoConditionalize some build directories by ${MKCXX}.
uebayasi [Mon, 14 Dec 2009 12:43:48 +0000 (12:43 +0000)]
Conditionalize some build directories by ${MKCXX}.

15 years ago was disappointed that someone wrote disappointed with one 'p', so I fixed it.
wiz [Tue, 8 Dec 2009 10:13:39 +0000 (10:13 +0000)]
 was disappointed that someone wrote disappointed with one 'p', so I fixed it.

15 years agoI was disappointed that someone wrote disappointed with two 's', so I fixed it.
mbalmer [Tue, 8 Dec 2009 10:04:27 +0000 (10:04 +0000)]
I was disappointed that someone wrote disappointed with two 's', so I fixed it.

15 years agouse %option noinput nounput
christos [Thu, 29 Oct 2009 14:27:26 +0000 (14:27 +0000)]
use %option noinput nounput

15 years agoAnother spelling mistake.
dholland [Thu, 29 Oct 2009 08:53:31 +0000 (08:53 +0000)]
Another spelling mistake.

15 years agoWhitespace.
dholland [Thu, 29 Oct 2009 08:47:07 +0000 (08:47 +0000)]
Whitespace.

15 years agoFix a bunch of typos and spelling errors.
snj [Wed, 28 Oct 2009 19:18:15 +0000 (19:18 +0000)]
Fix a bunch of typos and spelling errors.

15 years agoKill two duplicates.
snj [Wed, 28 Oct 2009 15:56:26 +0000 (15:56 +0000)]
Kill two duplicates.

15 years ago"Ghandi" -> "Gandhi"
dholland [Wed, 28 Oct 2009 06:23:29 +0000 (06:23 +0000)]
"Ghandi" -> "Gandhi"

15 years agoRemove 3rd and 4th clauses in christos' license. OK christos.
snj [Wed, 21 Oct 2009 01:07:44 +0000 (01:07 +0000)]
Remove 3rd and 4th clauses in christos' license.  OK christos.

15 years agoFix '=' for '==' in a test. From NAKAJIMA Yoshihiro in PR 42177.
dholland [Mon, 19 Oct 2009 02:34:40 +0000 (02:34 +0000)]
Fix '=' for '==' in a test. From NAKAJIMA Yoshihiro in PR 42177.

15 years agoDisable writing scores when built for /rescue. PR 42009
dholland [Tue, 8 Sep 2009 13:38:01 +0000 (13:38 +0000)]
Disable writing scores when built for /rescue. PR 42009

15 years agoDumping all system includes anything uses in one big header file is so 1986.
dholland [Mon, 31 Aug 2009 08:27:16 +0000 (08:27 +0000)]
Dumping all system includes anything uses in one big header file is so 1986.

XXX: Removing unused declarations (thus, unused headers can trigger
XXX: it) sometimes causes gcc to generate substantially different
XXX: code. Dunno why but it looks rather like a gcc bug.

15 years agoDon't need -DHAVE_REGCOMP any more
dholland [Thu, 27 Aug 2009 03:12:16 +0000 (03:12 +0000)]
Don't need -DHAVE_REGCOMP any more

15 years agoInstead of trying to cons up a regexp that ignores case, use REG_ICASE.
dholland [Thu, 27 Aug 2009 03:09:17 +0000 (03:09 +0000)]
Instead of trying to cons up a regexp that ignores case, use REG_ICASE.
This makes fortune -im work; it's been broken since whenever.

15 years agoTidy up regexp handling further.
dholland [Thu, 27 Aug 2009 03:04:58 +0000 (03:04 +0000)]
Tidy up regexp handling further.

15 years agoPrune conditional compilation for using obsolete regexp libraries.
dholland [Thu, 27 Aug 2009 02:21:36 +0000 (02:21 +0000)]
Prune conditional compilation for using obsolete regexp libraries.

15 years agoWhitespace.
dholland [Thu, 27 Aug 2009 02:03:22 +0000 (02:03 +0000)]
Whitespace.

15 years agoPrevent nasal demons in a case I spotted while preparing the previous.
dholland [Thu, 27 Aug 2009 01:42:08 +0000 (01:42 +0000)]
Prevent nasal demons in a case I spotted while preparing the previous.

15 years agoANSIfy function definitions.
dholland [Thu, 27 Aug 2009 01:40:27 +0000 (01:40 +0000)]
ANSIfy function definitions.

15 years agoSprinkle some size_t in places where it's better than int.
dholland [Thu, 27 Aug 2009 01:19:38 +0000 (01:19 +0000)]
Sprinkle some size_t in places where it's better than int.
(Reduces casts.)

15 years agoremove more unnecessary casts
dholland [Thu, 27 Aug 2009 00:43:31 +0000 (00:43 +0000)]
remove more unnecessary casts

15 years agoUse correct type for malloc sizes (size_t, not unsigned)
dholland [Thu, 27 Aug 2009 00:42:11 +0000 (00:42 +0000)]
Use correct type for malloc sizes (size_t, not unsigned)

15 years agoremove unnecessary casts
dholland [Thu, 27 Aug 2009 00:40:44 +0000 (00:40 +0000)]
remove unnecessary casts