vg4->hash->remove()
Remove an entry from a hash.
SYNTAX
void *
vg4->hash->remove(struct VG_Hash *hsh, const char *key)
FUNCTION PARAMETERS
hsh | Hash |
key | Key |
RETURN VALUE
Returns the position to the previous hash-entry
DESCRIPTION
Remove an entry from a hash.
If this function is used within a hash-listing,
the return value must be used for the correct continuation.
EXAMPLE
struct VG_Hash *hsh = vg4->hash->create(); void *vpos; const char *key; [...] /* insert hash entries */ /* list hash entries and remove them while listing */ vpos = NULL; for (key = vg4->hash->list(hsh, &vpos); vpos != NULL; key = vg4->hash->list(hsh, &vpos)) { printf("- %s\n", key); vpos = vg4->hash->remove(hsh, key); /* remove entry */ }