summaryrefslogtreecommitdiffstats
path: root/monop/monop.c
Commit message (Collapse)AuthorAgeFilesLines
* WARNS=5dholland2012-06-191-10/+7
|
* handle EOF in inputahoka2011-12-011-4/+3
|
* sprinkle staticdholland2009-08-121-12/+12
|
* Remove the \n and tabs from the __COPYRIGHT() strings.lukem2008-07-201-4/+4
|
* Fix some more lint. (There's plenty to go around.)dholland2008-02-241-3/+3
| | | | | 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.
* fix some lintchristos2008-02-241-4/+4
|
* Source files should be named *.c or *.h, not random other things.dholland2008-02-241-3/+166
| | | | | | | | 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.
* Remove last traces of old save/load code. We no longer need a privatedholland2008-02-241-4/+2
| | | copy of malloc.
* More fixes from OpenBSD:dholland2008-02-231-20/+21
| | | | | | - initialize in the proper order - don't allow 1-player games - make the check for players named "done" work properly - a couple other minor things
* Use random() rather than rand(). Suggested by diffing against OpenBSD.dholland2008-02-201-3/+4
|
* KNF/whitespace nits. No functional changes.dholland2008-02-191-5/+5
|
* convert __attribute__s to applicable cdefs.h macrosperry2007-12-151-3/+3
|
* Remove uses of __P.jsm2004-01-271-7/+7
|
* 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.
* PR/8247: Simon Burge: monop(6) save/restore doesn't work.christos2003-04-211-2/+4
| | | | | | With the advent of elf and mmaping malloc, assumptions that the code made before about location and contents of the data segment broke. We supplied an sbrk() only malloc, and recorded the break point at the beginning of the program, so now save and restore works, in the traditional monop style.
* Give initiali[sz]e all the "i"s it deserves.wiz2001-09-181-3/+3
|
* Use setgid(), not setregid().mycroft2000-05-081-3/+3
|
* Use err(1, NULL) and warn(NULL) for `out of memory' error messages.jsm2000-01-091-4/+4
|
* Security improvements for games (largely from or inspired by OpenBSD).jsm1999-09-121-2/+5
| | | | | | | | | | | | | | | Games which run setgid from dm, but don't need to, should drop their privileges at startup. Games which have a scorefile should open it at startup, then drop all privileges leaving just the open writable file descriptor. If the game can invoke subprocesses, this should be made close-on-exec. Games with scorefiles should make sure they do not get a file descriptor < 3. (Otherwise, they could get confused and corrupt the scorefile when using stdin, stdout or stderr.) Some old setuid revokes from the days of setuid games change into gid revokes.
* Check for failure of malloc() and calloc() at various places in the games.jsm1999-09-091-3/+8
|
* Add `__noreturn__' and `__unused__' attributes where appropriate tojsm1999-09-081-3/+3
| | | | | | | | | | | | 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). Most noreturn attributes were previously added in bin/6144, with some others that were missed then in bin/8082. Previous `unused' attributes were covered in bin/6557, bin/8058 and other PRs (all these PRs have already been handled and closed).
* Convert to something resembling KNF.simonb1999-08-211-19/+21
|
* use symbolic constants for signals & open(2), as per PR#5867hubertf1998-09-111-3/+3
|
* WARNSifychristos1997-10-121-21/+46
|
* merge with Lite, new RCS id conventions, etc.cgd1995-03-231-7/+12
|
* Add RCS identifiers.mycroft1993-08-011-1/+2
|
* initial import of 386bsd-0.1 sourcescgd1993-03-211-0/+162