dholland
e25cca1c03
fix obvious mistake (seems to have been there since 4.4)
2014-03-30 04:40:50 +00:00
dholland
90606027c5
Tidy up list of broadcast addresses.
2014-03-30 04:39:40 +00:00
dholland
319c22dff7
Clean up the handling of the list of hunt daemons.
2014-03-30 04:31:21 +00:00
dholland
2509088ed2
use fewer globals
2014-03-30 03:35:26 +00:00
dholland
78a2d83843
more cleanup
2014-03-30 03:26:19 +00:00
dholland
15043e8a8f
unexpose some globals that server.c previously required
2014-03-30 02:58:25 +00:00
dholland
3d3dd0d453
name reform, fewer file statics
2014-03-30 02:53:11 +00:00
dholland
61623de9c7
goto considered harmful
2014-03-30 02:46:57 +00:00
dholland
082c40f53a
split off a bunch of the nastier network code into its own file
2014-03-30 02:26:09 +00:00
dholland
38f4986ae9
When indexing an array with a char, cast it to unsigned char, not int,
...
to not only silence the compiler warning but also get the correct
behavior.
2014-03-30 02:11:25 +00:00
dholland
9e2af583dd
Remove all the conditional compilation for INTERNET. Now you can run
...
this on either a local or internet socket (including via inetd on
either) and it will, or is supposed to, DTRT.
Does not really support ipv6 yet, but in a number of places will no
longer vomit or exhibit UB if it encounters an ipv6 address.
2014-03-30 01:44:37 +00:00
dholland
8c7631b6e4
Clean up the names of the various pieces of socket apparatus.
...
Systematic naming is easier to follow...
2014-03-30 00:26:58 +00:00
dholland
f0ab07d690
fix non-INTERNET build
2014-03-29 23:44:38 +00:00
dholland
ec434f4b81
Er oops, fix previous.
2014-03-29 22:30:27 +00:00
dholland
865e0d6472
Reduce ifdefs by making a common function to talk to either syslogd or
...
stderr.
2014-03-29 22:29:55 +00:00
dholland
375031264b
group external functions by where they come from
2014-03-29 22:15:26 +00:00
dholland
80f7486c03
be consistent about whether functions are static
2014-03-29 22:15:13 +00:00
dholland
98db4e3267
handle compiled-in pathnames the customary way
2014-03-29 22:11:19 +00:00
dholland
af8c06ff02
make some globals static
2014-03-29 22:05:44 +00:00
dholland
ecca92983f
Additional minor cleanup and remove a straggler data declaration
...
from hunt_common.h.
2014-03-29 21:55:59 +00:00
dholland
506bf125f4
Group function declarations by which source file they come from, and
...
delete several that don't actually exist.
2014-03-29 21:43:46 +00:00
dholland
e195993756
be consistent about whether functions are static
2014-03-29 21:38:54 +00:00
dholland
b19465b277
sprinkle static
2014-03-29 21:33:41 +00:00
dholland
f1eb9b5b9c
Flush unwanted file.
2014-03-29 21:27:40 +00:00
dholland
39032702fc
Move definitions to the file they're used in.
2014-03-29 21:27:08 +00:00
dholland
15b06d8071
move a comment that should have gone with its symbol
2014-03-29 21:25:35 +00:00
dholland
b833a6b3f7
Remove tautological #if DEBUG.
2014-03-29 21:24:56 +00:00
dholland
ff658bd09f
Split hunt and huntd's includes, instead of incestuously sharing a pile
...
of external data and function declarations between the two programs.
Common constants and defines now go in hunt_common.h. Stuff that belongs
only to hunt is in hunt/hunt_private.h. Stuff that belongs only to huntd
is in huntd/hunt.h.
Copy some declarations that are used in both programs under the same
names (but are not actually the same objects) from huntd/hunt.h to
hunt/hunt_private.h. Move others that are only used in hunt. Remove
some entirely unused material, and tidy up standard includes.
2014-03-29 21:24:26 +00:00
dholland
d07915f9b3
Remove unsafe and unnecessary pointer casts.
2014-03-29 20:53:55 +00:00
dholland
c6e948ac19
catch up to huntd changes.
...
XXX: this needs to stop promiscuously sharing .h files.
2014-03-29 20:52:13 +00:00
dholland
8f371b472c
tsort contents of file
2014-03-29 20:44:20 +00:00
dholland
1b82cc9fb5
const in unused code
2014-03-29 20:41:57 +00:00
dholland
54eb2b3816
remove stubbed-out function
2014-03-29 20:35:30 +00:00
dholland
263e041ca2
Rip out the code that broadcasts talk requests to the local
...
hunt-players mailing list.
In this day and age it doesn't even begin to work: even if you were to
have such a mailing list locally, sendmail wouldn't expand it for you,
the addresses you got back wouldn't be talk-requestable addresses,
talk requests don't cross NAT or firewalls safely, talk doesn't
support ipv6, and nobody runs talkd anyway.
It doesn't make sense to try to replace it with some other kind of
notify scheme either; there might still be a multiuser machine
somewhere with enough simultaneous users that broadcasting something
akin to talk requests locally might make sense, and where a nontrivial
number of the users actually play hunt, but probably not, and if so
those users are likely to be better off using wall(1) anyway. Nowadays
games will be set up by looking for people in chat or by emailing or
texting friends.
Theoretically someone could set up an internet hunt metaserver for
finding hunt games, but that would be something entirely different
anyway and I doubt there's demand.
2014-03-29 20:32:04 +00:00
dholland
d39951fe62
Remove empty header file.
2014-03-29 20:16:09 +00:00
dholland
7004aab3ca
Use setproctitle() instead of handrolled version.
2014-03-29 20:12:12 +00:00
dholland
7b718e7cd8
Make the code for issuing talk requests to find players actually build.
2014-03-29 20:10:10 +00:00
dholland
37a43147ab
don't declare own boolean type
2014-03-29 19:41:10 +00:00
dholland
208bf48e82
use random(), not a handrolled 16-bit generator
2014-03-29 19:33:03 +00:00
dholland
329b34a67e
Use getaddrinfo() instead of gethostbyname().
2014-03-29 19:26:28 +00:00
dholland
d509fb9f42
typo in error message
2014-03-29 19:03:21 +00:00
dholland
267ec317ae
const
2014-03-29 19:02:12 +00:00
dholland
8a64b7f83c
simplify silly logic
2014-03-29 19:01:00 +00:00
apb
fa823f4eed
temp is a pointer, and tempmax, not sizeof(temp), is the length of
...
the buffer that it points to. Adjust a strlcat() call to suit.
2014-03-28 17:53:47 +00:00
apb
27e71a78a5
If you are going to use memcpy instead of struct assignment, then at
...
least use sizeof(the correct variable). The use of memcmp to test
two pointers for equality, one line earlier, is also weird but may be
correct.
2014-03-28 17:49:11 +00:00
dholland
c1b7c6be35
Add note cautioning against bothering with WARNS=6 until gcc improves
...
(or -Wconversion is removed from WARNS=6) as it produces loads of false
positives. The most entertaining of these that I've seen this afternoon:
games/hack/hack.apply.c:143:22: error: conversion to 'unsigned char:1' from 'int' may alter its value [-Werror=conversion]
flags.move = multi = 0;
^
2014-03-23 00:17:40 +00:00
dholland
920b84d8b3
fix signedness issue
2014-03-23 00:07:15 +00:00
dholland
b34516b7a7
gratuitous (but not harmful) changes to pass gcc48's -Wconversion
2014-03-23 00:03:04 +00:00
dholland
747644908b
Use ssize_t for read() results. Don't use int for lseek() results.
...
Call srandom() with time(), not getpid().
2014-03-22 23:47:03 +00:00
dholland
d6160edeb8
Use ssize_t for read() results. Don't use int for lseek() results.
2014-03-22 23:45:34 +00:00
dholland
5f3fafa77c
Use uid_t to hold getuid() results, and don't check getuid for failure
...
as it isn't allowed to fail.
2014-03-22 23:42:48 +00:00
dholland
246baf44c7
use size_t instead of int for a length
2014-03-22 23:39:04 +00:00
dholland
4d631eb951
Use random(), not rand().
2014-03-22 23:33:33 +00:00
dholland
ffe2e1f51c
avoid unnecessary floating point ops
2014-03-22 23:31:28 +00:00
dholland
84ecadaa86
avoid signed left-shift
2014-03-22 23:23:55 +00:00
dholland
6955cd2022
Use CHAR_BIT, not 8.
2014-03-22 23:16:21 +00:00
dholland
1b8c34b59e
don't declare ospeed; it's in <termcap.h>
2014-03-22 23:10:36 +00:00
dholland
1e7c0bc4d8
Make the list of place types an enumeration. Use unsigned values for
...
place numbers.
2014-03-22 22:58:56 +00:00
dholland
3216ca61cd
use a more suitable type
2014-03-22 22:47:07 +00:00
dholland
66a360a4e6
use more suitable types
2014-03-22 22:45:05 +00:00
dholland
6b884adb36
woops, more of previous.
2014-03-22 22:33:35 +00:00
dholland
c1bee345de
Make some things unsigned that should be (why would we need e.g. a
...
negative number of airports?) and remove some related bogus casts.
2014-03-22 22:24:21 +00:00
dholland
860c2027cb
Don't cast the return value of malloc.
2014-03-22 22:09:14 +00:00
dholland
6f629695aa
Minor tidyup.
2014-03-22 22:04:40 +00:00
dholland
337d73a6f4
tag decl() __noinline, as inlining it would defeat its purpose
...
(which is to not have interesting string literals appear in the
compiled binary)
2014-03-22 20:07:05 +00:00
dholland
9628f4097a
Revert part of previous -r1.21 and fix the errno-handling bug instead.
2014-03-22 19:05:30 +00:00
dholland
a94f7f4574
move extern decls to .h files
2014-03-22 18:58:57 +00:00
riastradh
6cb10275d0
Merge riastradh-drm2 to HEAD.
2014-03-18 18:20:35 +00:00
dholland
6b0a4364af
fix typo, from Henning Petersen in PR misc/48613
2014-02-22 17:21:19 +00:00
dholland
36e28b2b0d
remove duplicate
2013-12-11 14:59:47 +00:00
dholland
6a2afd2842
another minor fix
2013-12-11 14:56:10 +00:00
wiz
8883725705
Reinstate typo since kre claims it's by purpose.
...
Discussion in PR 48442.
2013-12-11 11:52:27 +00:00
wiz
5b306c5f1f
Error and typo fixes from OpenBSD and FreeBSD via Henning Petersen
...
in PR 48443.
While here, remove a duplication, fix another typo, and
don't claim that Mr. Sheperd was the first man in space.
2013-12-11 11:33:49 +00:00
wiz
f309df15dc
Error and typo fixes from OpenBSD and FreeBSD via Henning Petersen
...
in PR 48442.
2013-12-11 11:24:56 +00:00
dholland
963ea49030
WARNS=5
2013-12-07 02:24:12 +00:00
mbalmer
1cdd30d45d
hals_end(6) outputs the last words of the supercomputer HAL 9000 aboard
...
the spaceship in Stanley Kubrick's famous film "2001 - A Space Odissey".
The source code and output of this program were used to illustrate
an article in the book "Total Interaction". How this looks in print can
be at http://www.netbsd.org/~mbalmer/hals_end.jpg .
2013-11-12 17:46:20 +00:00
christos
193b880fad
fix unused variable warnings
2013-10-19 17:19:30 +00:00
uwe
66143a4f4f
Untabify the header definition to avoid misaligned comment on
...
str_delim in PostScript output.
2013-09-19 00:58:11 +00:00
uwe
9a878f03ee
Use .Fa instead of .Ar to refer to header fields.
2013-09-19 00:53:55 +00:00
uwe
ffa10b6acf
Now that we use "nbtool_config.h" we can use __dead again and drop
...
local attempts to define its equivalent.
Also drop the comment that warns this file is a tool; use of
"nbtool_config.h" makes it evident.
2013-09-19 00:34:00 +00:00
uwe
abab96f683
Don't define TRUE/FALSE, which may conflict with host headers.
...
TRUE is unused anyway. Replace all instances of FALSE with 0.
2013-09-19 00:18:52 +00:00
uwe
d8e459b066
#include "nbtool_config.h" to pull in getprogname() declaration.
2013-09-18 23:18:14 +00:00
joerg
880491ca90
GC descr and helpm.
2013-09-13 20:46:50 +00:00
dholland
1c2751a848
hook cgram to the build
2013-09-01 18:37:06 +00:00
dholland
a72799bb86
WARNS=5
2013-08-11 03:44:27 +00:00
dholland
09e313dddd
typo in comment
2013-08-11 03:34:48 +00:00
dholland
7229854715
this already passes WARNS=5
2013-08-11 03:27:02 +00:00
wiz
2077b57a6f
Add RCS Id.
2013-08-04 07:55:09 +00:00
dholland
0e7c031ea9
Add a curses gizmo for solving Sunday-paper-type cryptograms based on
...
substitution ciphers. It gets the cleartext from fortune. I wrote this
some years ago for my own amusement; a couple people have suggested
that I should import it.
Approved only by groo, so I'm going to wait a couple days to hook it
to the build in case anyone demands it be removed again...
2013-08-04 05:42:47 +00:00
wiz
9046849a85
Fix typo.
2013-07-24 06:57:09 +00:00
jnemeth
2471f41e04
add an Oscar Wilde quote
2013-07-24 04:41:49 +00:00
wiz
a5684d07dd
Use Mt for email addresses.
2013-07-20 21:39:55 +00:00
njoly
84e9c4d0dc
Fix sendmail section (8 -> 1) in xrefs.
2013-07-09 09:41:30 +00:00
dholland
76f02c63f8
Don't expect fairings.
2013-05-12 03:29:07 +00:00
pgoyette
17514df881
Fix same typo in the other file in which it occurs
2013-02-17 13:39:51 +00:00
pgoyette
244f3b036e
Fix minor typo
2013-02-17 13:36:01 +00:00
jmcneill
8d90f8a8ba
rename target paper.${PRINTER} to paper.ps -- PRINTER isnt defined anywhere!
2013-02-17 12:17:40 +00:00
jmcneill
9b136a6b53
Workaround a toolchain issue by renaming the 'setup' host tool to 'mkdata' to make UAC happy when building with Cygwin. As described here -- http://msdn.microsoft.com/en-us/library/windows/desktop/bb756960.aspx -- 32-bit executables whose filenames include the strings 'install', 'setup', 'update', 'patch', etc. by default will request admin privileges unless an application manifest is provided.
2013-02-16 17:00:21 +00:00
jmcneill
410c4edada
Workaround a toolchain issue by renaming the 'setup' host tool to 'mkdata' to make UAC happy when building with Cygwin. As described here -- http://msdn.microsoft.com/en-us/library/windows/desktop/bb756960.aspx -- 32-bit executables whose filenames include the strings 'install', 'setup', 'update', 'patch', etc. by default will request admin privileges unless an application manifest is provided.
2013-02-16 16:30:28 +00:00
jnemeth
be61d44017
Add some quotes by Henry Ford, found at:
...
http://www.goodreads.com/author/quotes/203714.Henry_Ford
2012-12-08 22:38:09 +00:00