+ * @ingroup HashListAccess
+ * @brief resets a hash-linear iterator object
+ * @param Hash the list we reference
+ * @param StepWidth in which step width should we iterate?
+ * @param it the iterator object to manipulate
+ * If negative, the last position matching the
+ * step-raster is provided.
+ * @return the hash iterator
+ */
+void RewindHashPos(const HashList *Hash, HashPos *it, int StepWidth)
+{
+ if (StepWidth != 0)
+ it->StepWidth = StepWidth;
+ else
+ it->StepWidth = 1;
+ if (it->StepWidth < 0) {
+ it->Position = Hash->nLookupTableItems - 1;
+ }
+ else {
+ it->Position = 0;
+ }
+}
+
+/**
+ * @ingroup HashListAccess
+ * @brief Set iterator object to point to key. If not found, don't change iterator
+ * @param Hash the list we reference
+ * @param HKey key to search for
+ * @param HKLen length of key
+ * @param At HashPos to update
+ * @return 0 if not found
+ */
+int GetHashPosFromKey(HashList *Hash, const char *HKey, long HKLen, HashPos *At)
+{
+ long HashBinKey;
+ long HashAt;
+
+ if (Hash == NULL)
+ return 0;
+
+ if (HKLen <= 0) {
+ return 0;
+ }
+ /** first, find out were we could be... */
+ HashBinKey = CalcHashKey(Hash, HKey, HKLen);
+ HashAt = FindInHash(Hash, HashBinKey);
+ if ((HashAt < 0) || /**< Not found at the lower edge? */
+ (HashAt >= Hash->nLookupTableItems) || /**< Not found at the upper edge? */
+ (Hash->LookupTable[HashAt]->Key != HashBinKey)) { /**< somewhere inbetween but no match? */
+ return 0;
+ }
+ /** GOTCHA! */
+ At->Position = HashAt;
+ return 1;
+}
+
+/**
+ * @ingroup HashListAccess
+ * @brief Delete from the Hash the entry at Position
+ * @param Hash the list we reference
+ * @param At the position within the Hash
+ * @return 0 if not found
+ */
+int DeleteEntryFromHash(HashList *Hash, HashPos *At)
+{
+ Payload *FreeMe;
+ if (Hash == NULL)
+ return 0;
+
+ /* if lockable, lock here */
+ if ((Hash == NULL) ||
+ (At->Position >= Hash->nLookupTableItems) ||
+ (At->Position < 0) ||
+ (At->Position > Hash->nLookupTableItems))
+ {
+ /* unlock... */
+ return 0;
+ }
+
+ FreeMe = Hash->Members[Hash->LookupTable[At->Position]->Position];
+ Hash->Members[Hash->LookupTable[At->Position]->Position] = NULL;
+
+
+ /** delete our hashing data */
+ if (Hash->LookupTable[At->Position] != NULL)
+ {
+ free(Hash->LookupTable[At->Position]->HashKey);
+ free(Hash->LookupTable[At->Position]);
+ if (At->Position < Hash->nLookupTableItems)
+ {
+ memmove(&Hash->LookupTable[At->Position],
+ &Hash->LookupTable[At->Position + 1],
+ (Hash->nLookupTableItems - At->Position - 1) *
+ sizeof(HashKey*));
+
+ Hash->LookupTable[Hash->nLookupTableItems - 1] = NULL;
+ }
+ else
+ Hash->LookupTable[At->Position] = NULL;
+ Hash->nLookupTableItems--;
+ }
+ /* unlock... */
+
+
+ /** get rid of our payload */
+ if (FreeMe != NULL)
+ {
+ DeleteHashPayload(FreeMe);
+ free(FreeMe);
+ }
+ return 1;
+}
+
+/**
+ * @ingroup HashListAccess
+ * @brief retrieve the counter from the itteratoor
+ * @param Hash which
+ * @param At the Iterator to analyze
+ * @return the n'th hashposition we point at
+ */
+int GetHashPosCounter(HashList *Hash, HashPos *At)
+{
+ if ((Hash == NULL) ||
+ (At->Position >= Hash->nLookupTableItems) ||
+ (At->Position < 0) ||
+ (At->Position > Hash->nLookupTableItems))
+ return 0;
+ return At->Position;
+}
+
+/**
+ * @ingroup HashListAccess
+ * @brief frees a linear hash iterator