Lines Matching defs:word
128 /* look up or store a word */
129 /* -2 for store, -1 for user word, >=0 for canned lookup */
132 vocab(const char *word, int type, int value)
140 for (hash = 0, s = word, i = 0; i < 5 && *s; i++) /* some kind of hash*/
141 hash += *s++; /* add all chars in the word */
154 h->atab = malloc(length(word));
157 for (s = word, t = h->atab; *s;)
162 /* word, length(word), adr); */
164 case -1: /* looking up user word */
167 for (s = word, t = h->atab; *t ^ '=';)
170 if ((*s ^ '=') != *t && s - word < 5)
172 /* the word matched o.k. */
174 default: /* looking up known word */
176 errx(1,"Unable to find %s in vocab", word);
177 for (s = word, t = h->atab; *t ^ '=';)
180 /* the word matched o.k. */