#ifndef MUTT_LIB_LIB_LIST_H
#define MUTT_LIB_LIB_LIST_H
-#include "mem.h"
-#include "str.h"
-
#define DO_SLIST(type, prefix, dtor) \
static inline type *prefix##_list_pop(type **list) { \
if (*list) { \
list = prefix##_list_last(list); \
*list = item; \
return list; \
+ } \
+ static inline type *prefix##_list_rev(type *list) { \
+ type *l = NULL; \
+ while (list) { \
+ prefix##_list_push(&l, prefix##_list_pop(&list)); \
+ } \
+ return l; \
} \
\
static inline type **prefix##_list_init(type **list) { \
DO_SLIST(string_list_t, string, string_item_delete);
string_list_t *string_list_dup(const string_list_t *);
+int string_list_contains(const string_list_t *, const char *, const char *);
/* FIXME: b0rken API's, replace that at any cost */
/* add an element to a list */