typedef struct {
hash_link hash;
int n;
} fvdb_entry;
fvdb_entry *fv;
static hash_table *via_table = NULL;
via_table = hash_create((HASHCMP *) strcmp, 977, hash4);
if (NULL == hash)
return;
fv = hash_lookup(hash, key);
if (NULL == fv) {
fv = xcalloc(1, sizeof(fvdb_entry));
fv->hash.key = xstrdup(key);
hash_join(hash, &fv->hash);
}
fv->n++;
hashFreeItems(via_table, fvdbFreeEntry);
hashFreeMemory(via_table);
阅读(1139) | 评论(0) | 转发(0) |