summaryrefslogtreecommitdiffstats
path: root/battlestar/parse.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-10 11:39:08 +0000
committerlukem <lukem@NetBSD.org>1997-10-10 11:39:08 +0000
commitb4bb83fd34ab5386afa1b8af8e0956ff7953d0e0 (patch)
tree5cd3c69d8e6d56c42128666f35ceed56746ed1d2 /battlestar/parse.c
parent7016350ffcce57245468046bd3e36559e2684dca (diff)
downloadbsdgames-darwin-b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0.tar.gz
bsdgames-darwin-b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0.tar.zst
bsdgames-darwin-b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0.zip
WARNSify
Diffstat (limited to 'battlestar/parse.c')
-rw-r--r--battlestar/parse.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/battlestar/parse.c b/battlestar/parse.c
index d359c547..3f23f91e 100644
--- a/battlestar/parse.c
+++ b/battlestar/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.4 1997/01/07 11:56:49 tls Exp $ */
+/* $NetBSD: parse.c,v 1.5 1997/10/10 11:40:13 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -33,28 +33,31 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95";
#else
-static char rcsid[] = "$NetBSD: parse.c,v 1.4 1997/01/07 11:56:49 tls Exp $";
+__RCSID("$NetBSD: parse.c,v 1.5 1997/10/10 11:40:13 lukem Exp $");
#endif
#endif /* not lint */
#include "extern.h"
+void
wordinit()
{
- register struct wlist *w;
+ struct wlist *w;
for (w = wlist; w->string; w++)
install(w);
}
+int
hash(s)
- register char *s;
+ char *s;
{
- register hashval = 0;
+ int hashval = 0;
while (*s) {
hashval += *s++;
@@ -68,7 +71,7 @@ struct wlist *
lookup(s)
char *s;
{
- register struct wlist *wp;
+ struct wlist *wp;
for (wp = hashtab[hash(s)]; wp != NULL; wp = wp->next)
if (*s == *wp->string && strcmp(s, wp->string) == 0)
@@ -76,8 +79,9 @@ lookup(s)
return NULL;
}
+void
install(wp)
- register struct wlist *wp;
+ struct wlist *wp;
{
int hashval;
@@ -89,10 +93,11 @@ install(wp)
printf("Multiply defined %s.\n", wp->string);
}
+void
parse()
{
- register struct wlist *wp;
- register n;
+ struct wlist *wp;
+ int n;
wordnumber = 0; /* for cypher */
for (n = 0; n <= wordcount; n++) {