Commit Graph

71 Commits

Author SHA1 Message Date
christos
a7a74df4fa Coverity CID 2788: If no room gets returned, don't try to place a monster. 2006-04-02 00:13:29 +00:00
jnemeth
e61c7de467 Coverity CID 2452: possible negative array index; CID 1518 and CID 1517: possible overrun of static array 2006-03-30 05:04:22 +00:00
jnemeth
1c3223f073 Coverity CID 1288: possible negative array index 2006-03-30 04:41:15 +00:00
jnemeth
67f465476e Coverity CID 993: dereference of NULL pointer 2006-03-30 04:27:24 +00:00
jnemeth
cc2349eefc Coverity CID 1293: not checking for an error return 2006-03-30 04:19:38 +00:00
jnemeth
fa4599a211 Coverity CID 1287: not checking for error return 2006-03-30 04:10:04 +00:00
abs
f4f2f41178 Call fclose() appropriately if there is a problem with the save file.
Coverty CID 2063
2006-03-17 23:04:01 +00:00
wiz
d9f5a9df01 Use standard AUTHORS section header. From YOMURA Masanori in private mail
Sort sections if necessary. Use more/better markup.
2005-09-15 02:09:41 +00:00
tron
bd52bf6180 Change marker from "pmppc" to "powerpc" because a NetBSD-macppc build
is also affected.
2005-06-09 12:20:12 +00:00
he
1ce7c753b3 Add an initialization to placate -Wuninitialized.
Marked with XXXGCC for pmppc (found while compiling for it).
2005-06-09 09:36:19 +00:00
jsm
b91a81ab9f Cast last argument of execl to (char *).
Reviewed by <hubertf>.
2005-02-15 12:56:20 +00:00
jsm
2773e864bb Avoid arrays of incomplete types (required to build with GCC 4).
Reviewed by <hubertf>.
2005-02-15 12:54:50 +00:00
wiz
d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
jsm
cb5fd8342e Remove uses of __P. 2004-01-27 20:30:28 +00:00
jsm
5a753461bf Don't use -fwritable-strings. Add one more const. 2004-01-01 16:05:12 +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
lukem
001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
wiz
7bd171e1c0 Drop a trailing dot. From jmc@openbsd. 2003-04-26 21:30:51 +00:00
simonb
276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
pooka
b99251db10 Add ${MACROS} to ${ROFF} usage to make output readable
from jbernard@mines.edu in misc/19685
2003-01-05 12:34:26 +00:00
mrg
4a05361ffa - use correctly bounded strings when reloading a saved game. in particular,
do not let the save game file "string length" exceed the amount of space
supplied.  as noted by <stanojr@iserver.sk> on bugtraq.
- minor KNF.

tested by simonb.
2002-10-01 14:18:57 +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
tron
10f663ea7a Make "rogue" build with "WARNS=2". The necessary patches were supplied
by David A. Holland in PR bin/17498.
2002-07-07 09:35:07 +00:00
blymn
7147df1ef5 Change deprecated curses call to new equivalent. 2001-12-06 12:19:44 +00:00
wiz
e7a85c433d Fix pasto. From FreeBSD. 2001-08-09 13:09:59 +00:00
wiz
e65cad56b9 Fix for FreeBSD/13278, from FreeBSD:
When a game ends that makes the top 10, the function insert_score in
score.c is called to make the new score file.  But the case for KFIRE
(killed by fire) incorrectly uses strcpy instead of strcat (all the
other cases use strcat).  This puts the string in the wrong place and
corrupts the score file.
2001-08-09 13:02:49 +00:00
christos
16263c885d remove duplicate decls 2001-02-05 01:04:25 +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
matt
3233065035 More include additions for exit, abs, strcmp, etc. 2000-07-03 03:57:39 +00:00
soren
3872dc30f7 Fix doubled 'the'. 2000-03-13 22:53:22 +00:00
jsm
20e3305006 Fix -Wsign-compare warnings. 1999-09-18 19:38:46 +00:00
jsm
34d9941aa7 Fix buffer overrun in rogue. 1999-09-13 17:19:55 +00:00
jsm
50ab22237f Remove rogue's old and bit-rotten cut-down version of curses. 1999-09-13 17:14:07 +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
a9c7f9b096 Check for failure of malloc() and calloc() at various places in the games. 1999-09-09 17:27:58 +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
abs
190c71aa67 s/SETUIDGAME/SETGIDGAME/ - catch up with the rest of the world. 1999-04-05 08:04:48 +00:00
hubertf
6d265b3268 constify, per PR 6148 1998-11-10 13:01:31 +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
hubertf
eb2507ecb2 fix prototype, per PR#5867 1998-09-11 14:11:57 +00:00
hubertf
3fd99e1631 fix prototypes, per PR#5867 1998-09-11 14:09:27 +00:00
hubertf
0ef663b102 fix prototype of mon_sees(), per PR#5867 1998-09-11 14:07:51 +00:00
mycroft
a6bb9f4ef1 const poisoning. 1998-07-27 01:12:35 +00:00
hubertf
d6a8a3d395 As per PR bin/5806 by Joseph Myers <jsm28@cam.ac.uk>/lash@tellabs.com:
- Init Random by time, not by pid
 - Fix lossage with fire-spitting, monster-killing dragons
1998-07-21 07:01:54 +00:00
jtc
2065ddb3da Simply include -lcurses instead of -lcurses -ltermcap 1998-02-18 22:37:30 +00:00
christos
85bf72e14e Remove -lcompat; not needed 1998-02-04 10:21:50 +00:00
mrg
6074e1b476 install games that need it setgid. 1997-11-20 00:12:30 +00:00
lukem
009fbbc126 use CPPFLAGS instead of CFLAGS 1997-10-22 05:05:21 +00:00
mycroft
71b1a37798 Better fix for the previous. 1997-10-15 12:43:35 +00:00