sh                 58 gozilla/gozilla.c STRHASH *sh;
sh                119 gozilla/gozilla.c 	sh = strhash_open(10);
sh                151 gozilla/gozilla.c 		ent = strhash_assign(sh, name, 1);
sh                169 gozilla/gozilla.c 	struct sh_entry *ent = strhash_assign(sh, alias_name, 0);
sh                960 libutil/gtagsop.c 	struct sh_entry *sh;
sh                992 libutil/gtagsop.c 		sh = strhash_assign(gtop->path_hash, path, 1);
sh                993 libutil/gtagsop.c 		gtp->path = sh->name;
sh                 87 libutil/strhash.c 	STRHASH *sh = (STRHASH *)check_calloc(sizeof(STRHASH), 1);
sh                 90 libutil/strhash.c 	sh->htab = (struct sh_head *)check_calloc(sizeof(struct sh_head), buckets);
sh                 92 libutil/strhash.c 		SLIST_INIT(&sh->htab[i]);
sh                 93 libutil/strhash.c 	sh->buckets = buckets;
sh                 94 libutil/strhash.c 	sh->pool = pool_open();
sh                 95 libutil/strhash.c 	sh->entries = 0;
sh                 96 libutil/strhash.c 	return sh;
sh                111 libutil/strhash.c strhash_assign(STRHASH *sh, const char *name, int force)
sh                113 libutil/strhash.c 	struct sh_head *head = &sh->htab[__hash_string(name) % sh->buckets];
sh                126 libutil/strhash.c 		entry = pool_malloc(sh->pool, sizeof(struct sh_entry));
sh                127 libutil/strhash.c 		entry->name = pool_strdup(sh->pool, name, 0);
sh                130 libutil/strhash.c 		sh->entries++;
sh                144 libutil/strhash.c strhash_strdup(STRHASH *sh, const char *string, int size)
sh                146 libutil/strhash.c 	return pool_strdup(sh->pool, string, size);
sh                154 libutil/strhash.c strhash_first(STRHASH *sh)
sh                156 libutil/strhash.c 	sh->cur_bucket = -1;		/* to start from index 0. */
sh                157 libutil/strhash.c 	sh->cur_entry = NULL;
sh                158 libutil/strhash.c 	return strhash_next(sh);
sh                166 libutil/strhash.c strhash_next(STRHASH *sh)
sh                170 libutil/strhash.c 	if (sh->buckets > 0 && sh->cur_bucket < sh->buckets) {
sh                171 libutil/strhash.c 		entry = sh->cur_entry;
sh                173 libutil/strhash.c 			while (++sh->cur_bucket < sh->buckets) {
sh                174 libutil/strhash.c 				entry = SLIST_FIRST(&sh->htab[sh->cur_bucket]);
sh                179 libutil/strhash.c 		sh->cur_entry = (entry) ? SLIST_NEXT(entry, ptr) : NULL;
sh                189 libutil/strhash.c strhash_reset(STRHASH *sh)
sh                196 libutil/strhash.c 	for (i = 0; i < sh->buckets; i++) {
sh                197 libutil/strhash.c 		SLIST_INIT(&sh->htab[i]);
sh                202 libutil/strhash.c 	pool_reset(sh->pool);
sh                203 libutil/strhash.c 	sh->entries = 0;
sh                211 libutil/strhash.c strhash_close(STRHASH *sh)
sh                213 libutil/strhash.c 	pool_close(sh->pool);
sh                214 libutil/strhash.c 	free(sh->htab);
sh                215 libutil/strhash.c 	free(sh);