-/* $NetBSD: parse.c,v 1.5 1997/10/10 11:40:13 lukem Exp $ */
+/* $NetBSD: parse.c,v 1.7 1999/02/10 01:36:50 hubertf Exp $ */
/*
* Copyright (c) 1983, 1993
#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.7 1999/02/10 01:36:50 hubertf Exp $");
#endif
-#endif /* not lint */
+#endif /* not lint */
#include "extern.h"
int
hash(s)
- char *s;
+ const char *s;
{
- int hashval = 0;
+ int hashval = 0;
while (*s) {
hashval += *s++;
struct wlist *
lookup(s)
- char *s;
+ const char *s;
{
struct wlist *wp;
install(wp)
struct wlist *wp;
{
- int hashval;
+ int hashval;
if (lookup(wp->string) == NULL) {
hashval = hash(wp->string);
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;
}
}
}