getmx() now uses our array class
[citadel.git] / libcitadel / lib / libcitadel.h
index 9d015a9378927dd1afbe86505f384656c061e1c1..fe9cbd7003ab200575a5e1a9ae54c587a3cde81b 100644 (file)
@@ -26,7 +26,7 @@
 #include <sys/types.h>
 #include <netinet/in.h>
 
-#define LIBCITADEL_VERSION_NUMBER      925
+#define LIBCITADEL_VERSION_NUMBER      926
 
 /*
  * Here's a bunch of stupid magic to make the MIME parser portable.
@@ -440,6 +440,20 @@ char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth);
 void LoadEntityList(char *FileName);
 
 
+typedef struct {
+       void *the_elements;
+       size_t element_size;
+       int num_elements;
+       int num_alloc;
+} Array;
+
+Array *array_new(size_t element_size);
+void array_free(Array *arr);
+void array_append(Array *arr, void *new_element);
+void *array_get_element_at(Array *arr, int index);
+int array_len(Array *arr);
+void array_sort(Array *arr, int (*compar)(const void *, const void *));
+
 
 /* vCard stuff */