revamp lib.[hc] functions into lib-lib/file.[hc].
[apps/madmutt.git] / postpone.c
index f7d7328..f0ef950 100644 (file)
 #endif
 
 #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 "mutt.h"
-#include "ascii.h"
 #include "enter.h"
 #include "handler.h"
 #include "mutt_menu.h"
@@ -31,9 +34,6 @@
 #endif
 #include "mutt_crypt.h"
 
-#include "lib/mem.h"
-#include "lib/intl.h"
-#include "lib/str.h"
 #include "lib/debug.h"
 
 #include <ctype.h>
@@ -512,7 +512,7 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr,
   int rv = -1;
   STATE s;
 
-  memset (&s, 0, sizeof (s));
+  p_clear(&s, 1);
 
   if (!fp && (msg = mx_open_message (ctx, hdr->msgno)) == NULL)
     return (-1);
@@ -612,7 +612,7 @@ int mutt_prepare_template (FILE * fp, CONTEXT * ctx, HEADER * newhdr,
     file[0] = '\0';
     if (b->filename) {
       strfcpy (file, b->filename, sizeof (file));
-      b->d_filename = str_dup (b->filename);
+      b->d_filename = m_strdup(b->filename);
     }
     else {
       /* avoid Content-Disposition: header with temporary filename */