X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib%2Flist.h;h=3f701be650e681ecc8937147e08a20cd0c2a4615;hp=1f409eafb3d7fdbf40d79fb5fd77802260f31f6d;hb=bd0ed9bc7c534be30b0140b341b4d8a390483dbd;hpb=07449b789713bd8716a02214f536dfd72f3549b1 diff --git a/lib/list.h b/lib/list.h index 1f409ea..3f701be 100644 --- a/lib/list.h +++ b/lib/list.h @@ -16,11 +16,9 @@ #ifndef _LIB_LIST_H #define _LIB_LIST_H -#include - typedef struct list2_t { void** data; - size_t length; + ssize_t length; } list2_t; /* @@ -67,7 +65,8 @@ 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