Lines Matching refs:hp
313 struct hash *hp, *hp0; in hashit() local
315 hp = hp0 = &bucket[lastchr(str) & 0177]; in hashit()
316 while (hp->hnext) { in hashit()
317 hp = hp->hnext; in hashit()
318 i = istail(str, hp->hstr); in hashit()
320 return (hp->hpt + i); in hashit()
322 if ((hp = calloc(1, sizeof (*hp))) == NULL) { in hashit()
327 hp->hpt = mesgpt; in hashit()
328 hp->hstr = savestr(str); in hashit()
329 mesgpt += strlen(hp->hstr) + 1; in hashit()
330 hp->hnext = hp0->hnext; in hashit()
331 hp->hnew = new; in hashit()
332 hp0->hnext = hp; in hashit()
333 return (hp->hpt); in hashit()
340 struct hash *hp; in flushsh() local
345 for (hp = bucket[i].hnext; hp != NULL; hp = hp->hnext) in flushsh()
346 if (hp->hnew) in flushsh()
356 for (hp = bucket[i].hnext; hp != NULL; hp = hp->hnext) { in flushsh()
357 found(hp->hnew, hp->hpt, hp->hstr); in flushsh()
358 if (hp->hnew) { in flushsh()
359 (void) fseek(mesgwrit, hp->hpt, 0); in flushsh()
360 (void) fwrite(hp->hstr, in flushsh()
361 strlen(hp->hstr) + 1, 1, mesgwrit); in flushsh()