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).
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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)
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.
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.
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.)
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.