details
[apps/madmutt.git] / attach.c
index 88272b9..118edfa 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -8,31 +8,13 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-
-#include <lib-lib/mem.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/str.h>
-#include <lib-lib/file.h>
-#include <lib-lib/macros.h>
+#include <lib-lib/lib-lib.h>
 
 #include <lib-sys/unix.h>
-
 #include <lib-mime/mime.h>
-
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "handler.h"
@@ -40,7 +22,6 @@
 #include "keymap.h"
 #include "pager.h"
 #include "copy.h"
-#include "mx.h"
 #include <lib-crypt/crypt.h>
 
 int mutt_get_tmp_attachment (BODY * a)
@@ -358,7 +339,7 @@ int mutt_is_autoview (BODY * b, const char *type)
   mutt_check_lookup_list (b, _type, sizeof (_type));
   type = _type;
 
-  if (mutt_needs_mailcap (b)) {
+  if (rfc1524_mailcap_isneeded(b)) {
     if (option (OPTIMPLICITAUTOVIEW))
       return 1;
 
@@ -400,7 +381,7 @@ int mutt_view_attachment (FILE * fp, BODY * a, int flag, HEADER * hdr,
       !crypt_valid_passphrase (a->hdr->security))
     return (rc);
   use_mailcap = (flag == M_MAILCAP ||
-                 (flag == M_REGULAR && mutt_needs_mailcap (a)));
+                 (flag == M_REGULAR && rfc1524_mailcap_isneeded(a)));
   snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
 
   if (use_mailcap) {