htab
static count_int htab [OUTSTACKSIZE];
#define htabof(i) htab[i]
#define tab_suffixof(i) ((char_type *)(htab))[i]
count_int *htab_p = htab+hsize;
struct htab *lookup(ino_t i, int ef);
htab = (struct htab *)calloc(hsize, sizeof (struct htab));
if ((itab == NULL) || (htab == NULL)) {
free(htab);
struct htab *hp;
struct htab *hp;
struct htab *
struct htab *hp;
for (hp = &htab[(int)i%hsize]; hp->h_ino; ) {
if (++hp >= &htab[hsize])
hp = htab;
} *htab;
struct htab *lookup(ino_t i, int ef);
htab = (struct htab *)extend_tbl((uchar_t *)htab, &htab_size,
(unsigned)(hsize * sizeof (struct htab)));
if (htab == 0) {
struct htab *hp;
struct htab *hp;
struct htab *
struct htab *hp;
for (hp = &htab[(int)i%hsize]; hp->h_ino; ) {
if (++hp >= &htab[hsize])
hp = htab;
} *htab;
htab_t *htab = cache_get_htab(OBJ_ISCSI);
FOR_EACH_ITEM(htab, uid, {
htab_t *htab = cache_get_htab(OBJ_DD);
FOR_EACH_ITEM(htab, uid, {
htab_t *htab = cache_get_htab(OBJ_DDS);
FOR_EACH_ITEM(htab, uid, {
c->t = (struct htab **)calloc(sizeof (struct htab *), MAX_OBJ_TYPE);
htab = cache_get_htab(OBJ_ISCSI);
FOR_EACH_ITEM(htab, node_uid, {
htab_t *htab = cache_get_htab(OBJ_PG);
FOR_EACH_ITEM(htab, uid, {
htab_t *htab;
htab = cache_get_htab(OBJ_ISCSI);
FOR_EACH_ITEM(htab, node_uid, {
htab_t *htab;
struct ohash *htab;
htab = &names;
htab = &strings;
slot = ohash_qlookupi(htab, cp, &end);
s = ohash_find(htab, slot);
ohash_insert(htab, slot, s);
if ((htab = manmerge(e, NULL)) == NULL) {
for (rp = ohash_first(htab, &slot); rp != NULL;
rp = ohash_next(htab, &slot)) {
ohash_delete(htab);
free(htab);
manmerge(struct expr *e, struct ohash *htab)
return manmerge_term(e, htab);
return manmerge_or(e->child, htab);
return manmerge_and(e->child, htab);
manmerge_term(struct expr *e, struct ohash *htab)
if (htab == NULL) {
htab = mandoc_malloc(sizeof(*htab));
mandoc_ohash_init(htab, 4, offsetof(struct dbm_res, page));
slot = ohash_lookup_memory(htab,
if ((rp = ohash_find(htab, slot)) != NULL) {
ohash_insert(htab, slot, rp);
return htab;
manmerge_or(struct expr *e, struct ohash *htab)
htab = manmerge(e, htab);
return htab;
manmerge_and(struct expr *e, struct ohash *htab)
if (htab == NULL)
slot2 = ohash_lookup_memory(htab,
if (ohash_find(htab, slot2) == NULL)
ohash_insert(htab, slot2, res);
return htab;
struct ohash *htab;
struct ohash *htab;
htab = mandoc_malloc(sizeof(*htab));
mandoc_ohash_init(htab, 8, offsetof(struct roffreq, name));
slot = ohash_qlookup(htab, req->name);
ohash_insert(htab, slot, req);
return htab;
roffhash_free(struct ohash *htab)
if (htab == NULL)
for (req = ohash_first(htab, &slot); req != NULL;
req = ohash_next(htab, &slot))
ohash_delete(htab);
free(htab);
roffhash_find(struct ohash *htab, const char *name, size_t sz)
req = ohash_find(htab, ohash_qlookupi(htab, name, &end));
req = ohash_find(htab, ohash_qlookup(htab, name));
DB_HASHTAB *htab; /* Hash table of bucket headers. */
size_t htab; /* Hash table offset. */
SH_TAILQ_REMOVE(&dbmp->htab[off], bhp, hq, __bh);
for (bhp = SH_TAILQ_FIRST(&dbmp->htab[bucket], __bh);
SH_TAILQ_INSERT_HEAD(&dbmp->htab[bucket], bhp, hq, __bh);
for (htabp = dbmp->htab,
if (SH_TAILQ_FIRST(&dbmp->htab[bucket], __bh) != NULL)
for (bhp = SH_TAILQ_FIRST(&dbmp->htab[bucket], __bh);
0, &dbmp->htab)) != 0)
__db_hashinit(dbmp->htab, mp->htab_buckets);
mp->htab = R_OFFSET(dbmp, dbmp->htab);
dbmp->htab = R_ADDR(dbmp, dbmp->mp->htab);
files_hashent_t *hp, *htab;
htab = &fhp->fh_table[hashop * fhp->fh_size];
for (hp = htab[hash % fhp->fh_size].h_first; hp != NULL;
line = hp - htab;
htab = &fhp->fh_table[ht * fhp->fh_size];
for (hp = &htab[line - 1]; hp >= htab; hp--) {
hp->h_next = htab[bucket].h_first;
htab[bucket].h_first = hp;
const unsigned char **htab = g_htab;
for (hslot = htab; hslot < htab + HASH_SIZE; hslot++)
hslot = htab + hval;
ref = htab[hval];
htab[hval] = ip++;
htab[hval] = ip++;