Commit Graph

60 Commits

Author SHA1 Message Date
wiz
c91d8d6b9b Lots of minor fixes resulting from reading these man pages in detail. 2002-09-26 18:31:58 +00:00
wiz
0d22e30cd0 New sentences begin on new lines.
Patch from Richard Elz, slightly improved by yours truly.
2002-09-26 16:12:39 +00:00
itojun
c3ca2a9ab6 calloc() arg mistake. it's (nelem, size). from openbsd 2002-08-12 02:37:26 +00:00
wiz
10b0b6bce0 de-register 2002-06-02 22:17:37 +00:00
thorpej
5ab89c4a4a No need to reference .OBJDIR here. 2002-03-05 21:29:56 +00:00
ross
dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
wiz
9fa0b17629 Give initiali[sz]e all the "i"s it deserves. 2001-09-18 18:15:49 +00:00
jsm
312e8e64e5 Include <time.h> for declarations the Single Unix Specification says
are there but not in <sys/time.h>.
2001-08-29 18:23:44 +00:00
wiz
a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
lukem
4af1b6e1a6 fix building of cards.pck 2001-06-06 17:31:28 +00:00
wiz
834bb1b3ab Whitespace and/or punctuation fixes. 2001-04-02 22:42:37 +00:00
cgd
9cfe468c74 avoid C sequence point issues warned about by development version of gcc. 2001-01-16 02:41:17 +00:00
lukem
51ea0cba47 remove unnecessary command name after .Nm 2000-11-07 05:51:54 +00:00
simonb
251d3a61d0 Use a local implementation of htonl() called h2nl(). htonl() is not
available in all cross-compile environments.

Patches from Chris Demetriou.
2000-07-31 11:39:00 +00:00
itojun
d303927592 printf() pedant - do not pass variable alone, use %s.
idea from openbsd.  after looking at freebsd commit msgs from kris@freebsd.
2000-07-10 10:19:25 +00:00
hubertf
010dad14ae Fix typo, pointed out by seebs@plethora.net in PR bin/10131. 2000-05-17 02:30:25 +00:00
mycroft
f9eca6973d Use setgid(), not setregid(). 2000-05-08 07:55:59 +00:00
jsm
a5da40c55a Use err(1, NULL) and warn(NULL) for `out of memory' error messages. 2000-01-09 17:17:19 +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
ce5670f70f Fix uses of namespaces reserved by ISO C or POSIX.1. 1999-09-30 18:01:31 +00:00
jsm
5367f3400c Security improvements for games (largely from or inspired by OpenBSD).
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.
1999-09-12 09:02:20 +00:00
jsm
18c51c04de Check for write errors in auxiliary programs used during build of games. 1999-09-10 00:18:20 +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
b03d4fa882 Add __noreturn__' and __unused__' attributes 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).

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).
1999-09-08 21:45:25 +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
lukem
dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
lukem
b569ddabe9 don't install in /usr/share if NOSHARE is defined 1998-09-29 07:33:20 +00:00
wrstuden
aaae79a78d Make the helper programs compile right in a cross-compiling environment. 1998-09-12 19:05:48 +00:00
hubertf
e1627357ea use symbolic constants for signals & open(2), as per PR#5867 1998-09-11 13:54:08 +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
lukem
4877bdbb3b enable WARNS?=1 by default, & temporarily disable for the few unclean programs 1997-10-12 14:21:44 +00:00
thorpej
20c2907cc6 Allow this to be cross-compiled. 1997-04-19 07:20:13 +00:00
thorpej
365ece4e6a Make these compile on the PowerPC (an unsigned char system). 1997-03-29 20:42:16 +00:00
christos
d59123b39b - Makefile cleanups 1997-03-24 22:15:37 +00:00
thorpej
943e25b8bf Use ${INSTALL}. 1996-10-18 02:48:24 +00:00
cgd
c4816c32b3 Various changes to make games compile w/o warnings on the alpha:
Include appropriate includes, delete bogus function declarations,
change sizes of variables and casts.
1995-04-24 12:21:37 +00:00
cgd
42fb1b9d4a merge with Lite, new RCS id conventions, etc. 1995-03-23 08:28:00 +00:00
cgd
bd51185a18 from Lite 1995-03-21 15:59:39 +00:00
cgd
c4c01d75b2 specify man pages the new way. 1994-12-22 09:31:26 +00:00
cgd
d00b34b8ac fix transposition. from Luke Mewburn <lm@rmit.edu.au> 1994-03-19 08:01:23 +00:00
pk
be7657d720 Use .OBJDIR for auxiliary programs. 1994-01-04 21:40:31 +00:00
cgd
ed4933867f use LDSTATIC 1993-11-08 04:45:28 +00:00
jtc
941b6d7b19 Fix formatting error. 1993-09-16 17:03:11 +00:00
mycroft
7567e62b0c Nuke `all' dependency. bsd.prog.mk does it, and correctly. 1993-08-10 02:46:49 +00:00
mycroft
039d30ccd4 Tweak for cross-compilation. 1993-08-10 02:44:47 +00:00
jtc
3fc4ca69ee Update our -mandoc manpage with changes from new uunet -man manpage. 1993-08-09 22:18:06 +00:00