*oops* I forgot to add those.
[apps/madmutt.git] / postpone.c
index cb51271..42889e3 100644 (file)
@@ -8,26 +8,15 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/file.h>
-#include <lib-lib/mapping.h>
+#include <lib-lib/lib-lib.h>
 
 #include <lib-mime/mime.h>
 
 #include <lib-ui/enter.h>
 #include <lib-ui/menu.h>
+#include <lib-ui/curses.h>
+
+#include <lib-sys/unix.h>
 
 #include "mutt.h"
 #include "handler.h"
@@ -537,13 +526,13 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr,
     err:
       mx_close_message (&msg);
       envelope_delete(&newhdr->env);
-      mutt_free_body (&newhdr->content);
+      body_list_wipe(&newhdr->content);
       mutt_error _("Decryption failed.");
 
       return -1;
     }
 
-    mutt_free_body (&newhdr->content);
+    body_list_wipe(&newhdr->content);
     newhdr->content = b;
 
     mutt_clear_error ();
@@ -563,7 +552,7 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr,
       newhdr->security |= APPLICATION_SMIME;
 
     /* destroy the signature */
-    mutt_free_body (&newhdr->content->parts->next);
+    body_list_wipe(&newhdr->content->parts->next);
     newhdr->content = mutt_remove_multipart (newhdr->content);
   }
 
@@ -642,7 +631,7 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr,
 
     mutt_stamp_attachment (b);
 
-    mutt_free_body (&b->parts);
+    body_list_wipe(&b->parts);
     if (b->hdr)
       b->hdr->content = NULL;   /* avoid dangling pointer */
   }
@@ -674,7 +663,7 @@ bail:
 
   if (rv == -1) {
     envelope_delete(&newhdr->env);
-    mutt_free_body (&newhdr->content);
+    body_list_wipe(&newhdr->content);
   }
 
   return rv;