*/
#include <time.h>
#include <stdlib.h>
-#define LIBCITADEL_VERSION_NUMBER 110
+#define LIBCITADEL_VERSION_NUMBER 111
/*
* Here's a bunch of stupid magic to make the MIME parser portable.
typedef const char *(*PrintHashContent)(void * Data);
typedef int (*CompareFunc)(const void* Item1, const void*Item2);
typedef int (*HashFunc)(const char *Str, long Len);
+typedef void (*TransitionFunc) (void *Item1, void *Item2, int Odd);
+typedef void (*PrintHashDataFunc) (const char *Key, void *Item, int Odd);
HashList *NewHash(int Uniq, HashFunc F);
int GetHashKeys(HashList *Hash, char ***List);
-int PrintHash(HashList *Hash, PrintHashContent first, PrintHashContent Second);
+int dbg_PrintHash(HashList *Hash, PrintHashContent first, PrintHashContent Second);
+
+
+int PrintHash(HashList *Hash, TransitionFunc Trans, PrintHashDataFunc PrintEntry);
HashPos *GetNewHashPos(void);
int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, char **HashKey, void **Data);
-void SortByHashKey(HashList *Hash);
+void SortByHashKey(HashList *Hash, int Order);
void SortByHashKeyStr(HashList *Hash);
const void *GetSearchPayload(const void *HashVoid);
void convert_spaces_to_underscores(char *str);
-
+/*
+ * Convert 4 bytes char into an Integer.
+ * usefull for easy inexpensive hashing
+ * of for char strings.
+ */
+#define CHAR4TO_INT(a) ((int) (a[0] | (a[1]<<8) | (a[2]<<16) | (a[3]<<24)))
/* vNote implementation */