$NetBSD: patch-bc,v 1.1.1.1 2001/04/27 15:27:31 agc Exp $

--- tok.c.orig	Fri Jun 19 13:55:30 1992
+++ tok.c	Sat Jan 13 21:56:42 2001
@@ -1,4 +1,7 @@
 /* tok.c */
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
 #include "header.h"
 #include "player.h"
 #include "monst.h"
@@ -12,12 +15,12 @@
 int yrepcount=0;
 
 static char usermonster[MAXUM][MAXMNAME];
-static char usermpoint=0;			/* the user monster pointer */
+static int usermpoint=0;			/* the user monster pointer */
 
 /*
  *	lexical analyzer for Ularn
  */
-yylex ()
+int yylex (void)
 {
 	int cc, ic;
 	char *sh, *getenv();
@@ -61,14 +64,14 @@
 		/* shell escape */
 		if (cc == '!')	{
 			int pgrp;
-#ifdef USG
+#if defined(USG) || defined(__NetBSD__)
 			pgrp = getpgrp();
 #else
 			pgrp = getpgrp(getpid());
 #endif /* USG */
 			
 			resetscroll();
-			clear();
+			ularn_clear();
 			cl_dn(0,0);
 			lflush();
 			if ((ic=fork())==0) {
@@ -116,7 +119,7 @@
 /*
  *	flushall()	Function to flush all type-ahead in the input buffer
  */
-flushall()
+void flushall(void)
 {
 #ifdef TCFLSH
         ioctl(0, TCFLSH, 0);		/* standard ioctl to flush buffer */
@@ -143,7 +146,7 @@
 	function to set the desired hardness
 	enter with hard= -1 for default hardness, else any desired hardness
 */
-sethard (hard)
+void sethard (hard)
 int hard;
 {
 	int j,k,i;
@@ -157,7 +160,8 @@
 			c[HARDGAME] = hard;
 	}
 
-	if (k=c[HARDGAME])
+	k=c[HARDGAME];
+	if (k)
 		for (j=0; j<=MAXMONST+8; j++) {
 			i = ((6+k)*monster[j].hitpoints+1)/6;
 			monster[j].hitpoints = (i > 32767) ? 32767 : i;
@@ -175,7 +179,7 @@
 /*
  *	function to read and process the larn options file
  */
-readopts ()
+void readopts (void)
 {
 	char s1buf[80], *str, s2buf[80];
 	char *getword();
