move functions around.
[apps/madmutt.git] / lib-mime / rfc1524.c
index de7ec11..576f212 100644 (file)
  * rfc1524.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <unistd.h>
-
 #include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
@@ -450,9 +437,8 @@ int rfc1524_expand_filename (char *nametemplate,
       m_strcpy(newfile, nflen, oldfile);
   }
   else if (!oldfile) {
-    mutt_expand_fmt (newfile, nflen, nametemplate, "mutt");
-  }
-  else {                        /* oldfile && nametemplate */
+    m_snsubst(newfile, nflen, nametemplate, "mutt");
+  } else {                        /* oldfile && nametemplate */
 
 
     /* first, compare everything left from the "%s"