summaryrefslogtreecommitdiffstats
path: root/monop/cards.c
Commit message (Collapse)AuthorAgeFilesLines
* Get all the games compiling for iOSCameron Katri2021-02-221-1/+1
|
* PR/49513 - Henning Petersen -- tyopjnemeth2014-12-291-3/+3
|
* PR/49513 - Henning Petersen -- tyopjnemeth2014-12-291-3/+3
|
* WARNS=5dholland2012-06-191-9/+6
|
* Avoid undefined behavior, from Chris Spiegel in PR 43860.dholland2010-09-261-3/+3
|
* fix some lintchristos2008-02-241-4/+4
|
* Abolish the initdeck program and the weird little binary file it generates.dholland2008-02-241-56/+168
| | | | | | | | 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.)
* Source files should be named *.c or *.h, not random other things.dholland2008-02-241-3/+4
| | | | | | | | 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.
* Improve the behavior of get-out-of-jail-free cards by returning them todholland2008-02-231-5/+38
| | | | the bottom of the deck when used. There are still a few other problems. From OpenBSD.
* Rename ->last_card to ->top_card to match OpenBSD (and also to makedholland2008-02-231-5/+5
| | | somewhat more sense...)
* Move ret_card() to cards.c, where it more rationally belongs. From OpenBSD.dholland2008-02-231-2/+17
|
* KNF/whitespace nits. No functional changes.dholland2008-02-191-3/+3
|
* Don't use perror(); use err/warn instead.dholland2008-02-191-6/+4
| | | Suggested by diffing against OpenBSD.
* Make this build with WARNS=4.dholland2008-01-281-3/+3
|
* Remove uses of __P.jsm2004-01-271-4/+4
|
* Move UCB-licensed code from 4-clause to 3-clause licence.agc2003-08-071-7/+3
| | | Patches provided by Joel Baker in PR 22269, verified by myself.
* calloc() arg mistake. it's (nelem, size). from openbsditojun2002-08-121-3/+3
|
* Don't use <err.h>. Use ANSI prototypes (no dependance on the __P()simonb1999-12-301-3/+3
| | | | | | | | | | | | | 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()).
* Check for failure of malloc() and calloc() at various places in the games.jsm1999-09-091-2/+4
|
* Use the symbolic names `SEEK_SET' and `O_RDONLY' where appropriate injsm1999-09-081-3/+3
| | | the games.
* Add use of `const' where appropriate to the games.jsm1999-09-081-4/+4
| | | | | | | | | 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.
* Convert to something resembling KNF.simonb1999-08-211-24/+27
|
* Instead of writing out a structure that contains pointers as the headersimonb1999-08-211-6/+20
| | | | | | 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.
* Add braces to make the new egcs happy.veego1998-08-301-3/+4
|
* WARNSifychristos1997-10-121-9/+20
|
* merge with Lite, new RCS id conventions, etc.cgd1995-03-231-4/+9
|
* Add RCS identifiers.mycroft1993-08-011-1/+2
|
* initial import of 386bsd-0.1 sourcescgd1993-03-211-0/+208