Commit Graph

60 Commits

Author SHA1 Message Date
rtr
90b0b10c77 remove duplicate #include <stdlib.h> 2006-03-20 12:32:21 +00:00
he
3ac2299da5 Now that we use exit(2), we need to include <stdlib.h> for its definition. 2006-03-19 12:09:39 +00:00
christos
c08f926ecb include <stdlib.h> to get a prototype for exit 2006-03-19 06:02:50 +00:00
christos
2a67d42737 Coverity CID 1295: Don't allow cchose to return a negative number. It is
used as an index.
2006-03-18 23:14:45 +00:00
jmc
1f90022eca KNF and WARNS=3 2005-07-02 08:32:32 +00:00
rillig
117d073a60 Fixed wrong use of datatypes. In wait_for(), a char was used together
with getchar(), in readchar(), a char was used to read input, which in
getuchar() is used as an argument to islower() and toupper(). Also removed
a condition which terminated the process if the user typed in character
255. Approved by christos.
2005-04-19 20:12:07 +00:00
jsm
b91a81ab9f Cast last argument of execl to (char *).
Reviewed by <hubertf>.
2005-02-15 12:56:20 +00:00
dsl
49f7d8a9b1 Add (unsigned char) cast to ctype functions 2004-11-05 21:30:31 +00:00
jsm
10b61a7cca Mark unused parameters, nonreturning functions and format functions in
the few cases not already marked.
2004-02-08 22:23:50 +00:00
jsm
cb5fd8342e Remove uses of __P. 2004-01-27 20:30:28 +00:00
jsm
d8c5384694 Rename rint to receive_intr to avoid conflict with GCC 3.4 built-in C99
function.
2004-01-26 09:58:35 +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
thorpej
15edfc1544 Avoid confict with reserved identifier "expl". 2002-12-06 01:48:24 +00:00
wiz
afcfd8817a n-dashes are even better here. Noted by Robert Elz. 2002-09-30 12:43:22 +00:00
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
wiz
7fd8f3df3f __STDC__ is always defined on NetBSD. 2002-05-26 00:12:11 +00:00
blymn
7d6d5f042f Change deprecated curses function to new equivalent. 2001-12-06 11:59:45 +00:00
blymn
c08523b03e Replace deprecated curses call with supported equivalent. 2001-12-04 13:12:23 +00:00
wiz
834bb1b3ab Whitespace and/or punctuation fixes. 2001-04-02 22:42:37 +00:00
christos
b176d7de54 remove redundant decl 2001-02-05 00:28:30 +00:00
mycroft
f9eca6973d Use setgid(), not setregid(). 2000-05-08 07:55:59 +00:00
drochner
85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
jsm
04e5e8fff9 Add more files to FILES section of cribbage.6. 1999-10-01 17:04:42 +00:00
jsm
ce5670f70f Fix uses of namespaces reserved by ISO C or POSIX.1. 1999-09-30 18:01:31 +00:00
jsm
d615d2a90e Define variables as BOOLEAN, not bool, where the extern declarations
already use BOOLEAN.
1999-09-19 18:12:09 +00:00
jsm
20e3305006 Fix -Wsign-compare warnings. 1999-09-18 19:38:46 +00:00
jsm
533a40974d Make cribbage use the POSIX.2 pager behaviour. 1999-09-13 17:27:36 +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
271baf14b4 Fix glitch in const changes (bin/8365 from John.P.Darrow@wheaton.edu). 1999-09-10 00:03:14 +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
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
hubertf
1c9494f62b mark non-returning functions (PR#6144 by Joseph Myers <jsm28@cam.ac.uk>) 1998-09-13 15:27:25 +00:00
veego
04afeca685 Add braces to make the new egcs happy. 1998-08-30 09:19:36 +00:00
jtc
2065ddb3da Simply include -lcurses instead of -lcurses -ltermcap 1998-02-18 22:37:30 +00:00
christos
cb47578732 Use -ltermcap instead of -ltermlib 1998-02-05 12:15:51 +00:00
mrg
6074e1b476 install games that need it setgid. 1997-11-20 00:12:30 +00:00
lukem
98b1c0851c minor KNFify 1997-10-11 02:44:30 +00:00
lukem
83cce15aa4 WARNSify 1997-10-10 12:26:34 +00:00
mikel
b58650d7c5 make explicit comparisons to NULL, s/rindex/strrchr/ 1997-07-10 06:47:29 +00:00
phil
edce639300 Clean up play, let player see play more often, improve display timing.
Preliminary work from PR 2055 (as reverse patches).
1997-07-09 06:25:45 +00:00
pk
58efb9d20c NULL => 0 (Arne Juul; PR#3629) 1997-05-17 19:24:44 +00:00
christos
d59123b39b - Makefile cleanups 1997-03-24 22:15:37 +00:00
thorpej
871c9c08af Use ${INSTALL}. 1996-10-18 02:37:51 +00:00
jtc
5224609738 Removed "extern int errno"; Added #include <errno.h> if not already present. 1996-02-06 22:47:06 +00:00
cgd
101657d110 clean up import 1995-03-21 15:03:38 +00:00
jtc
e6371e01f3 change <sys/signal.h> to <signal.h> 1995-02-28 18:30:59 +00:00
cgd
c4c01d75b2 specify man pages the new way. 1994-12-22 09:31:26 +00:00