diff options
author | dholland <dholland@NetBSD.org> | 2009-07-04 07:51:34 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-07-04 07:51:34 +0000 |
commit | 1f35120ec096783ec21160ac00f22c0fb221a918 (patch) | |
tree | bd2d8e2eb38813444936bb8840bfa2cd94dc7bb2 /hunt/hunt | |
parent | 2e8daf459306ea1d8374438d469f60aa0149aa32 (diff) | |
download | bsdgames-darwin-1f35120ec096783ec21160ac00f22c0fb221a918.tar.gz bsdgames-darwin-1f35120ec096783ec21160ac00f22c0fb221a918.tar.zst bsdgames-darwin-1f35120ec096783ec21160ac00f22c0fb221a918.zip |
Remove config options for 4.2BSD and 4.3BSD, and associated code. Highly
obsolete, and I doubt most of it still worked anyway.
Diffstat (limited to 'hunt/hunt')
-rw-r--r-- | hunt/hunt/hunt.c | 51 | ||||
-rw-r--r-- | hunt/hunt/playit.c | 32 |
2 files changed, 6 insertions, 77 deletions
diff --git a/hunt/hunt/hunt.c b/hunt/hunt/hunt.c index 8a6788a5..a31bdf47 100644 --- a/hunt/hunt/hunt.c +++ b/hunt/hunt/hunt.c @@ -1,4 +1,4 @@ -/* $NetBSD: hunt.c,v 1.34 2009/07/04 07:10:23 dholland Exp $ */ +/* $NetBSD: hunt.c,v 1.35 2009/07/04 07:51:34 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hunt.c,v 1.34 2009/07/04 07:10:23 dholland Exp $"); +__RCSID("$NetBSD: hunt.c,v 1.35 2009/07/04 07:51:34 dholland Exp $"); #endif /* not lint */ #include <sys/param.h> @@ -51,13 +51,6 @@ __RCSID("$NetBSD: hunt.c,v 1.34 2009/07/04 07:10:23 dholland Exp $"); #include "hunt.h" -/* - * Some old versions of curses don't have these defined - */ -#if !defined(cbreak) && (!defined(BSD_RELEASE) || BSD_RELEASE < 44) -#define cbreak() crmode() -#endif - #define clear_eol() clrtoeol() #define put_ch addch #define put_str addstr @@ -338,7 +331,6 @@ main(int ac, char **av) } #ifdef INTERNET -#ifdef BROADCAST int broadcast_vec(int s /*socket*/, struct sockaddr **vector) { @@ -368,7 +360,6 @@ broadcast_vec(int s /*socket*/, struct sockaddr **vector) freeifaddrs(ifp); return vec_cnt; } -#endif SOCKET * list_drivers(void) @@ -383,12 +374,8 @@ list_drivers(void) static int initial = TRUE; static struct in_addr local_address; struct hostent *hp; -#ifdef BROADCAST static int brdc; static SOCKET *brdv; -#else - u_long local_net; -#endif int i; unsigned j; static SOCKET *listv; @@ -397,9 +384,6 @@ list_drivers(void) struct pollfd set[1]; if (initial) { /* do one time initialization */ -#ifndef BROADCAST - sethostent(1); /* don't bother to close host file */ -#endif if (gethostname(local_name, sizeof local_name) < 0) { leavex(1, "Sorry, I have no name."); /* NOTREACHED */ @@ -442,7 +426,6 @@ list_drivers(void) (struct sockaddr *) &test, DAEMON_SIZE); } -#ifdef BROADCAST if (initial) brdc = broadcast_vec(test_socket, (void *) &brdv); @@ -472,19 +455,6 @@ list_drivers(void) leave(1, "sendto"); /* NOTREACHED */ } -#else /* !BROADCAST */ - /* loop thru all hosts on local net and send msg to them. */ - msg = htons(C_TESTMSG()); - local_net = inet_netof(local_address); - sethostent(0); /* rewind host file */ - while (hp = gethostent()) { - if (local_net == inet_netof(* ((struct in_addr *) hp->h_addr))){ - test.sin_addr = * ((struct in_addr *) hp->h_addr); - (void) sendto(test_socket, &msg, sizeof msg, 0, - (struct sockaddr *) &test, DAEMON_SIZE); - } - } -#endif get_response: namelen = DAEMON_SIZE; @@ -811,23 +781,6 @@ leavex(int eval, const char *mesg) errx(eval, mesg ? mesg : ""); } -#if defined(BSD_RELEASE) && BSD_RELEASE < 43 -char * -strpbrk(char *s, char *brk) -{ - char *p; - c; - - while (c = *s) { - for (p = brk; *p; p++) - if (c == *p) - return (s); - s++; - } - return (0); -} -#endif - long env_init(long enter_status) { diff --git a/hunt/hunt/playit.c b/hunt/hunt/playit.c index da35d564..f7415d93 100644 --- a/hunt/hunt/playit.c +++ b/hunt/hunt/playit.c @@ -1,4 +1,4 @@ -/* $NetBSD: playit.c,v 1.13 2009/07/04 07:10:23 dholland Exp $ */ +/* $NetBSD: playit.c,v 1.14 2009/07/04 07:51:34 dholland Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: playit.c,v 1.13 2009/07/04 07:10:23 dholland Exp $"); +__RCSID("$NetBSD: playit.c,v 1.14 2009/07/04 07:51:34 dholland Exp $"); #endif /* not lint */ #include <sys/file.h> @@ -42,10 +42,8 @@ __RCSID("$NetBSD: playit.c,v 1.13 2009/07/04 07:10:23 dholland Exp $"); #include <curses.h> #include <ctype.h> #include <signal.h> -#if defined(HPUX) || (defined(BSD_RELEASE) && BSD_RELEASE >= 44) #include <termios.h> #include <unistd.h> -#endif #include "hunt.h" #ifndef FREAD @@ -77,10 +75,6 @@ static unsigned char ibuf[256], *iptr = ibuf; #define GETCHR() (--icnt < 0 ? getchr() : *iptr++) -#if !defined(BSD_RELEASE) || BSD_RELEASE < 44 -extern int _putchar(); -#endif - static unsigned char getchr(void); static void send_stuff(void); @@ -160,15 +154,7 @@ playit(void) case READY: refresh(); if (nchar_send < 0) -#if defined(HPUX) || (defined(BSD_RELEASE) && BSD_RELEASE >= 44) tcflush(STDIN, TCIFLUSH); -#else -#ifndef TCFLSH - (void) ioctl(STDIN, TIOCFLUSH, &in); -#else - (void) ioctl(STDIN, TCFLSH, 0); -#endif -#endif nchar_send = MAX_SEND; #ifndef OTTO (void) GETCHR(); @@ -348,12 +334,7 @@ get_message: refresh(); if ((ch = getchar()) == '\n' || ch == '\r') break; -#if BSD_RELEASE >= 44 - if (ch == erasechar()) -#else - if (ch == _tty.sg_erase) -#endif - { + if (ch == erasechar()) { if (cp > buf) { int y, x; getyx(stdscr, y, x); @@ -363,12 +344,7 @@ get_message: } continue; } -#if BSD_RELEASE >= 44 - else if (ch == killchar()) -#else - else if (ch == _tty.sg_kill) -#endif - { + else if (ch == killchar()) { int y, x; getyx(stdscr, y, x); move(y, x - (cp - buf)); |