projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cpkg2c improvements.
[apps/madmutt.git]
/
lib-lib
/
list.h
diff --git
a/lib-lib/list.h
b/lib-lib/list.h
index
b1b612e
..
4f54d32
100644
(file)
--- a/
lib-lib/list.h
+++ b/
lib-lib/list.h
@@
-51,6
+51,13
@@
list = prefix##_list_last(list); \
*list = item; \
return 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) { \
} \
\
static inline type **prefix##_list_init(type **list) { \
@@
-79,6
+86,9
@@
DO_DELETE(string_list_t, string_item);
DO_SLIST(string_list_t, string, string_item_delete);
string_list_t *string_list_dup(const string_list_t *);
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 *);
+void string_list_add(string_list_t **, const char *);
+void string_list_remove(string_list_t **l, const char *str);
/* FIXME: b0rken API's, replace that at any cost */
/* add an element to a list */
/* FIXME: b0rken API's, replace that at any cost */
/* add an element to a list */