- p = hash_lookup (table, key, NULL, NULL);
+ p = hash_lookup (table, key, strlen (key), NULL, NULL);
+ if (p == NULL)
+ return NULL;
+
+ return p->data;
+}
+
+/* As hash_find, but KEY is of length LEN and is not guaranteed to be
+ NUL-terminated. */
+
+PTR
+hash_find_n (struct hash_control *table, const char *key, size_t len)
+{
+ struct hash_entry *p;
+
+ p = hash_lookup (table, key, len, NULL, NULL);
+ if (p == NULL)
+ return NULL;
+
+ return p->data;
+}
+
+/* Delete an entry from a hash table. This returns the value stored
+ for that entry, or NULL if there is no such entry. */
+
+PTR
+hash_delete (struct hash_control *table, const char *key)
+{
+ struct hash_entry *p;
+ struct hash_entry **list;
+
+ p = hash_lookup (table, key, strlen (key), &list, NULL);