Nico Golde:
[apps/madmutt.git] / handler.c
index b5c3bda..a6a085c 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -31,6 +31,7 @@
 #include "lib/mem.h"
 #include "lib/intl.h"
 #include "lib/str.h"
+#include "lib/debug.h"
 
 #define BUFI_SIZE 1000
 #define BUFO_SIZE 2000
@@ -287,8 +288,7 @@ void mutt_decode_base64 (STATE * s, long len, int istext, iconv_t cd)
         buf[i++] = ch;
     }
     if (i != 4) {
-      dprint (2, (debugfile, "%s:%d [mutt_decode_base64()]: "
-                  "didn't get a multiple of 4 chars.\n", __FILE__, __LINE__));
+      debug_print (2, ("didn't get a multiple of 4 chars.\n"));
       break;
     }
 
@@ -370,14 +370,14 @@ void mutt_decode_uuencoded (STATE * s, long len, int istext, iconv_t cd)
     if ((fgets (tmps, sizeof (tmps), s->fpin)) == NULL)
       return;
     len -= mutt_strlen (tmps);
-    if ((!mutt_strncmp (tmps, "begin", 5)) && ISSPACE (tmps[5]))
+    if ((!safe_strncmp (tmps, "begin", 5)) && ISSPACE (tmps[5]))
       break;
   }
   while (len > 0) {
     if ((fgets (tmps, sizeof (tmps), s->fpin)) == NULL)
       return;
     len -= mutt_strlen (tmps);
-    if (!mutt_strncmp (tmps, "end", 3))
+    if (!safe_strncmp (tmps, "end", 3))
       break;
     pt = tmps;
     linelen = decode_byte (*pt);
@@ -871,7 +871,7 @@ static void flowed_stuff (STATE * s, char *cont, int level)
   }
   else if ((!(s->flags & M_PRINTING)) && ((*cont == ' ') || (*cont == '>')
                                           || (!level
-                                              && !mutt_strncmp (cont, "From ",
+                                              && !safe_strncmp (cont, "From ",
                                                                 5))))
     state_putc (' ', s);
 }
@@ -1626,7 +1626,7 @@ void autoview_handler (BODY * a, STATE * s)
     }
 
     if (thepid < 0) {
-      mutt_perror _("Can't create filter");
+      mutt_perror (_("Can't create filter"));
 
       if (s->flags & M_DISPLAY) {
         state_mark_attach (s);
@@ -1878,7 +1878,7 @@ void mutt_body_handler (BODY * b, STATE * s)
         handler = mutt_signed_handler;
     }
     else if ((WithCrypto & APPLICATION_PGP)
-             && mutt_strcasecmp ("encrypted", b->subtype) == 0) {
+             && safe_strcasecmp ("encrypted", b->subtype) == 0) {
       p = mutt_get_parameter ("protocol", b->parameter);
 
       if (!p)