more rationalization.
[apps/madmutt.git] / muttlib.c
index 28f6af3..00d0e90 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -176,7 +176,7 @@ void mutt_free_body (BODY ** p)
     a = a->next;
 
     if (b->parameter)
-      parameter_delete(&b->parameter);
+      parameter_list_wipe(&b->parameter);
     if (b->unlink && b->filename) {
       debug_print (1, ("unlinking %s.\n", b->filename));
       unlink (b->filename);
@@ -216,7 +216,7 @@ HEADER *mutt_dup_header (HEADER * h)
 }
 
 /* returns true if the header contained in "s" is in list "t" */
-int mutt_matches_ignore (const char *s, LIST * t)
+int mutt_matches_ignore (const char *s, string_list_t * t)
 {
   for (; t; t = t->next) {
     if (!ascii_strncasecmp (s, t->data, m_strlen(t->data))
@@ -322,7 +322,7 @@ char *_mutt_expand_path (char *s, size_t slen, int rx)
         HEADER *h;
         address_t *alias;
 
-        if ((alias = mutt_lookup_alias (s + 1))) {
+        if ((alias = alias_lookup(Aliases, s + 1))) {
           h = header_new();
           h->env = envelope_new();
           h->env->from = h->env->to = alias;
@@ -441,7 +441,7 @@ void mutt_delete_parameter (const char *attribute, PARAMETER ** p)
     if (ascii_strcasecmp (attribute, q->attribute) == 0) {
       *p = q->next;
       q->next = NULL;
-      parameter_delete(&q);
+      parameter_list_wipe(&q);
       return;
     }
   }
@@ -534,7 +534,7 @@ void mutt_merge_envelopes(ENVELOPE* base, ENVELOPE** extra)
   /* spam and user headers should never be hashed, and the new envelope may
    * have better values. Use new versions regardless. */
   mutt_buffer_free (&base->spam);
-  mutt_free_list (&base->userhdrs);
+  string_list_wipe(&base->userhdrs);
   MOVE_ELEM(spam);
   MOVE_ELEM(userhdrs);
 #undef MOVE_ELEM
@@ -552,19 +552,6 @@ void _mutt_mktemp (char *s, const char *src, int line)
   unlink (s);
 }
 
-void mutt_free_alias (ALIAS ** p)
-{
-  ALIAS *t;
-
-  while (*p) {
-    t = *p;
-    *p = (*p)->next;
-    p_delete(&t->name);
-    address_delete (&t->addr);
-    p_delete(&t);
-  }
-}
-
 /* collapse the pathname using ~ or = when possible */
 void mutt_pretty_mailbox (char *s)
 {
@@ -1285,7 +1272,7 @@ int mutt_cmp_addr (const address_t * a, const address_t * b)
   return (1);
 }
 
-int mutt_cmp_list (const LIST * a, const LIST * b)
+int mutt_cmp_list (const string_list_t * a, const string_list_t * b)
 {
   while (a && b) {
     if (m_strcmp(a->data, b->data))