Lines Matching refs:key
44 nsc_insert_node(hash_node_t **hash, void *data, const char *key)
53 node->key = strdup(key);
60 index = calc_hash(key);
78 nsc_lookup(hash_node_t **hash, const char *key)
83 index = calc_hash(key);
86 if (strcmp(node->key, key) == 0)
94 nsc_remove_node(hash_node_t **hash, char *key)
100 index = calc_hash(key);
105 if (strcmp(hash[ index ]->key, key) == 0) {
109 free(node->key);
115 while (node && (strcmp(node->key, key) != 0)) {
124 free(node->key);
144 free(p->key);
158 calc_hash(const char *key)
161 int len = strlen(key);
163 hash = (hash << 5) ^ (hash >> 27) ^ key[ i ];