please, libidn has not changed in years now
[apps/madmutt.git] / state.c
diff --git a/state.c b/state.c
index 656f816..12f3e99 100644 (file)
--- a/state.c
+++ b/state.c
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <stdarg.h>
 
 #include "mutt.h"
 #include "state.h"
 #include "rfc3676.h"
 
-#include "lib/debug.h"
-
-static void state_prefix_put (const char *d, size_t dlen, STATE * s)
+static void state_prefix_put (const char *d, ssize_t dlen, STATE * s)
 {
   if (s->prefix)
     while (dlen--)
@@ -28,12 +27,12 @@ static void state_prefix_put (const char *d, size_t dlen, STATE * s)
     fwrite (d, dlen, 1, s->fpout);
 }
 
-void mutt_convert_to_state (iconv_t cd, char *bufi, size_t * l, STATE * s)
+void mutt_convert_to_state (iconv_t cd, char *bufi, ssize_t * l, STATE * s)
 {
   char bufo[BUFO_SIZE];
   const char *ib;
   char *ob;
-  size_t ibl, obl;
+  ssize_t ibl, obl;
 
   if (!bufi) {
     if (cd != (iconv_t) (-1)) {
@@ -77,9 +76,6 @@ void state_prefix_putc (char c, STATE * s)
       char buf[2 * SHORT_STRING];
       int j = 0, offset = 0;
       regmatch_t pmatch[1];
-#ifdef DEBUG
-      unsigned char save = '\0';
-#endif
 
       state_reset_prefix (s);
       while (regexec
@@ -101,15 +97,6 @@ void state_prefix_putc (char c, STATE * s)
       else
         snprintf (buf, sizeof (buf), "%s%s", NONULL (s->prefix), Quotebuf);
 
-#ifdef DEBUG
-      if (m_strlen(buf) >= 2) {
-        save = buf[m_strlen(buf) - 1];
-        buf[m_strlen(buf) - 1] = '\0';
-        debug_print (2, ("buf = '%s'\n", buf));
-        buf[m_strlen(buf)] = save;
-      }
-#endif
-
       state_puts (buf, s);
     }
   }