Lines Matching refs:hp
69 strhash_t *hp, *hq; in strtab_destroy() local
73 for (hp = sp->str_hash[i]; hp != NULL; hp = hq) { in strtab_destroy()
74 hq = hp->str_next; in strtab_destroy()
75 free(hp); in strtab_destroy()
107 strtab_compare(strtab_t *sp, strhash_t *hp, const char *str, size_t len) in strtab_compare() argument
109 ulong_t b = hp->str_buf; in strtab_compare()
110 const char *buf = hp->str_data; in strtab_compare()
157 strhash_t *hp; in strtab_insert() local
170 for (hp = sp->str_hash[h]; hp != NULL; hp = hp->str_next) { in strtab_insert()
171 if (strtab_compare(sp, hp, str, len + 1) == 0) in strtab_insert()
172 return (hp->str_off); in strtab_insert()
179 hp = xmalloc(sizeof (strhash_t)); in strtab_insert()
181 hp->str_data = sp->str_ptr; in strtab_insert()
182 hp->str_buf = sp->str_nbufs - 1; in strtab_insert()
183 hp->str_off = sp->str_size; in strtab_insert()
184 hp->str_len = len; in strtab_insert()
185 hp->str_next = sp->str_hash[h]; in strtab_insert()
187 sp->str_hash[h] = hp; in strtab_insert()
197 return (hp->str_off); in strtab_insert()
233 const strhash_t *hp; in strtab_print() local
237 for (hp = sp->str_hash[i]; hp != NULL; hp = hp->str_next) { in strtab_print()
238 const char *buf = hp->str_data; in strtab_print()
239 ulong_t b = hp->str_buf; in strtab_print()
242 (void) printf("[%lu] %lu \"", (ulong_t)hp->str_off, b); in strtab_print()
244 for (len = hp->str_len; len != 0; len -= n) { in strtab_print()