summaryrefslogtreecommitdiffstats
path: root/battlestar/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'battlestar/parse.c')
-rw-r--r--battlestar/parse.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/battlestar/parse.c b/battlestar/parse.c
index c1505a3a..4b4b3bc6 100644
--- a/battlestar/parse.c
+++ b/battlestar/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.14 2004/01/27 20:30:29 jsm Exp $ */
+/* $NetBSD: parse.c,v 1.15 2005/07/01 06:04:54 jmc Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)parse.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: parse.c,v 1.14 2004/01/27 20:30:29 jsm Exp $");
+__RCSID("$NetBSD: parse.c,v 1.15 2005/07/01 06:04:54 jmc Exp $");
#endif
#endif /* not lint */
@@ -51,7 +51,7 @@ static struct wlist *lookup(const char *);
static struct wlist *hashtab[HASHSIZE];
void
-wordinit()
+wordinit(void)
{
struct wlist *w;
@@ -60,8 +60,7 @@ wordinit()
}
static int
-hash(s)
- const char *s;
+hash(const char *s)
{
int hashval = 0;
@@ -74,8 +73,7 @@ hash(s)
}
static struct wlist *
-lookup(s)
- const char *s;
+lookup(const char *s)
{
struct wlist *wp;
@@ -86,8 +84,7 @@ lookup(s)
}
static void
-install(wp)
- struct wlist *wp;
+install(struct wlist *wp)
{
int hashval;
@@ -100,7 +97,7 @@ install(wp)
}
void
-parse()
+parse(void)
{
struct wlist *wp;
int n;
@@ -157,8 +154,10 @@ parse()
while (flag) {
flag = 0;
for (n = 1; n < wordcount; n++)
- if ((wordtype[n - 1] == NOUNS || wordtype[n - 1] == OBJECT) &&
- wordvalue[n] == AND && wordvalue[n + 1] == EVERYTHING) {
+ if ((wordtype[n - 1] == NOUNS ||
+ wordtype[n - 1] == OBJECT) &&
+ wordvalue[n] == AND &&
+ wordvalue[n + 1] == EVERYTHING) {
char tmpword[WORDLEN];
wordvalue[n + 1] = wordvalue[n - 1];
wordvalue[n - 1] = EVERYTHING;
@@ -172,7 +171,8 @@ parse()
/* And trim EVERYTHING AND EVERYTHING. */
for (n = 1; n < wordcount; n++)
if (wordvalue[n - 1] == EVERYTHING &&
- wordvalue[n] == AND && wordvalue[n + 1] == EVERYTHING) {
+ wordvalue[n] == AND &&
+ wordvalue[n + 1] == EVERYTHING) {
int i;
for (i = n + 1; i < wordcount; i++) {
wordtype[i - 1] = wordtype[i + 1];