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);                                                                                                                                

10-16 07:28
查看更多