return SearchPos;
}
+
+/**
+ * \brief another hashing algorithm; treat it as just a pointer to long.
+ * \param str Our pointer to the long value
+ * \param len the length of the data pointed to; needs to be sizeof int, else we won't use it!
+ * \returns the calculated hash value
+ */
+int Flathash(const char *str, long len)
+{
+ if (len != sizeof (int))
+ return 0;
+ else return *(int*)str;
+}
+
/**
* \brief private abstract wrapper around the hashing algorithm
* \param HKey the hash string
typedef struct StrBuf StrBuf;
+typedef struct _ConstStr {
+ const char *Key;
+ long len;
+}ConstStr;
+
+
StrBuf* NewStrBuf(void);
StrBuf* NewStrBufDup(const StrBuf *CopyMe);
StrBuf* NewStrBufPlain(const char* ptr, int nChars);
typedef void (*TransitionFunc) (void *Item1, void *Item2, int Odd);
typedef void (*PrintHashDataFunc) (const char *Key, void *Item, int Odd);
+int Flathash(const char *str, long len);
+#define IKEY(a) (const char*)(&((int)a)), sizeof(int)
+
HashList *NewHash(int Uniq, HashFunc F);
void DeleteHash(HashList **Hash);
void HDeleteHash(void *vHash);