Commit Graph

151 Commits

Author SHA1 Message Date
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
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
christos
193b880fad fix unused variable warnings 2013-10-19 17:19:30 +00:00
njoly
84e9c4d0dc Fix sendmail section (8 -> 1) in xrefs. 2013-07-09 09:41:30 +00:00
plunky
acae68523e reinstate NULL cast by request, where the NULL was being passed as a vararg 2011-09-01 07:18:50 +00:00
plunky
9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
joerg
1a5e0fc9be #if 0 some unused code. 2011-05-23 22:58:44 +00:00
joerg
7c549d998f Don't use variables as format string. 2011-05-23 22:56:11 +00:00
dholland
7ac7ba70d8 avoid unnecessary cast (hi wiz) 2011-01-05 15:52:20 +00:00
wiz
f274b04232 Fix realloc error. Found by cppcheck. 2011-01-05 15:40:55 +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
roy
98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
dholland
9ac5061b87 u_int32_t -> uint32_t 2009-08-27 00:36:32 +00:00
dholland
75b3905d60 sprinkle static and prune some dead code 2009-08-12 07:42:11 +00:00
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
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
joerg
25e7748736 Fix preamble 2009-03-11 13:01:49 +00:00
joerg
e8103a8e17 Fix markup 2009-03-11 13:00:37 +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
dholland
733dc966d8 clean for WARNS=4 2008-01-28 03:23:29 +00:00
perry
8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
elad
1232ea27c4 PR/18906: roskens at elfin dot net: misc. select() to poll() updates.
Adapted to -current by myself, thanks for the patch!
2006-10-07 17:27:57 +00:00
mrg
0c37c63edc change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:18:05 +00:00
christos
abe5f75745 Coverity CID 1443: Prevent static overrun. 2006-03-19 00:00:19 +00:00
abs
e0d5463807 add more "ifdef notdef" around unused sections - addresses Coverity CID 564 2006-03-17 23:36:38 +00:00
abs
b4f3ebd201 Add a missing bp->b_score not null check - addresses Coverity CID 1003 2006-03-17 23:34:37 +00:00
wiz
0c305c1a7e Drop trailing whitespace. 2005-09-15 02:10:37 +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
wiz
8ebb36ee3d Sync with v20030416 of Makefile. 2003-06-11 12:10:21 +00:00
wiz
45ddd67018 Make build. 2003-06-11 12:04:06 +00:00
wiz
1196717577 Merge with v20030416. 2003-06-11 12:00:21 +00:00
martin
6c0c40a580 Make this work on 64 bit big endian platforms. 2003-06-11 09:51:56 +00:00
wiz
d43e332f1e setup -> set up. 2003-05-14 12:11:03 +00:00
christos
66ddadf04f don't print error messages using warn, because we clear the screen immediately
afterwards and they vanish.
2003-05-03 09:10:23 +00:00
drochner
ccc6315386 Rewrite broken broadcast interface detection code using getifaddrs(3).
"hunt -q" works now.
2003-04-01 12:01:34 +00:00
jdc
e5c039ad54 Make this work on sparc64 (don't use long and assume sizeof(long) = 4).
Tested against a LE32 system (arm).
2003-02-26 07:14:44 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz
b517ab4402 .Nm still needs "". 2003-02-23 23:40:47 +00:00
thorpej
3c2d976305 Avoid strict alias warning. 2002-12-06 01:50:56 +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
mycroft
7d5f560aeb Minor rearrangement. 2002-09-20 21:00:01 +00:00
mycroft
956ffb1e5c Remove an unused declaration. 2002-09-20 20:58:12 +00:00
mycroft
67ba9a5805 select() -> poll()
Also, turn off talk announcements; it's a wretched hack.
2002-09-20 20:54:15 +00:00
mycroft
48aa4a8c4d If we're searching for a huntd, probe local_address along with broadcast
addresses.
2002-09-20 17:27:57 +00:00
mycroft
e92308f210 select() -> poll() 2002-09-20 15:47:19 +00:00
wiz
7fd8f3df3f __STDC__ is always defined on NetBSD. 2002-05-26 00:12:11 +00:00
ross
dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
wiz
0a600be867 receive, not recieve 2001-06-12 15:17:10 +00:00
wiz
4982acfa1c mdoc'ify. 2001-04-04 11:41:01 +00:00
christos
d3c5cea8f0 remove redundant decls 2001-02-05 00:42:14 +00:00
christos
7a04a9fd9e eliminate nested externs 2001-02-05 00:40:45 +00:00
lukem
f8141417ed - openlog "huntd" instead of "HUNT"
- consistently log non-critical errors at LOG_WARNING not LOG_ERR
- consistently use positive numbers for exit() and _exit()
- one warning was using printf() instead of syslog()
2001-01-09 23:49:54 +00:00
matt
3233065035 More include additions for exit, abs, strcmp, etc. 2000-07-03 03:57:39 +00:00
simonb
48a5c3efa9 Don't declare 'extern opt*' getopt variables. 2000-04-14 05:58:01 +00:00
simonb
924021df91 Curses works - define USE_CURSES for BSD44 and don't try to do our own
thing (using curses internal data structures anyway!).
2000-04-13 06:07:06 +00:00
kleink
76073cb333 Include <sys/param.h> for MAXHOSTNAMELEN. 2000-03-02 18:22:31 +00:00
mycroft
f5d7100e26 Nuke `extern int errno;' in code we compile with -Wstrict-prototypes. We get
the correct definition from errno.h.
2000-01-21 17:08:33 +00:00
simonb
4e92840504 Don't frob the interals of a WINDOW*, use the mvinch() macro. 1999-04-18 03:29:01 +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
c31c912667 remove unneeded typedef for TTYB, as per PR#5867 1998-09-11 13:46:30 +00:00
veego
04afeca685 Add braces to make the new egcs happy. 1998-08-30 09:19:36 +00:00
mrg
32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
mrg
8f2fc17f92 change static to static int 1998-03-29 04:50:29 +00:00
jtc
2065ddb3da Simply include -lcurses instead of -lcurses -ltermcap 1998-02-18 22:37:30 +00:00
perry
3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +00:00
mrg
1eeb8e6b5f move hunt under dm(6) 1997-11-19 07:07:46 +00:00
ragge
85a3b2eb8f Must have the correct library link order to be able to link
the binaries static.
1997-11-05 12:12:32 +00:00
lukem
009fbbc126 use CPPFLAGS instead of CFLAGS 1997-10-22 05:05:21 +00:00
lukem
3b2e6e2466 FD_ZERO select mask before FD_SET-ing it 1997-10-20 00:37:14 +00:00
mrg
6d4ad6d5a7 drop core in /var/tmp (from linux). 1997-10-15 12:02:08 +00:00
lukem
ff943cc8ca use err/warn instead of perror 1997-10-11 08:13:40 +00:00
lukem
544a5e3331 Yet Another Monster Commit:
- WARNSify
- getopt returns -1 not EOF
- select() uses an fd_set, not int/long; modify code to use FD_* et al
  instead of direct bitwise operations
- in otto.c::look (renamed to ottolook() to prevent name clash), the
  case WEST section had a 'goto cont_east', instead of 'goto cont_west'.
  (picked up by WARNS=1, because cont_west was an unused label because
  of this typo). probably meant that otto got lost in the maze :-/
- deprecate register, convert bcmp() -> memcmp()
1997-10-10 16:32:15 +00:00
mrg
7da61b6eaa fix compiler warnings on the alpha. 1997-10-04 09:28:32 +00:00
mrg
b1175274c8 note that huntd lives in /usr/games. 1997-10-04 09:16:27 +00:00
mrg
251a23a671 build hunt. 1997-10-04 09:11:14 +00:00