Commit Graph

57 Commits

Author SHA1 Message Date
matt
29f82ac3aa Fix conflicting variable definitions 2012-02-18 06:57:23 +00:00
christos
aba0d26e70 avoid non-literal format strings. 2011-08-16 11:10:54 +00:00
dholland
5cea3c1fc6 remove #ifdef SVR4 2010-03-29 05:16:08 +00:00
dholland
b7b2c88aa1 Some improvements to the new UI. 2010-03-29 04:28:47 +00:00
dholland
96bcb2af91 reorg for clarity and exposition. 2010-03-29 04:00:03 +00:00
dholland
4a11aa7558 Better user interface. From OpenBSD, written by Paul Janzen quite a
long time ago. A few minor adjustments by yours truly.
2010-03-29 03:51:55 +00:00
dholland
3fa2c4cfe9 Spell "versus" right. 2010-03-29 02:48:17 +00:00
dholland
f6d2af84fc Allow saved game filenames up to PATH_MAX. From OpenBSD. 2010-03-29 02:46:05 +00:00
dholland
fb89b74a21 fix quote markup, spotted in openbsd diffs 2010-03-29 02:34:50 +00:00
dholland
47514c94ae Fix typo. From OpenBSD. 2010-03-29 02:32:45 +00:00
dholland
bb74336220 Don't exit(0) on failure. Use errx() instead of fprintf. 2010-03-29 02:21:04 +00:00
he
76d4444c78 When using -lcurses, you also need -lterminfo.
This fixes the build for sun2, and also builds with LDSTATIC=-static,
since archive libraries don't record inter-library dependencies.
2010-02-06 23:45:24 +00:00
dholland
bc0970cff2 sprinkle static 2009-08-12 06:19:17 +00:00
roy
7027866a09 Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.
2009-07-13 19:05:39 +00:00
dholland
a3c372524a Rectify non-compiling code that appears when DEBUG is defined. 2009-06-04 07:01:16 +00:00
dholland
99d95061d4 Remove global scratch string buffer. Don't zoom off the end while reading
user input, either.
2009-06-04 06:47:36 +00:00
dholland
60843edfc7 Remove remaining references to sprintf. 2009-06-04 06:41:50 +00:00
dholland
b8bb3787da Make a couple of the logging/printing functions printf-alikes. This removes
most of the calls to sprintf.
2009-06-04 06:27:47 +00:00
dholland
04ecbfca8b attribute noreturn -> __dead 2009-06-04 05:52:30 +00:00
dholland
02e6a3b1d0 sprintf -> snprintf 2009-06-04 05:51:12 +00:00
dholland
891dcf008d Increase spending on vowels. No object file diffs. 2009-06-04 05:43:29 +00:00
dholland
881e77fbe7 ANSIfy function declarations.x 2009-06-04 05:27:04 +00:00
drochner
432ec04420 if initscr() fails, exit with a message rather than crash in the
next curses call
2008-08-08 16:10:47 +00:00
lukem
2fe2731d3f Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 00:52:39 +00:00
dholland
d759c4a5e3 build with WARNS=4 2008-01-28 07:01:01 +00:00
perry
8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
mrg
bb1dac937d avoid a pointer sign difference. 2006-05-11 00:17:07 +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
rillig
4f6457e756 Fixed wrong use of the <ctype.h> functions by adding an explicit conversion
to unsigned char. Approved by christos.
2005-04-19 20:14:29 +00:00
dsl
49f7d8a9b1 Add (unsigned char) cast to ctype functions 2004-11-05 21:30:31 +00:00
jsm
cb5fd8342e Remove uses of __P. 2004-01-27 20:30:28 +00:00
jsm
0752e03df7 Include <limits.h> instead of <machine/limits.h>. 2004-01-27 20:26:20 +00:00
jsm
514bad17d7 Include <sys/endian.h>. 2004-01-27 20:25:48 +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
wiz
c91d8d6b9b Lots of minor fixes resulting from reading these man pages in detail. 2002-09-26 18:31:58 +00:00
wiz
875690e96c Ispell. 2002-09-26 16:29:25 +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
christos
1f9a3967e4 fix nested externs 2001-02-05 00:30:38 +00:00
matt
3233065035 More include additions for exit, abs, strcmp, etc. 2000-07-03 03:57:39 +00:00
mycroft
f9eca6973d Use setgid(), not setregid(). 2000-05-08 07:55:59 +00:00
soren
67d5a84c5a Fix doubled 'the'. 2000-03-13 23:57:23 +00:00
jsm
20e3305006 Fix -Wsign-compare warnings. 1999-09-18 19:38:46 +00:00
jsm
a1038d000e Fix uses of names of library functions for other purposes. 1999-09-13 17:18:56 +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
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
garbled
d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
erh
55f3a4b91b Fix .Bl/.El imbalance. 1999-03-10 09:29:08 +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