+/**
+ * \brief Sort a vector with quicksort using the provided ordering
+ * collback function.
+ *
+ * \related vector
+ */
+extern void vector_qsort(vector *pv,int (*compar)(const void *,const void *));
+
+/**
+ * Steps through the vector item by item invoking the given function
+ * for each. Continues stepping while the item function returns 0.
+ *
+ * \related vector
+ */
+extern void vector_iterate(
+ vector *pv, vector_index start,
+ int (*itemfn)(vector_index,void *item,void *data),
+ void *data);
+
+/**
+ * \brief Binary search in a sorted vector for an item of the given
+ * key, with a callback function providing the sorting order.
+ *
+ * \param pv is the vector concerned.
+ *
+ * \param index is a vector_index pointer for returning the index of
+ * the found item.
+ *
+ * \param key is the lookup key to find.
+ *
+ * \param compare is a callback function that should return the search
+ * direction given a key and an item. It should return 0 if the key is
+ * a match for the item, <0 if the sought item is expected at a higher
+ * index, and >0 if the sought item is expected at a lower index.
+ *
+ * \return a pointer to the found item and *index set to its index. If
+ * there is no matching item, then 0 is returned, and the index is set
+ * to the vector size.
+ *
+ * \related vector
+ */
+extern void *vector_bsearch(
+ vector *pv, vector_index *index, const void *key,
+ int (*compare)(const void *key, const void *item));
+
+/**
+ * \brief Find the index for a given value
+ *
+ * \param pv is the vector concerned
+ * \param is the value to find
+ *
+ * This function scans the vector for the first, if any, occurrence of
+ * the value, or returns pv->size if not found.
+ *
+ * \related vector
+ */
+extern vector_index vector_find(vector *pv,void *value);
+
+/**
+ * \brief Find the next used slot at or after the given index.
+ *
+ * \param pv the vector concerned.
+ * \param index pointer to the index to advance.
+ * \return the new index, or the vector size if no unused slot is
+ * found.
+ *
+ * Scans forward in the vector for the first unused (null) vector slot
+ * at or after the given index. Returns pv->size if full.
+ *
+ * \related vector
+ */
+extern vector_index vector_next_unused(vector *pv,vector_index index);
+
+/**
+ * \brief Convenience callback function for vector shrinking to free
+ * any existing slot assignment.
+ *
+ * \related vector
+ */
+extern int vector_free_any(vector *pv,vector_index ix,void *item,void *data);
+
+/**
+ * \brief Convenience callback function for vector shrinking to ignore
+ * any existing slot assignment (without free-ing them).
+ *
+ * \related vector
+ */
+extern int vector_clear_any(vector *pv,vector_index ix,void *item,void *data);