remove most of the debug code: often makes the code unreadable, for little
[apps/madmutt.git] / sendlib.c
index 5b9b56f..63399e4 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -29,7 +29,6 @@
 #include <lib-lib/str.h>
 #include <lib-lib/macros.h>
 #include <lib-lib/file.h>
-#include <lib-lib/debug.h>
 
 #include <lib-sys/exit.h>
 #include <lib-sys/mutt_signal.h>
@@ -379,7 +378,6 @@ int mutt_write_mime_body (BODY * a, FILE * f)
   if (a->type == TYPEMULTIPART) {
     /* First, find the boundary to use */
     if (!(p = mutt_get_parameter ("boundary", a->parameter))) {
-      debug_print (1, ("no boundary parameter found!\n"));
       mutt_error _("No boundary parameter found! [report this error]");
 
       return (-1);
@@ -405,7 +403,6 @@ int mutt_write_mime_body (BODY * a, FILE * f)
   }
 
   if ((fpin = fopen (a->filename, "r")) == NULL) {
-    debug_print (1, ("%s no longer exists!\n", a->filename));
     mutt_error (_("%s no longer exists!"), a->filename);
     return -1;
   }
@@ -815,7 +812,6 @@ CONTENT *mutt_get_content_info (const char *fname, BODY * b)
   }
 
   if ((fp = fopen (fname, "r")) == NULL) {
-    debug_print (1, ("%s: %s (errno %d).\n", fname, strerror (errno), errno));
     return (NULL);
   }
 
@@ -899,7 +895,6 @@ int mutt_lookup_mime_type (BODY * att, const char *path)
       m_strcpy(buf, sizeof(buf), SYSCONFDIR "/mime.types");
       break;
     default:
-      debug_print (1, ("Internal error, count = %d.\n", count));
       goto bye;                 /* shouldn't happen */
     }
 
@@ -2292,8 +2287,6 @@ address_t *mutt_remove_duplicates (address_t * addr)
     }
 
     if (dup) {
-      debug_print (2, ("Removing %s\n", addr->mailbox));
-
       *last = addr->next;
 
       addr->next = NULL;
@@ -2337,7 +2330,6 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid,
     set_noconv_flags (hdr->content, 1);
 
   if (mx_open_mailbox (path, M_APPEND | M_QUIET, &f) == NULL) {
-    debug_print (1, ("unable to open mailbox %s in append-mode, aborting.\n", path));
     return (-1);
   }
 
@@ -2450,7 +2442,6 @@ int mutt_write_fcc (const char *path, HEADER * hdr, const char *msgid,
 
     fflush (tempfp);
     if (ferror (tempfp)) {
-      debug_print (1, ("%s: write failed.\n", tempfile));
       fclose (tempfp);
       unlink (tempfile);
       mx_commit_message (msg, &f);      /* XXX - really? */