X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=state.c;h=1d410171cb89187c6f9b2a8c7f8028aa04b98b0b;hp=4d4c19ae150845522322a08632e6992cf8f7d889;hb=916e4872caf252a5850e64f79427b9dd7808435d;hpb=40fc05e11b8f95a9661e6e410a9e7b7da7824891 diff --git a/state.c b/state.c index 4d4c19a..1d41017 100644 --- a/state.c +++ b/state.c @@ -6,18 +6,13 @@ * It's licensed under the GNU General Public License, * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -#include "config.h" -#endif -#include -#include +#include -#include +#include #include "mutt.h" #include "state.h" -#include "rfc3676.h" static void state_prefix_put (const char *d, ssize_t dlen, STATE * s) { @@ -36,7 +31,7 @@ void mutt_convert_to_state (iconv_t cd, char *bufi, ssize_t * l, STATE * s) ssize_t ibl, obl; if (!bufi) { - if (cd != (iconv_t) (-1)) { + if (cd != MUTT_ICONV_ERROR) { ob = bufo, obl = sizeof (bufo); my_iconv(cd, 0, 0, &ob, &obl); if (ob != bufo) @@ -47,7 +42,7 @@ void mutt_convert_to_state (iconv_t cd, char *bufi, ssize_t * l, STATE * s) return; } - if (cd == (iconv_t) (-1)) { + if (cd == MUTT_ICONV_ERROR) { state_prefix_put (bufi, *l, s); *l = 0; return; @@ -77,9 +72,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 +93,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); } }