use my usual API's for allocation/deallocation right now.
[apps/madmutt.git] / copy.c
diff --git a/copy.c b/copy.c
index 27cf073..66d30b8 100644 (file)
--- a/copy.c
+++ b/copy.c
 #include <lib-lib/file.h>
 #include <lib-lib/ascii.h>
 
+#include <lib-mime/mime.h>
+
 #include "mutt.h"
 #include "handler.h"
 #include "mx.h"
 #include "copy.h"
 #include "rfc2047.h"
-#include "mime.h"
 #include "mutt_crypt.h"
 #include "mutt_idna.h"
 
@@ -812,7 +813,7 @@ static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout,
  * XXX - fix that. 
  */
 
-static void format_address_header (char **h, ADDRESS * a)
+static void format_address_header (char **h, address_t * a)
 {
   char buf[HUGE_STRING];
   char cbuf[STRING];
@@ -826,7 +827,7 @@ static void format_address_header (char **h, ADDRESS * a)
 
   p_realloc(h, buflen);
   for (count = 0; a; a = a->next, count++) {
-    ADDRESS *tmp = a->next;
+    address_t *tmp = a->next;
 
     a->next = NULL;
     *buf = *cbuf = *c2buf = '\0';
@@ -867,7 +868,7 @@ static int address_header_decode (char **h)
   char *s = *h;
   int l;
 
-  ADDRESS *a = NULL;
+  address_t *a = NULL;
 
   switch (tolower ((unsigned char) *s)) {
   case 'r':
@@ -939,7 +940,7 @@ static int address_header_decode (char **h)
 
   format_address_header (h, a);
 
-  rfc822_free_address (&a);
+  address_delete (&a);
 
   p_delete(&s);
   return 1;