]> git.cameronkatri.com Git - bsdgames-darwin.git/log
bsdgames-darwin.git
15 years agoNull for pointers, not 0.
dholland [Mon, 25 May 2009 00:05:56 +0000 (00:05 +0000)]
Null for pointers, not 0.

15 years agoFix score printing so columns line up.
dholland [Mon, 25 May 2009 00:03:18 +0000 (00:03 +0000)]
Fix score printing so columns line up.

15 years agoAbolish cgetc(). It contained one line of code, which was wrong.
dholland [Sun, 24 May 2009 23:20:22 +0000 (23:20 +0000)]
Abolish cgetc(). It contained one line of code, which was wrong.
Call getchar() directly, and handle EOF properly instead of looping
(in some cases) or pretending that EOF is 0 (which it isn't).

15 years agoRemove unnecessary initialization that silenced a compiler warning in 1997.
dholland [Sun, 24 May 2009 23:00:46 +0000 (23:00 +0000)]
Remove unnecessary initialization that silenced a compiler warning in 1997.

15 years agoSprinkle some blank lines for readability.
dholland [Sun, 24 May 2009 22:57:37 +0000 (22:57 +0000)]
Sprinkle some blank lines for readability.

15 years agoSplit up lines > 80 chars. Object files unchanged.
dholland [Sun, 24 May 2009 22:55:03 +0000 (22:55 +0000)]
Split up lines > 80 chars. Object files unchanged.

15 years agoDon't use literal ^G's in string constants. Use \a.
dholland [Sun, 24 May 2009 21:55:24 +0000 (21:55 +0000)]
Don't use literal ^G's in string constants. Use \a.

15 years agoKNF: brace and comment placement. Object files identical.
dholland [Sun, 24 May 2009 21:44:56 +0000 (21:44 +0000)]
KNF: brace and comment placement. Object files identical.

15 years agowhitespace
dholland [Sun, 24 May 2009 20:43:09 +0000 (20:43 +0000)]
whitespace

15 years agoKNF: fix formatting of preprocessor directives
dholland [Sun, 24 May 2009 20:39:43 +0000 (20:39 +0000)]
KNF: fix formatting of preprocessor directives

15 years agoANSIfy function declarations. No object file diffs except for two functions
dholland [Sun, 24 May 2009 19:18:44 +0000 (19:18 +0000)]
ANSIfy function declarations. No object file diffs except for two functions
whose K&R declaration didn't fully match the prototype (char vs. int) and
the diff of the disassembly of those looks plausible.

15 years agoKNF. No change to .o file.
dholland [Sun, 24 May 2009 18:22:27 +0000 (18:22 +0000)]
KNF. No change to .o file.

15 years agoChange getdate() to getdatestr() since the former maybe present on systems
ginsbach [Wed, 6 May 2009 02:59:12 +0000 (02:59 +0000)]
Change getdate() to getdatestr() since the former maybe present on systems
supporting X/Open System Interfaces Extension (XSI) getdate() in <time.h>.
This prevents a function prototype conflict.

15 years agoRemove trailing whitespace.
wiz [Mon, 4 May 2009 20:37:28 +0000 (20:37 +0000)]
Remove trailing whitespace.

15 years agodefine YY_NO_INPUT where appropriate, from Kurt J. Lidl per PR misc/41160
drochner [Mon, 20 Apr 2009 16:05:29 +0000 (16:05 +0000)]
define YY_NO_INPUT where appropriate, from Kurt J. Lidl per PR misc/41160

15 years agoSort sections.
wiz [Sun, 12 Apr 2009 18:31:47 +0000 (18:31 +0000)]
Sort sections.

15 years agoDon't nest displays.
joerg [Sun, 12 Apr 2009 16:58:57 +0000 (16:58 +0000)]
Don't nest displays.

15 years agoConvert to mdoc markup. With input from wiz.
joerg [Sun, 12 Apr 2009 16:57:02 +0000 (16:57 +0000)]
Convert to mdoc markup. With input from wiz.

15 years ago\@ is not a valid escape sequence.
joerg [Thu, 9 Apr 2009 03:52:54 +0000 (03:52 +0000)]
\@ is not a valid escape sequence.

15 years agoAvoid hardcoded "too large" constant that caused FPE on the vax.
christos [Tue, 31 Mar 2009 18:48:16 +0000 (18:48 +0000)]
Avoid hardcoded "too large" constant that caused FPE on the vax.
XXX: Should pullup to 5.0

15 years agoSimplify previous; suggested by Paul Goyette
dholland [Sun, 15 Mar 2009 22:19:23 +0000 (22:19 +0000)]
Simplify previous; suggested by Paul Goyette

15 years agoFix sign-compare problem that crept in due to working from an old tree.
dholland [Sun, 15 Mar 2009 20:11:24 +0000 (20:11 +0000)]
Fix sign-compare problem that crept in due to working from an old tree.
Whoops. won't happen again...

15 years agogrammar fix
jnemeth [Sun, 15 Mar 2009 05:44:57 +0000 (05:44 +0000)]
grammar fix

15 years agoRework curses handling.
dholland [Sun, 15 Mar 2009 03:33:56 +0000 (03:33 +0000)]
Rework curses handling.

The most visible change is that the scrolling buffer of messages now
actually scrolls and keeps history, and you type on the bottom line only.
For now you can page through the history with ^P/^N; that's not ideal but
one can't fix everything all at once.

Use resizeable array code (roughly the same that I floated a while ago
in connection with make) to hold the scroll.

15 years agoMove newturn() from pl_7 to pl_2.
dholland [Sun, 15 Mar 2009 00:50:47 +0000 (00:50 +0000)]
Move newturn() from pl_7 to pl_2.
pl_7 was mostly curses/display stuff, is going to be all display stuff.
pl_2 is where the main loop lives.

15 years agoMove all curses bits to pl_7.c.
dholland [Sun, 15 Mar 2009 00:35:42 +0000 (00:35 +0000)]
Move all curses bits to pl_7.c.

15 years agoFix usage message
dholland [Sat, 14 Mar 2009 23:51:35 +0000 (23:51 +0000)]
Fix usage message

15 years agochdir to /var/games/sail while running, to simplify name handling.
dholland [Sat, 14 Mar 2009 23:47:18 +0000 (23:47 +0000)]
chdir to /var/games/sail while running, to simplify name handling.

15 years agoDon't crosswire the two kinds of path names, and don't croak on
dholland [Sat, 14 Mar 2009 23:12:20 +0000 (23:12 +0000)]
Don't crosswire the two kinds of path names, and don't croak on
scenario numbers > 99.

15 years agoTurns out the W_FILE message wasn't ever used.
dholland [Sat, 14 Mar 2009 22:54:05 +0000 (22:54 +0000)]
Turns out the W_FILE message wasn't ever used.

15 years agoCreate some abstraction for sending messages.
dholland [Sat, 14 Mar 2009 22:52:52 +0000 (22:52 +0000)]
Create some abstraction for sending messages.
Make a send and receive function for each possible message.
Make these have useful argument signatures.
Hide the list of message codes inside sync.c.

15 years agoDon't use perror()
dholland [Sat, 14 Mar 2009 20:14:56 +0000 (20:14 +0000)]
Don't use perror()

15 years agoconstify the version string
dholland [Sat, 14 Mar 2009 20:10:43 +0000 (20:10 +0000)]
constify the version string

15 years agoSprinkle some "bool". And don't use '\0' to mean 'false'.
dholland [Sat, 14 Mar 2009 20:04:43 +0000 (20:04 +0000)]
Sprinkle some "bool". And don't use '\0' to mean 'false'.

15 years agoUse \a instead of \7 for BEL.
dholland [Sat, 14 Mar 2009 19:57:14 +0000 (19:57 +0000)]
Use \a instead of \7 for BEL.

15 years agoPrune a comment referring to objects that (AFAICT) didn't even exist in -r1.1.
dholland [Sat, 14 Mar 2009 19:55:16 +0000 (19:55 +0000)]
Prune a comment referring to objects that (AFAICT) didn't even exist in -r1.1.

15 years agoDon't cast the return value of calloc().
dholland [Sat, 14 Mar 2009 19:36:42 +0000 (19:36 +0000)]
Don't cast the return value of calloc().

15 years agoLines <= 80 chars, remove trailing whitespace, other formatting adjustments.
dholland [Sat, 14 Mar 2009 19:35:13 +0000 (19:35 +0000)]
Lines <= 80 chars, remove trailing whitespace, other formatting adjustments.
No functional change.

15 years agoRemove some unnecessary casts.
dholland [Sat, 14 Mar 2009 18:41:21 +0000 (18:41 +0000)]
Remove some unnecessary casts.

15 years agoString buffer cleanup. sprintf bad.
dholland [Sat, 14 Mar 2009 18:32:47 +0000 (18:32 +0000)]
String buffer cleanup. sprintf bad.

15 years agoDon't use char for random state variables; use int or bool.
dholland [Sat, 14 Mar 2009 17:10:01 +0000 (17:10 +0000)]
Don't use char for random state variables; use int or bool.

15 years agoFix list markup. Use .Ic for key as suggested by wiz.
joerg [Wed, 11 Mar 2009 16:37:06 +0000 (16:37 +0000)]
Fix list markup. Use .Ic for key as suggested by wiz.

15 years agoFix preamble
joerg [Wed, 11 Mar 2009 13:06:10 +0000 (13:06 +0000)]
Fix preamble

15 years agoRemove redundant .br
joerg [Wed, 11 Mar 2009 13:05:59 +0000 (13:05 +0000)]
Remove redundant .br

15 years agoFix markup
joerg [Wed, 11 Mar 2009 13:05:46 +0000 (13:05 +0000)]
Fix markup

15 years agoFix preamble
joerg [Wed, 11 Mar 2009 13:01:49 +0000 (13:01 +0000)]
Fix preamble

15 years agoFix markup
joerg [Wed, 11 Mar 2009 13:00:37 +0000 (13:00 +0000)]
Fix markup

15 years agosprintf -> snprintf
dholland [Mon, 9 Mar 2009 04:38:39 +0000 (04:38 +0000)]
sprintf -> snprintf

15 years agoMove HISTORY to proper place.
dholland [Mon, 2 Mar 2009 10:16:54 +0000 (10:16 +0000)]
Move HISTORY to proper place.

15 years agoEdit. Sync with reality, at least partway. Bump date.
dholland [Mon, 2 Mar 2009 10:14:41 +0000 (10:14 +0000)]
Edit. Sync with reality, at least partway. Bump date.

15 years agoSort options. End sentence with a dot.
wiz [Mon, 2 Mar 2009 09:39:10 +0000 (09:39 +0000)]
Sort options. End sentence with a dot.

15 years agomdocify. Partly merged from OpenBSD. Not by any means perfect yet.
dholland [Mon, 2 Mar 2009 09:23:57 +0000 (09:23 +0000)]
mdocify. Partly merged from OpenBSD. Not by any means perfect yet.

15 years agoMore fixes from OpenBSD: use err instead of perror, don't hork on EOF
dholland [Mon, 2 Mar 2009 07:33:30 +0000 (07:33 +0000)]
More fixes from OpenBSD: use err instead of perror, don't hork on EOF
during the initial setup questions.

15 years agoCheck for failure of fgets when reading the captain's name, and don't
dholland [Mon, 2 Mar 2009 07:21:56 +0000 (07:21 +0000)]
Check for failure of fgets when reading the captain's name, and don't
allow it to be empty. From OpenBSD.

15 years agoUse errx() to send fatal error messages. From OpenBSD.
dholland [Mon, 2 Mar 2009 07:17:24 +0000 (07:17 +0000)]
Use errx() to send fatal error messages. From OpenBSD.

15 years agoUse errx/warnx instead of printing to stderr. From OpenBSD.
dholland [Mon, 2 Mar 2009 06:54:01 +0000 (06:54 +0000)]
Use errx/warnx instead of printing to stderr. From OpenBSD.

15 years agoUse err(3) and errx(3), not perror and fprintf to stderr. From OpenBSD.
dholland [Mon, 2 Mar 2009 06:44:22 +0000 (06:44 +0000)]
Use err(3) and errx(3), not perror and fprintf to stderr. From OpenBSD.

15 years agoBraces around a nested if, for clarity; suggested by diffing against OpenBSD.
dholland [Mon, 2 Mar 2009 06:43:53 +0000 (06:43 +0000)]
Braces around a nested if, for clarity; suggested by diffing against OpenBSD.

16 years agoFix bogus conditional caught by today's make. It looks as if MKHIDEGAME
dholland [Sun, 18 Jan 2009 20:22:45 +0000 (20:22 +0000)]
Fix bogus conditional caught by today's make. It looks as if MKHIDEGAME
has never worked since it was introduced in 2002... clearly a lot of
people care about that.

It should work now, but because it's evidently never been tested it
may also require setlist adjustments.

16 years agouse %zu to print size_t
tnn [Sun, 18 Jan 2009 13:30:33 +0000 (13:30 +0000)]
use %zu to print size_t

16 years agofix -Wsign-compare issues
lukem [Sun, 18 Jan 2009 00:24:29 +0000 (00:24 +0000)]
fix -Wsign-compare issues

16 years agoFix fiance/fiancee confusion. Fix another typo.
wiz [Tue, 2 Dec 2008 14:21:26 +0000 (14:21 +0000)]
Fix fiance/fiancee confusion. Fix another typo.
Jason McIntyre <jmc@kerhand.co.uk>.

16 years agoFix insure -> ensure confusion. From Jason McIntyre <jmc@kerhand.co.uk>.
wiz [Tue, 2 Dec 2008 14:21:02 +0000 (14:21 +0000)]
Fix insure -> ensure confusion. From Jason McIntyre <jmc@kerhand.co.uk>.

16 years agoPR/39923: Valery Ushakov: trek(6) can spin, consuming 100% CPU on powerpc
christos [Fri, 14 Nov 2008 21:10:44 +0000 (21:10 +0000)]
PR/39923: Valery Ushakov: trek(6) can spin, consuming 100% CPU on powerpc
On systems where char is unsigned the number of black holes can end up being
very large (instead of negative).

16 years agomore MKSHARE == no fixes:
mrg [Thu, 30 Oct 2008 21:37:55 +0000 (21:37 +0000)]
more MKSHARE == no fixes:
- move installation of atf pkg-config files out of share/atf/
- don't install spell or ching share files
- update some directory entries to not have 'share' tag

now my MKLINT=no MKSHARE=no MKPROFILE=no builds work again.

16 years agoUse uint32_t and include <stdint.h>, instead of using u_int32_t
apb [Sun, 19 Oct 2008 07:56:42 +0000 (07:56 +0000)]
Use uint32_t and include <stdint.h>, instead of using u_int32_t
and including <sys/types.h>.

16 years agoMake this build on Mac OS X.
agc [Mon, 29 Sep 2008 12:30:12 +0000 (12:30 +0000)]
Make this build on Mac OS X.

16 years agoInstall unstr:
apb [Fri, 26 Sep 2008 18:56:43 +0000 (18:56 +0000)]
Install unstr:
* in games/fortune/Makefile, add unstr to SUBDIR;
* in games/fortune/unstr/Makefile, include ../../Makefile.inc;
* in games/fortune/strfile/Makefile, add MLINKS for unstr man page;
* in distrib/sets/lists/games/mi, add new files.

16 years agoBuild strfile both as a host tool and as an installed program:
apb [Fri, 26 Sep 2008 18:23:09 +0000 (18:23 +0000)]
Build strfile both as a host tool and as an installed program:
* in games/fortune/strfile/Makefile, build strfile as a
  regular program instead of as a host tool;
* add tools/strfile directory to build strfile as a host tool;
* in tools/Makefile, add strfile to SUBDIR list;
* in BSD.*.mk, define TOOL_STRFILE variable;
* in games/fortune/datfiles/Makefile, use TOOL_STRFILE when creating
  databases at build time;
* in distrib/sets/lists/games/mi, mention usr/games/strfile.

16 years agoMake this pass WARNS=4:
apb [Fri, 26 Sep 2008 13:46:48 +0000 (13:46 +0000)]
Make this pass WARNS=4:
* u_int32_t -> uint32_t, and remove ifdef test.
* add function prototypes.

16 years agoBoth legs of the conditional operator must return the same type.
gmcgarry [Fri, 29 Aug 2008 00:37:38 +0000 (00:37 +0000)]
Both legs of the conditional operator must return the same type.

16 years agoWrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags...
gmcgarry [Fri, 29 Aug 2008 00:02:21 +0000 (00:02 +0000)]
Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC.

16 years agoif initscr() fails, exit with a message rather than crash in the
drochner [Fri, 8 Aug 2008 16:10:47 +0000 (16:10 +0000)]
if initscr() fails, exit with a message rather than crash in the
next curses call

16 years agoRemove the \n and tabs from the __COPYRIGHT() strings.
lukem [Mon, 21 Jul 2008 13:24:38 +0000 (13:24 +0000)]
Remove the \n and tabs from the __COPYRIGHT() strings.

16 years agoRemove the \n and tabs from the __COPYRIGHT() strings.
lukem [Sun, 20 Jul 2008 00:52:39 +0000 (00:52 +0000)]
Remove the \n and tabs from the __COPYRIGHT() strings.

16 years agoClarify how one is supposed to use the pointers returned by getutentries()
dholland [Sun, 13 Jul 2008 20:07:48 +0000 (20:07 +0000)]
Clarify how one is supposed to use the pointers returned by getutentries()
(the utmpentry.c code), specifically with respect to who owns them and
when to free them. Now they're owned by utmpentry.c, only. Abolish the
freeutentries() function, which was the wrong abstraction; add instead
endutentries(), which flushes out the internally managed memory.

Update callers as necessary. Some (e.g. talkd) had been leaking memory;
others (e.g. syslogd) had been accidentally freeing and reloading utmp
more often than necessary. There are a couple untidy bits in users and
rwhod that someone should look after sometime, maybe.

Fixes PR bin/35131, which was about talkd's memory leak.

16 years agoAdd test for HAVE_PCC with HAVE_GCC which turn off compiler warning flags.
gmcgarry [Sat, 12 Jul 2008 12:29:42 +0000 (12:29 +0000)]
Add test for HAVE_PCC with HAVE_GCC which turn off compiler warning flags.

16 years agoremove clause #3 from my license where there are no other
mrg [Thu, 29 May 2008 14:51:25 +0000 (14:51 +0000)]
remove clause #3 from my license where there are no other
copyright holders involved.

16 years ago2-clause my license.
wiz [Thu, 8 May 2008 15:31:07 +0000 (15:31 +0000)]
2-clause my license.

16 years agoRename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
lukem [Sat, 3 May 2008 14:48:30 +0000 (14:48 +0000)]
Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)

16 years agoRemove clause 3 and 4 from TNF licenses
martin [Mon, 28 Apr 2008 20:22:51 +0000 (20:22 +0000)]
Remove clause 3 and 4 from TNF licenses

16 years agoFix a tip: use pkg_info, not pkg_add to find out which executables
wiz [Tue, 25 Mar 2008 10:50:34 +0000 (10:50 +0000)]
Fix a tip: use pkg_info, not pkg_add to find out which executables
belong to a package.

16 years agoAdd a tip explaining how to run the tests in /usr/tests.
jmmv [Sun, 23 Mar 2008 19:48:57 +0000 (19:48 +0000)]
Add a tip explaining how to run the tests in /usr/tests.

16 years agoIn example, change dd count size and also chmod so others can't read swap.
reed [Sat, 22 Mar 2008 14:39:57 +0000 (14:39 +0000)]
In example, change dd count size and also chmod so others can't read swap.

16 years agoAdd five more tips.
reed [Fri, 21 Mar 2008 21:45:30 +0000 (21:45 +0000)]
Add five more tips.

16 years agoAdd "netbsd-tips" fortune database with 23 initial fortunes --
reed [Fri, 21 Mar 2008 21:09:48 +0000 (21:09 +0000)]
Add "netbsd-tips" fortune database with 23 initial fortunes --
actually hints or suggestions or tips on using NetBSD.
Please share your brief NetBSD usage tips.
If you want to discuss or share suggestions, have a look
at http://wiki.netbsd.se/netbsd-tips wiki page.

16 years agoDon't crash if we're asked to restore from /dev/null. (woops)
dholland [Sun, 24 Feb 2008 06:12:49 +0000 (06:12 +0000)]
Don't crash if we're asked to restore from /dev/null. (woops)

16 years agoFix a bit more lint.
dholland [Sun, 24 Feb 2008 06:07:06 +0000 (06:07 +0000)]
Fix a bit more lint.

16 years agoFix some more lint. (There's plenty to go around.)
dholland [Sun, 24 Feb 2008 06:03:35 +0000 (06:03 +0000)]
Fix some more lint. (There's plenty to go around.)

If we try to load a game and it bombs, keep prompting for another one,
because if we try to continue with a half-loaded game we'll probably
end up in trouble.

16 years agoDon't cast the return value of calloc.
dholland [Sun, 24 Feb 2008 05:53:33 +0000 (05:53 +0000)]
Don't cast the return value of calloc.

16 years agofix some lint
christos [Sun, 24 Feb 2008 03:56:48 +0000 (03:56 +0000)]
fix some lint

16 years agoneed errno.h
christos [Sun, 24 Feb 2008 03:52:09 +0000 (03:52 +0000)]
need errno.h

16 years agoUpdate for today's changes: 1-player games are not allowed, and cards.pck
dholland [Sun, 24 Feb 2008 03:50:07 +0000 (03:50 +0000)]
Update for today's changes: 1-player games are not allowed, and cards.pck
no longer appears.

16 years agoFix the OpenBSD housing shortage code.
dholland [Sun, 24 Feb 2008 03:26:26 +0000 (03:26 +0000)]
Fix the OpenBSD housing shortage code.

16 years agoret_card(), which I moved earlier, was consequently filed under the wrong
dholland [Sun, 24 Feb 2008 03:01:13 +0000 (03:01 +0000)]
ret_card(), which I moved earlier, was consequently filed under the wrong
source file name. fix.

16 years agoWe do not need special code for pdp11. Also, because random() returns all
dholland [Sun, 24 Feb 2008 02:58:33 +0000 (02:58 +0000)]
We do not need special code for pdp11. Also, because random() returns all
good bits (unlike rand()) we can simplify this.

16 years agoTypo patrol
dholland [Sun, 24 Feb 2008 02:55:20 +0000 (02:55 +0000)]
Typo patrol

16 years agoThis file is also no longer used.
dholland [Sun, 24 Feb 2008 02:53:18 +0000 (02:53 +0000)]
This file is also no longer used.

16 years agoAbolish the initdeck program and the weird little binary file it generates.
dholland [Sun, 24 Feb 2008 02:43:18 +0000 (02:43 +0000)]
Abolish the initdeck program and the weird little binary file it generates.
The card deck data is now compiled in. (And it always should have been,
even back when memory usage counted. It's small.)

This changes the save format slightly. (I am riding the previous
breakage an hour ago and not providing compat. There should be no
further breakage.)

16 years agoSource files should be named *.c or *.h, not random other things.
dholland [Sun, 24 Feb 2008 01:57:34 +0000 (01:57 +0000)]
Source files should be named *.c or *.h, not random other things.

Fold monop.ext (which was extern data decls) into monop.h and deck.h.
Fold monop.def (which had definitions for the extern data) into monop.c.
Fold brd.dat/mon.dat/prop.dat (which were array initializers for some of
the data) into monop.c.

Rearrange includes accordingly. No functional change.