Commit Graph

27 Commits

Author SHA1 Message Date
jnemeth 2e0522b1d5 PR/49513 - Henning Petersen -- tyop 2014-12-29 10:38:52 +00:00
jnemeth f047653252 PR/49513 - Henning Petersen -- tyop 2014-12-29 10:27:03 +00:00
dholland c34afa686b WARNS=5 2012-06-19 05:30:43 +00:00
dholland 85288e8bd5 Avoid undefined behavior, from Chris Spiegel in PR 43860. 2010-09-26 21:12:23 +00:00
christos dc11f84d61 fix some lint 2008-02-24 03:56:48 +00:00
dholland 97464386e1 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.)
2008-02-24 02:43:18 +00:00
dholland b51259daf4 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.
2008-02-24 01:57:34 +00:00
dholland 61715c12c2 Improve the behavior of get-out-of-jail-free cards by returning them to
the bottom of the deck when used. There are still a few other problems.
From OpenBSD.
2008-02-23 19:54:06 +00:00
dholland 82ff30a443 Rename ->last_card to ->top_card to match OpenBSD (and also to make
somewhat more sense...)
2008-02-23 19:49:21 +00:00
dholland 8b5e597afa Move ret_card() to cards.c, where it more rationally belongs. From OpenBSD. 2008-02-23 19:09:00 +00:00
dholland 16168c2070 KNF/whitespace nits. No functional changes. 2008-02-19 09:45:02 +00:00
dholland 0419d05bfc Don't use perror(); use err/warn instead.
Suggested by diffing against OpenBSD.
2008-02-19 09:30:26 +00:00
dholland 4e5cdff5fd Make this build with WARNS=4. 2008-01-28 06:16:13 +00:00
jsm cb5fd8342e Remove uses of __P. 2004-01-27 20:30:28 +00:00
agc e5aeb4ea46 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22269, verified by myself.
2003-08-07 09:36:50 +00:00
itojun c3ca2a9ab6 calloc() arg mistake. it's (nelem, size). from openbsd 2002-08-12 02:37:26 +00:00
simonb d61cb0817b Don't use <err.h>. Use ANSI prototypes (no dependance on the __P()
macro).  Add new fwrite_be_offt() function which writes out a big-endian
64bit number regards of the size of off_t on the host machine.

Also fix ``bug'' in previous - even though the off_t pointers were
stored big-endian, the individual card lenghs were in host-order.  The
cards.pck files are now identical when make on a big- or little-endian
machine.

Now builds a correct cards.pck file on non-NetBSD machines as well
- tested on Ultrix and Solaris (but Solaris needs -lsocket to get
htonl()).
1999-12-30 01:40:08 +00:00
jsm a9c7f9b096 Check for failure of malloc() and calloc() at various places in the games. 1999-09-09 17:27:58 +00:00
jsm 5fb18dd9da Use the symbolic names `SEEK_SET' and `O_RDONLY' where appropriate in
the games.
1999-09-08 21:57:16 +00:00
jsm 092d313019 Add use of `const' where appropriate to the games.
This merges in all such remaining changes from the Linux port of the
NetBSD games, except in hunt (where substantial changes from OpenBSD
need to be looked at).

Some such changes were previously covered in PRs bin/6041, bin/6146,
bin/6148, bin/6150, bin/6151, bin/6580, bin/6660, bin/7993, bin/7994,
bin/8039, bin/8057 and bin/8093.
1999-09-08 21:17:44 +00:00
simonb e42b2048d4 Convert to something resembling KNF. 1999-08-21 10:40:03 +00:00
simonb e28c422151 Instead of writing out a structure that contains pointers as the header
of the card decks file, just write out the number of cards for each
deck.  Also use "off_t" for offsets into the file (that are stored after
the number of cards) instead of "long".
/usr/share/games/cards.pck is now MI.
1999-08-21 09:23:44 +00:00
veego 04afeca685 Add braces to make the new egcs happy. 1998-08-30 09:19:36 +00:00
christos b118ad2218 WARNSify 1997-10-12 17:45:06 +00:00
cgd 42fb1b9d4a merge with Lite, new RCS id conventions, etc. 1995-03-23 08:28:00 +00:00
mycroft 8542364e07 Add RCS identifiers. 1993-08-01 18:49:50 +00:00
cgd 61f282557f initial import of 386bsd-0.1 sources 1993-03-21 09:45:37 +00:00