Lines Matching refs:key
45 * the actual key data only through the hash and equal functions given
53 const void *e_key; /* Pointer to a key */
86 * - the function hash(key) is used to compute hash values for keys; if
129 * Return a pointer to a matching key
133 h_get(const HASHSET h, void *key)
135 uint_t hash = h->h_hash(key);
140 if (e->e_hash == hash && h->h_equal(e->e_key, key))
180 * Store a key into a HASHSET
181 * - if there is already an "equal" key then the new key will not
182 * be stored and the function returns a pointer to an existing key
183 * - otherwise the function stores pointer to the new key and return NULL
187 h_put(HASHSET h, const void *key)
189 uint_t hash = h->h_hash(key);
194 if (e->e_hash == hash && h->h_equal(e->e_key, key))
195 return (key);
205 e->e_key = (void *) key;
217 * Delete a key
218 * - if there is no "equal" key in the HASHSET the fuction returns NULL
219 * - otherwise the function returns a pointer to the deleted key
223 h_delete(HASHSET h, const void *key)
225 uint_t hash = h->h_hash(key);
230 if (e->e_hash == hash && h->h_equal(e->e_key, key)) {
231 key = e->e_key;
237 return (key);
262 * Return a pointer to a next key
268 const void *key;
277 key = i->i_e->e_key;
283 return (key);