From 4fe92d1fcdbb2fc53d5d338814045f676c06cc4a Mon Sep 17 00:00:00 2001 From: jmc Date: Fri, 1 Jul 2005 06:04:46 +0000 Subject: KNF and WARNS=3 --- battlestar/parse.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'battlestar/parse.c') 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]; -- cgit v1.2.3-56-ge451