dholland
81eafd7899
Remove config options for 4.2BSD and 4.3BSD, and associated code. Highly
...
obsolete, and I doubt most of it still worked anyway.
2009-07-04 07:51:34 +00:00
dholland
57ba7791b7
Remove the non-curses screen handling, since it relies on knowing
...
about various internals of SVR4 curses, old BSD curses, and/or other
unclean things. (Yes, the non-curses handling still used bits of
curses. Fie.)
2009-07-04 07:10:22 +00:00
dholland
cda8e486de
Remove config for the return type of signal handlers, which is also a
...
long-dead issue.
2009-07-04 06:38:34 +00:00
dholland
765594d234
Remove references to config #defines for the thoroughly obsolete
...
4.2BSD syslog API.
2009-07-04 06:31:31 +00:00
dholland
c41c818a00
more whitespace
2009-07-04 06:19:05 +00:00
dholland
b2987dcaa0
Various minor fixes, mostly from OpenBSD.
2009-07-04 06:15:27 +00:00
dholland
9a53db3705
Notes on the protocol used by hunt, from OpenBSD.
2009-07-04 05:06:06 +00:00
dholland
cb89af2bfc
Whitespace.
2009-07-04 05:01:16 +00:00
dholland
b2f99339f0
Whitespace.
2009-07-04 04:29:54 +00:00
dholland
db04762fba
Sigh, more of the same (missed two)
2009-07-04 03:29:20 +00:00
dholland
b00a6a7437
__attribute__((__noreturn__)) -> __dead
2009-07-04 03:27:57 +00:00
dholland
fbca3d8cfa
ANSIfy function declarations.
2009-07-04 01:58:57 +00:00
dholland
d9fe3edadc
Remove two more bogus casts. These *do* create object diffs on amd64,
...
for no clear reason, but it looks like the diffs are harmless.
2009-07-04 01:44:28 +00:00
dholland
07f4ebf08e
Remove bogus casts. Two object file diffs inspected and found to be harmless.
2009-07-04 01:23:55 +00:00
dholland
6ffae66268
Remove a pile of bogus casts. One object file diff, crosschecked and
...
found harmless.
2009-07-04 01:01:18 +00:00
dholland
165c915b22
Fix two serious string-handling bugs (one exploitable, one probably
...
exploitable) and also add proper checking/paranoia in several other
places.
2009-06-29 23:05:33 +00:00
dholland
0ed1b742e0
sprintf -> snprintf
2009-06-28 21:12:10 +00:00
dholland
4c08f5f97e
Fix possible remote DoS of a running hunt game, and prevent a possible
...
theoretical attack involving >= 1 billion ammo.
2009-06-28 18:59:37 +00:00
dholland
b8c355d789
a bit more const
2009-06-07 21:04:54 +00:00
dholland
a7a3b831c7
sprinkle some more const
2009-06-07 20:31:10 +00:00
dholland
8d5216e80d
remove unnecessary casts
2009-06-07 20:25:38 +00:00
dholland
907fca1b3e
sprintf -> snprintf, plus some use of strlcpy/strlcat where appropriate
...
XXX: there's still one sprintf left which will take some hacking to expunge.
2009-06-07 20:13:18 +00:00
dholland
1fa8a9a633
ANSIfy function declarations. All object file diffs inspected.
2009-06-07 18:30:39 +00:00
dholland
a3c372524a
Rectify non-compiling code that appears when DEBUG is defined.
2009-06-04 07:01:16 +00:00
dholland
a1be1bdddd
Set WARNS=4 here. This got missed on my previous WARNS sweep in games.
...
Everything appears to compile ok with WARNS=4 anyway though.
2009-06-04 06:51:11 +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
dholland
54163608bb
sprintf -> snprintf
2009-06-04 04:48:04 +00:00
dholland
e5909fd6fe
Don't use a variable-size array here. There's not really that much point.
2009-06-01 04:03:26 +00:00
dholland
135a0700ed
Rearrange where the alternate definition of __dead goes.
...
It can't be before "include.h" as that includes a bunch of system headers,
but it can't be after either as it also includes a bunch of local headers.
Therefore, it needs to be *in* include.h.
2009-05-27 17:44:38 +00:00
dholland
4a5716eb31
Edit some.
2009-05-26 01:34:32 +00:00
dholland
1830cfcf79
Assorted fixes (mostly grammar, some markup) from OpenBSD.
2009-05-26 00:58:59 +00:00
dholland
bee0eddc6b
Paranoia about lengths of login names. From pjanzen of OpenBSD.
2009-05-26 00:30:16 +00:00
dholland
0cf018c12d
Avoid SIGSEGV on users not in password file. From pjanzen of OpenBSD.
2009-05-26 00:27:23 +00:00
dholland
2e221153bc
sprintf -> snprintf
2009-05-26 00:00:56 +00:00
dholland
951f1a50bf
attribute noreturn -> __dead
2009-05-25 23:48:32 +00:00
dholland
18d676539b
We don't need a private #define "unsgn" for "unsigned", especially since
...
it was used exactly once.
2009-05-25 23:44:04 +00:00
dholland
85fc4e7c13
Use the time to call srandom(), not getpid().
2009-05-25 23:41:23 +00:00
dholland
3a7e6d0da5
KNF/whitespace: format preprocessor directives correctly.
2009-05-25 23:34:50 +00:00
dholland
905e2f95c6
ANSIfy function declarations. Object file diffs checked.
2009-05-25 23:24:54 +00:00
dholland
ebb769ae0b
sprintf -> snprintf
2009-05-25 23:14:33 +00:00
dholland
c7a109cc7b
ANSIfy function declarations. Object file diffs cross-checked.
2009-05-25 23:08:45 +00:00
dholland
c1d5bd0853
attribute noreturn -> __dead
2009-05-25 22:35:01 +00:00
dholland
e32a40eb27
Clean up scorefile handling.
...
This was writing time_t to disk. Worse, the time_t member was at an
unaligned offset in the structure in question, so after the time_t
change the structure layout depended on compiler-inserted structure
padding. This gives three legacy formats: one with 32-bit time, one
with 64-bit time, and one with 64-bit time and 4 bytes of structure
padding.
And of course the file didn't have a header or version coding or
anything.
The new code writes a structure of well-defined size that should not
receive unexpected padding, and gives the file a header and version
number. It reads that format and any of the three legacy formats,
figuring out which one it's dealing with by inspecting the file
contents. For good measure, it also now handles opposite-endian files,
doesn't bail out unceremoniously unless necessary, and won't croak if
the file is corrupt and e.g. contains unterminated strings.
(Was it worth going to this length? Maybe not. But it didn't seem
right to just leave it, and it's not clear where to stop halfway.)
2009-05-25 08:33:57 +00:00
dholland
bbc67e0f7a
ANSIfy function declarations.
...
Some object file diffs, but they are harmless. (Mostly they seem to
come from internal counters in gcc... and in one case the order of two
instructions was harmlessly swapped, which is odd and annoying.)
2009-05-25 04:33:53 +00:00