/* add an element to a list */
LIST *mutt_add_list (LIST *, const char *);
LIST *mutt_add_list_n (LIST*, const void *, size_t);
+LIST *mutt_find_list (LIST *, const char *);
void mutt_init (int, LIST *);
return head;
}
+LIST *mutt_find_list (LIST *l, const char *data)
+{
+ LIST *p = l;
+
+ while (p)
+ {
+ if (data == p->data)
+ return p;
+ if (data && p->data && mutt_strcmp (p->data, data) == 0)
+ return p;
+ p = p->next;
+ }
+ return NULL;
+}
+
void mutt_free_list (LIST **list)
{
LIST *p;