-/* $NetBSD: driver.c,v 1.20 2009/08/12 07:42:11 dholland Exp $ */
+/* $NetBSD: driver.c,v 1.22 2013/10/19 17:23:08 christos Exp $ */
/*
* Copyright (c) 1983-2003, Regents of the University of California.
* All rights reserved.
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: driver.c,v 1.20 2009/08/12 07:42:11 dholland Exp $");
+__RCSID("$NetBSD: driver.c,v 1.22 2013/10/19 17:23:08 christos Exp $");
#endif /* not lint */
#include <sys/ioctl.h>
PLAYER *pp;
#ifdef INTERNET
u_short msg;
- short port_num, reply;
+ short reply;
socklen_t namelen;
SOCKET test;
#endif
#ifdef INTERNET
if (fdset[2].revents & POLLIN) {
namelen = DAEMON_SIZE;
- port_num = htons(sock_port);
(void) recvfrom(Test_socket, &msg, sizeof msg,
0, (struct sockaddr *) &test, &namelen);
switch (ntohs(msg)) {
fdset[2].fd = -1;
#endif
- Seed = getpid() + time((time_t *) NULL);
+ Seed = getpid() + time(NULL);
makemaze();
#ifdef BOOTS
makeboots();
BULLET *bp;
PLAYER *np;
int x, y;
- int savefd;
if (was_player) {
if (pp->p_undershot)
outstr(pp, pp->p_death, len);
cgoto(pp, HEIGHT, 0);
- savefd = pp->p_fd;
-
#ifdef MONITOR
if (was_player) {
#endif
}
if (x > 0) {
(void) add_shot(len, pp->p_y, pp->p_x, pp->p_face, x,
- (PLAYER *) NULL, TRUE, SPACE);
+ NULL, TRUE, SPACE);
(void) snprintf(Buf, sizeof(Buf), "%s detonated.",
pp->p_ident->i_name);
for (np = Player; np < End_player; np++)
y = rand_num(HEIGHT / 2) + HEIGHT / 4;
} while (Maze[y][x] != SPACE);
(void) add_shot(LAVA, y, x, LEFTS, volcano,
- (PLAYER *) NULL, TRUE, SPACE);
+ NULL, TRUE, SPACE);
for (np = Player; np < End_player; np++)
message(np, "Volcano eruption.");
volcano = 0;
add_shot(DSHOT, y, x, rand_dir(),
shot_req[MINDSHOT +
rand_num(MAXBOMB - MINDSHOT)],
- (PLAYER *) NULL, FALSE, SPACE);
+ NULL, FALSE, SPACE);
}
#endif