summaryrefslogtreecommitdiffstats
path: root/hunt/huntd/faketalk.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-10 16:32:15 +0000
committerlukem <lukem@NetBSD.org>1997-10-10 16:32:15 +0000
commit50f99331097302f77db413ba7ad7299d928163eb (patch)
tree376410fecfef0c2ac47f5b4f0643e6a84a373cdc /hunt/huntd/faketalk.c
parenta25e10613cc56cac1b954b119f757a272dee9bc8 (diff)
downloadbsdgames-darwin-50f99331097302f77db413ba7ad7299d928163eb.tar.gz
bsdgames-darwin-50f99331097302f77db413ba7ad7299d928163eb.zip
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()
Diffstat (limited to 'hunt/huntd/faketalk.c')
-rw-r--r--hunt/huntd/faketalk.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/hunt/huntd/faketalk.c b/hunt/huntd/faketalk.c
index 48f17990..e594b12e 100644
--- a/hunt/huntd/faketalk.c
+++ b/hunt/huntd/faketalk.c
@@ -1,3 +1,4 @@
+/* $NetBSD: faketalk.c,v 1.3 1997/10/10 16:33:31 lukem Exp $ */
/*
* Hunt
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
@@ -8,18 +9,25 @@
* specifies the terms and conditions for redistribution.
*/
+#include <sys/cdefs.h>
+#ifndef lint
+__RCSID("$NetBSD: faketalk.c,v 1.3 1997/10/10 16:33:31 lukem Exp $");
+#endif /* not lint */
+
#include "bsd.h"
#if defined(TALK_43) || defined(TALK_42)
+# include <sys/time.h>
+# include <sys/wait.h>
+# include <ctype.h>
+# include <netdb.h>
+# include <signal.h>
# include <stdio.h>
# include <string.h>
-# include <netdb.h>
+# include <unistd.h>
+# include "hunt.h"
# include "talk_ctl.h"
-# include <ctype.h>
-# include <signal.h>
-# include <sys/time.h>
-extern int errno;
# define TRUE 1
# define FALSE 0
@@ -36,12 +44,16 @@ extern int errno;
extern char *my_machine_name;
extern char *First_arg, *Last_arg;
+static void do_announce __P((char *));
+SIGNAL_TYPE exorcise __P((int));
+
/*
* exorcise - disspell zombies
*/
SIGNAL_TYPE
-exorcise()
+exorcise(dummy)
+ int dummy;
{
(void) wait(0);
}
@@ -51,6 +63,7 @@ exorcise()
* and fake a talk request to each address thus found.
*/
+void
faketalk()
{
struct servent *sp;
@@ -171,6 +184,7 @@ faketalk()
* These are used to delete the invitations.
*/
+static void
do_announce(s)
char *s;
{