make some functions a bit shorter.
[apps/madmutt.git] / lib / list.h
index 20f4c60..a63b528 100644 (file)
@@ -20,7 +20,7 @@
 
 typedef struct list2_t {
   void** data;
-  size_t length;
+  ssize_t length;
 } list2_t;
 
 /*
@@ -67,6 +67,12 @@ list2_t* list_dup (list2_t*, void* (*dup) (void*));
  *      index in data array otherwise
  * the callback must return 0 on equality
  */
-int list_lookup (list2_t*, int (*cmp) (const void*, const void*), const void*);
+typedef int list_lookup_t (const void*, const void*);
+int list_lookup (list2_t*, list_lookup_t* cmp, const void*);
+
+/*
+ * dumb-splits string at boundary characters into list
+ */
+list2_t* list_from_str (const char* str, const char* delim);
 
 #endif /* !_LIB_LIST_H */