Lines Matching refs:hp
333 struct hash *hp, *hp0; in hashit() local
335 hp = hp0 = &bucket[lastchr(str) & 0177]; in hashit()
336 while (hp->hnext) { in hashit()
337 hp = hp->hnext; in hashit()
338 i = istail(str, hp->hstr); in hashit()
340 return (hp->hpt + i); in hashit()
342 if ((hp = (struct hash *) calloc(1, sizeof (*hp))) == NULL) in hashit()
344 hp->hpt = mesgpt; in hashit()
345 if (!(hp->hstr = strdup(str))) in hashit()
347 mesgpt += strlen(hp->hstr) + 1; in hashit()
348 hp->hnext = hp0->hnext; in hashit()
349 hp->hnew = new; in hashit()
350 hp0->hnext = hp; in hashit()
351 return (hp->hpt); in hashit()
358 struct hash *hp; in flushsh() local
363 for (hp = bucket[i].hnext; hp != NULL; hp = hp->hnext) in flushsh()
364 if (hp->hnew) in flushsh()
374 for (hp = bucket[i].hnext; hp != NULL; hp = hp->hnext) { in flushsh()
375 found(hp->hnew, hp->hpt, hp->hstr); in flushsh()
376 if (hp->hnew) { in flushsh()
377 fseek(mesgwrit, hp->hpt, 0); in flushsh()
378 ignore(fwrite(hp->hstr, strlen(hp->hstr) + 1, 1, mesgwrit)); in flushsh()