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:
joey
2003-12-19 19:12:08 +00:00
parent 351c8ca204
commit 51eabc017b
310 changed files with 7852 additions and 5005 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: pl_1.c,v 1.5 1997/10/13 21:04:02 christos Exp $ */
/* $NetBSD: pl_1.c,v 1.16 2001/02/05 01:10:10 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,14 +38,18 @@
#if 0
static char sccsid[] = "@(#)pl_1.c 8.1 (Berkeley) 5/31/93";
#else
__RCSID("$NetBSD: pl_1.c,v 1.5 1997/10/13 21:04:02 christos Exp $");
__RCSID("$NetBSD: pl_1.c,v 1.16 2001/02/05 01:10:10 christos Exp $");
#endif
#endif /* not lint */
#include "player.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "extern.h"
#include "player.h"
/*
* If we get here before a ship is chosen, then ms == 0 and
@@ -56,14 +60,13 @@ __RCSID("$NetBSD: pl_1.c,v 1.5 1997/10/13 21:04:02 christos Exp $");
* because of a Sync() failure.
*/
void
leave(conditions)
int conditions;
leave(int conditions)
{
(void) signal(SIGHUP, SIG_IGN);
(void) signal(SIGINT, SIG_IGN);
(void) signal(SIGQUIT, SIG_IGN);
(void) signal(SIGALRM, SIG_IGN);
(void) signal(SIGCHLD, SIG_IGN);
signal(SIGHUP, SIG_IGN);
signal(SIGINT, SIG_IGN);
signal(SIGQUIT, SIG_IGN);
signal(SIGALRM, SIG_IGN);
signal(SIGCHLD, SIG_IGN);
if (done_curses) {
Msg("It looks like you've had it!");
@@ -109,8 +112,8 @@ int conditions;
if (conditions != LEAVE_SYNC) {
makemsg(ms, "Captain %s relinquishing.",
mf->captain);
Write(W_END, ms, 0, 0, 0, 0, 0);
(void) Sync();
Write(W_END, ms, 0, 0, 0, 0);
Sync();
}
}
sync_close(!hasdriver);
@@ -121,25 +124,23 @@ int conditions;
/*ARGSUSED*/
void
choke(n)
int n __attribute__((unused));
choke(int n __attribute__((__unused__)))
{
leave(LEAVE_QUIT);
}
/*ARGSUSED*/
void
child(n)
int n __attribute__((unused));
child(int n __attribute__((__unused__)))
{
union wait status;
int pid;
(void) signal(SIGCHLD, SIG_IGN);
signal(SIGCHLD, SIG_IGN);
do {
pid = wait3((int *)&status, WNOHANG, (struct rusage *)0);
if (pid < 0 || (pid > 0 && !WIFSTOPPED(status)))
hasdriver = 0;
} while (pid > 0);
(void) signal(SIGCHLD, child);
signal(SIGCHLD, child);
}