summaryrefslogtreecommitdiffstats
path: root/hunt/huntd
diff options
context:
space:
mode:
Diffstat (limited to 'hunt/huntd')
-rw-r--r--hunt/huntd/driver.c22
-rw-r--r--hunt/huntd/faketalk.c12
-rw-r--r--hunt/huntd/shots.c8
-rw-r--r--hunt/huntd/talk_ctl.h2
4 files changed, 22 insertions, 22 deletions
diff --git a/hunt/huntd/driver.c b/hunt/huntd/driver.c
index 1f3b47a3..2f8bdff2 100644
--- a/hunt/huntd/driver.c
+++ b/hunt/huntd/driver.c
@@ -1,4 +1,4 @@
-/* $NetBSD: driver.c,v 1.2 1997/10/10 16:33:08 lukem Exp $ */
+/* $NetBSD: driver.c,v 1.3 1997/10/11 08:13:47 lukem Exp $ */
/*
* Hunt
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: driver.c,v 1.2 1997/10/10 16:33:08 lukem Exp $");
+__RCSID("$NetBSD: driver.c,v 1.3 1997/10/11 08:13:47 lukem Exp $");
#endif /* not lint */
# include <sys/ioctl.h>
@@ -117,7 +117,7 @@ again:
# ifdef LOG
syslog(LOG_WARNING, "select: %m");
# else
- perror("select");
+ warn("select");
# endif
errno = 0;
}
@@ -295,7 +295,7 @@ init()
# ifdef LOG
syslog(LOG_ERR, "bind: %m");
# else
- perror("bind");
+ warn("bind");
# endif
cleanup(1);
}
@@ -308,7 +308,7 @@ init()
# ifdef LOG
syslog(LOG_ERR, "getsockname: %m");
# else
- perror("getsockname");
+ warn("getsockname");
# endif
exit(1);
}
@@ -334,7 +334,7 @@ init()
# ifdef LOG
syslog(LOG_WARNING, "setsockopt loopback %m");
# else
- perror("setsockopt loopback");
+ warn("setsockopt loopback");
# endif
# endif
if (bind(Socket, (struct sockaddr *) &Daemon, DAEMON_SIZE) < 0) {
@@ -344,7 +344,7 @@ init()
# ifdef LOG
syslog(LOG_ERR, "bind: %m");
# else
- perror("bind");
+ warn("bind");
# endif
cleanup(1);
}
@@ -357,7 +357,7 @@ init()
# ifdef LOG
syslog(LOG_ERR, "getsockname: %m");
# else
- perror("getsockname");
+ warn("getsockname");
# endif
exit(1);
}
@@ -391,7 +391,7 @@ init()
# ifdef LOG
syslog(LOG_ERR, "bind: %m");
# else
- perror("bind");
+ warn("bind");
# endif
exit(1);
}
@@ -910,7 +910,7 @@ send_stats()
# ifdef LOG
syslog(LOG_ERR, "accept: %m");
# else
- perror("accept");
+ warn("accept");
# endif
return;
}
@@ -919,7 +919,7 @@ send_stats()
# ifdef LOG
syslog(LOG_ERR, "fdopen: %m");
# else
- perror("fdopen");
+ warn("fdopen");
# endif
(void) close(s);
return;
diff --git a/hunt/huntd/faketalk.c b/hunt/huntd/faketalk.c
index e594b12e..2044ce1d 100644
--- a/hunt/huntd/faketalk.c
+++ b/hunt/huntd/faketalk.c
@@ -1,4 +1,4 @@
-/* $NetBSD: faketalk.c,v 1.3 1997/10/10 16:33:31 lukem Exp $ */
+/* $NetBSD: faketalk.c,v 1.4 1997/10/11 08:13:48 lukem Exp $ */
/*
* Hunt
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
@@ -11,7 +11,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: faketalk.c,v 1.3 1997/10/10 16:33:31 lukem Exp $");
+__RCSID("$NetBSD: faketalk.c,v 1.4 1997/10/11 08:13:48 lukem Exp $");
#endif /* not lint */
#include "bsd.h"
@@ -107,7 +107,7 @@ faketalk()
# ifdef LOG
syslog(LOG_ERR, "faketalk: smtp protocol not supported\n");
# else
- fprintf(stderr, "faketalk: stmp protocol not supported\n");
+ warn("faketalk: stmp protocol not supported");
# endif
_exit(1);
}
@@ -121,7 +121,7 @@ faketalk()
# ifdef LOG
syslog(LOG_ERR, "falktalk: socket");
# else
- perror("falktalk: socket");
+ warn("falktalk: socket");
# endif
_exit(-1);
}
@@ -130,7 +130,7 @@ faketalk()
# ifdef LOG
syslog(LOG_ERR, "faketalk: connect");
# else
- perror("faketalk: connect");
+ warn("faketalk: connect");
# endif
_exit(-1);
}
@@ -138,7 +138,7 @@ faketalk()
# ifdef LOG
syslog(LOG_ERR, "fdopen failed\n");
# else
- fprintf(stderr, "fdopen failed\n");
+ warn("faketalk: fdopen");
# endif
_exit(-2);
}
diff --git a/hunt/huntd/shots.c b/hunt/huntd/shots.c
index d0dfcf90..b4080dbd 100644
--- a/hunt/huntd/shots.c
+++ b/hunt/huntd/shots.c
@@ -1,4 +1,4 @@
-/* $NetBSD: shots.c,v 1.2 1997/10/10 16:33:54 lukem Exp $ */
+/* $NetBSD: shots.c,v 1.3 1997/10/11 08:13:50 lukem Exp $ */
/*
* Hunt
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
@@ -7,9 +7,10 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: shots.c,v 1.2 1997/10/10 16:33:54 lukem Exp $");
+__RCSID("$NetBSD: shots.c,v 1.3 1997/10/11 08:13:50 lukem Exp $");
#endif /* not lint */
+# include <err.h>
# include <signal.h>
# include <stdlib.h>
# include "hunt.h"
@@ -1018,8 +1019,7 @@ play_at(y, x)
for (pp = Player; pp < End_player; pp++)
if (pp->p_x == x && pp->p_y == y)
return pp;
- fprintf(stderr, "driver: couldn't find player at (%d,%d)\n", x, y);
- abort();
+ errx(1, "driver: couldn't find player at (%d,%d)", x, y);
/* NOTREACHED */
}
diff --git a/hunt/huntd/talk_ctl.h b/hunt/huntd/talk_ctl.h
index 59071ec3..f8081b83 100644
--- a/hunt/huntd/talk_ctl.h
+++ b/hunt/huntd/talk_ctl.h
@@ -74,7 +74,7 @@ extern CTL_MSG msg;
#ifdef LOG
#define p_error(str) syslog(LOG_WARNING, "faketalk %s: %m", str)
#else
-#define p_error(str) perror(str)
+#define p_error(str) warn(str)
#endif
void ctl_transact __P((struct in_addr, CTL_MSG, int, CTL_RESPONSE *));