summaryrefslogtreecommitdiffstats
path: root/battlestar/parse.c
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-11 02:06:55 +0000
committerlukem <lukem@NetBSD.org>1997-10-11 02:06:55 +0000
commit61a235f9c8a332df14e8fe40b7b1fcaa98ecc548 (patch)
tree50f20c42070d381297a96acd027002bc10e84095 /battlestar/parse.c
parent098ef9272dbfc3deff7afcd768ea90836e72a163 (diff)
downloadbsdgames-darwin-61a235f9c8a332df14e8fe40b7b1fcaa98ecc548.tar.gz
bsdgames-darwin-61a235f9c8a332df14e8fe40b7b1fcaa98ecc548.tar.zst
bsdgames-darwin-61a235f9c8a332df14e8fe40b7b1fcaa98ecc548.zip
KNFify (with indent)
Diffstat (limited to 'battlestar/parse.c')
-rw-r--r--battlestar/parse.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/battlestar/parse.c b/battlestar/parse.c
index 3f23f91e..ccf5d01b 100644
--- a/battlestar/parse.c
+++ b/battlestar/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.5 1997/10/10 11:40:13 lukem Exp $ */
+/* $NetBSD: parse.c,v 1.6 1997/10/11 02:07:33 lukem Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,9 +38,9 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: parse.c,v 1.5 1997/10/10 11:40:13 lukem Exp $");
+__RCSID("$NetBSD: parse.c,v 1.6 1997/10/11 02:07:33 lukem Exp $");
#endif
-#endif /* not lint */
+#endif /* not lint */
#include "extern.h"
@@ -55,9 +55,9 @@ wordinit()
int
hash(s)
- char *s;
+ char *s;
{
- int hashval = 0;
+ int hashval = 0;
while (*s) {
hashval += *s++;
@@ -69,7 +69,7 @@ hash(s)
struct wlist *
lookup(s)
- char *s;
+ char *s;
{
struct wlist *wp;
@@ -83,7 +83,7 @@ void
install(wp)
struct wlist *wp;
{
- int hashval;
+ int hashval;
if (lookup(wp->string) == NULL) {
hashval = hash(wp->string);
@@ -97,16 +97,16 @@ void
parse()
{
struct wlist *wp;
- int n;
+ int n;
- wordnumber = 0; /* for cypher */
+ wordnumber = 0; /* for cypher */
for (n = 0; n <= wordcount; n++) {
if ((wp = lookup(words[n])) == NULL) {
wordvalue[n] = -1;
wordtype[n] = -1;
} else {
- wordvalue[n] = wp -> value;
- wordtype[n] = wp -> article;
+ wordvalue[n] = wp->value;
+ wordtype[n] = wp->article;
}
}
}