X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=vector%2Fhashvector.h;h=a3810f9da2440ab738701306da842d0571793e5f;hb=d9858ce46cb09b9127c7246f628e65982aa43a15;hp=1c3f387443bda77cd212479d3dc56a74c50532d5;hpb=e47e7f1e366224e9e514e28f172afa65c732db21;p=rrq%2Frrqmisc.git diff --git a/vector/hashvector.h b/vector/hashvector.h index 1c3f387..a3810f9 100644 --- a/vector/hashvector.h +++ b/vector/hashvector.h @@ -71,13 +71,15 @@ typedef struct { #define HV_HOLE ((void*) 1) /** - * Find the item, if any, with the given key and assign *x with its - * address. Returns 1 on success and 0 on failure to find the keyed - * item. Note that when the function returns 0, *x is unchanged. + * \brief Find next keyed item at or after the given index. + * \param hv is the hasvector concerned + * \param index is a pointer to the index to advance + * \param key is the query key + * \returns the next matching item, or 0 if none, with the index updated. * * \related hashvector */ -extern int hashvector_find(hashvector *hv,void *key,void **x); +extern void *hashvector_next(hashvector *hv,vector_index *i,void *key); /** * Add the given item into the hashvector, growing the hashvector as @@ -124,6 +126,7 @@ extern unsigned long hashvector_hashcode(unsigned char *key,unsigned long n); /** * Create a hashvector for of given variant for given itemkeyfun* */ -extern hashvector *hashvector_create(int variant,itemkeyfun *type); +extern hashvector *hashvector_create( + enum vector_variant variant,itemkeyfun *type); #endif