remove most of the debug code: often makes the code unreadable, for little
[apps/madmutt.git] / attach.c
index e352c4a..63723dc 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -26,7 +26,6 @@
 #include <lib-lib/str.h>
 #include <lib-lib/file.h>
 #include <lib-lib/macros.h>
-#include <lib-lib/debug.h>
 
 #include <lib-sys/unix.h>
 
@@ -106,7 +105,6 @@ int mutt_compose_attachment (BODY * a)
         m_strcpy(command, sizeof(command), entry->composecommand);
       if (rfc1524_expand_filename (entry->nametemplate,
                                    a->filename, newfile, sizeof (newfile))) {
-        debug_print (1, ("oldfile: %s\t newfile: %s\n", a->filename, newfile));
         if (safe_symlink (a->filename, newfile) == -1) {
           if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES)
               != M_YES)
@@ -227,8 +225,7 @@ int mutt_edit_attachment (BODY * a)
       m_strcpy(command, sizeof(command), entry->editcommand);
       if (rfc1524_expand_filename (entry->nametemplate,
                                    a->filename, newfile, sizeof (newfile))) {
-        debug_print (1, ("oldfile: %s\t newfile: %s\n", a->filename, newfile));
-        if (safe_symlink (a->filename, newfile) == -1) {
+          if (safe_symlink (a->filename, newfile) == -1) {
           if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES)
               != M_YES)
             goto bailout;
@@ -339,7 +336,6 @@ void mutt_check_lookup_list (BODY * b, char *type, int len)
                   n == TYPEMULTIPART ? "multipart" :
                   n == TYPETEXT ? "text" :
                   n == TYPEVIDEO ? "video" : "other", tmp.subtype);
-        debug_print (1, ("\"%s\" -> %s\n", b->filename, type));
       }
       if (tmp.subtype)
         p_delete(&tmp.subtype);
@@ -899,8 +895,6 @@ int mutt_print_attachment (FILE * fp, BODY * a)
     rfc1524_entry *entry;
     int piped = FALSE;
 
-    debug_print (2, ("Using mailcap...\n"));
-
     entry = rfc1524_new_entry ();
     rfc1524_mailcap_lookup (a, type, entry, M_PRINT);
     if (rfc1524_expand_filename (entry->nametemplate, a->filename,
@@ -979,16 +973,11 @@ int mutt_print_attachment (FILE * fp, BODY * a)
     mutt_mktemp (newfile);
     if (mutt_decode_save_attachment (fp, a, newfile, M_PRINTING, 0) == 0) {
 
-      debug_print (2, ("successfully decoded %s type attachment to %s\n",
-               type, newfile));
-
       if ((ifp = fopen (newfile, "r")) == NULL) {
         mutt_perror ("fopen");
         goto bail0;
       }
 
-      debug_print (2, ("successfully opened %s read-only\n", newfile));
-
       mutt_endwin (NULL);
       if ((thepid =
            mutt_create_filter (NONULL (PrintCmd), &fpout, NULL, NULL)) < 0) {
@@ -997,8 +986,6 @@ int mutt_print_attachment (FILE * fp, BODY * a)
         goto bail0;
       }
 
-      debug_print (2, ("Filter created.\n"));
-
       mutt_copy_stream (ifp, fpout);
 
       safe_fclose (&fpout);