mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 11:24:49 +00:00
copy in from cvs; cvs2svn fucked up big time
git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@9775 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: faketalk.c,v 1.4 1997/10/11 08:13:48 lukem Exp $ */
|
||||
/* $NetBSD: faketalk.c,v 1.7 2002/09/20 20:54:16 mycroft Exp $ */
|
||||
/*
|
||||
* Hunt
|
||||
* Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
|
||||
@@ -11,10 +11,11 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: faketalk.c,v 1.4 1997/10/11 08:13:48 lukem Exp $");
|
||||
__RCSID("$NetBSD: faketalk.c,v 1.7 2002/09/20 20:54:16 mycroft Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "bsd.h"
|
||||
#include "hunt.h"
|
||||
|
||||
#if defined(TALK_43) || defined(TALK_42)
|
||||
|
||||
@@ -26,7 +27,6 @@ __RCSID("$NetBSD: faketalk.c,v 1.4 1997/10/11 08:13:48 lukem Exp $");
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <unistd.h>
|
||||
# include "hunt.h"
|
||||
# include "talk_ctl.h"
|
||||
|
||||
# define TRUE 1
|
||||
@@ -43,17 +43,17 @@ __RCSID("$NetBSD: faketalk.c,v 1.4 1997/10/11 08:13:48 lukem Exp $");
|
||||
|
||||
extern char *my_machine_name;
|
||||
extern char *First_arg, *Last_arg;
|
||||
extern char **environ;
|
||||
|
||||
static void do_announce __P((char *));
|
||||
SIGNAL_TYPE exorcise __P((int));
|
||||
|
||||
/*
|
||||
* exorcise - disspell zombies
|
||||
*/
|
||||
|
||||
SIGNAL_TYPE
|
||||
exorcise(dummy)
|
||||
int dummy __attribute__((unused));
|
||||
int dummy __attribute__((__unused__));
|
||||
{
|
||||
(void) wait(0);
|
||||
}
|
||||
@@ -73,7 +73,6 @@ faketalk()
|
||||
struct sockaddr_in des; /* address of destination */
|
||||
char *a;
|
||||
const char *b;
|
||||
extern char **environ;
|
||||
|
||||
(void) signal(SIGCHLD, exorcise);
|
||||
|
||||
@@ -124,7 +123,7 @@ faketalk()
|
||||
# else
|
||||
warn("falktalk: socket");
|
||||
# endif
|
||||
_exit(-1);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
if (connect(service, (struct sockaddr *) &des, sizeof(des)) != 0) {
|
||||
@@ -133,7 +132,7 @@ faketalk()
|
||||
# else
|
||||
warn("faketalk: connect");
|
||||
# endif
|
||||
_exit(-1);
|
||||
_exit(1);
|
||||
}
|
||||
if ((f = fdopen(service, "r")) == NULL) {
|
||||
# ifdef LOG
|
||||
@@ -141,7 +140,7 @@ faketalk()
|
||||
# else
|
||||
warn("faketalk: fdopen");
|
||||
# endif
|
||||
_exit(-2);
|
||||
_exit(2);
|
||||
}
|
||||
|
||||
(void) fgets(buf, BUFSIZ, f);
|
||||
@@ -190,7 +189,6 @@ do_announce(s)
|
||||
char *s;
|
||||
{
|
||||
CTL_RESPONSE response;
|
||||
extern struct sockaddr_in ctl_addr;
|
||||
|
||||
get_remote_name(s); /* setup his_machine_addr, msg.r_name */
|
||||
|
||||
@@ -225,6 +223,7 @@ do_announce(s)
|
||||
p_error("send delete remote");
|
||||
}
|
||||
#else
|
||||
void
|
||||
faketalk()
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user