X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-mime%2Frfc2047.c;h=71bf5c7d708f2919955884d3ae70437db6c76da2;hb=c8c9a616c8c369da6aa06e656eacfb82af8707a8;hp=264caff2db57fb85fbba4715d0731ec6a8c0dd2a;hpb=3a3420a4cb3369d51eecc9287d556596f98e7314;p=apps%2Fmadmutt.git diff --git a/lib-mime/rfc2047.c b/lib-mime/rfc2047.c index 264caff..71bf5c7 100644 --- a/lib-mime/rfc2047.c +++ b/lib-mime/rfc2047.c @@ -73,7 +73,7 @@ convert_string(const char *from, const char *f, ssize_t flen, cd = mutt_iconv_open(to, from, 0); - if (cd == (iconv_t)(-1)) + if (cd == MUTT_ICONV_ERROR) return -1; obl = 4 * flen + 1; @@ -157,7 +157,7 @@ char *mutt_choose_charset(const char *fromcode, const char *charsets, p_delete(&res); } - mutt_canonical_charset(buf, sizeof(buf), tocode); + charset_canonicalize(buf, sizeof(buf), tocode); m_strreplace(&tocode, buf); } @@ -271,7 +271,7 @@ static size_t try_block(const char *d, ssize_t dlen, ssize_t ibl = dlen; iconv_t cd = mutt_iconv_open(tocode, fromcode, 0); - assert (cd != (iconv_t)(-1)); + assert (cd != MUTT_ICONV_ERROR); ob = buf1; @@ -338,7 +338,7 @@ encode_block(char *s, char *d, ssize_t dlen, if (fromcode) { cd = mutt_iconv_open(tocode, fromcode, 0); - assert (cd != (iconv_t) (-1)); + assert (cd != MUTT_ICONV_ERROR); ib = d, ibl = dlen, ob = buf1, obl = sizeof(buf1) - m_strlen(tocode); n1 = my_iconv(cd, &ib, &ibl, &ob, &obl); n2 = my_iconv(cd, 0, 0, &ob, &obl); @@ -452,7 +452,7 @@ static int rfc2047_encode(const char *d, ssize_t dlen, int col, } /* Hack to avoid labelling 8-bit data as us-ascii. */ - if (!icode && mutt_is_us_ascii(tocode)) + if (!icode && charset_is_us_ascii(tocode)) tocode = "unknown-8bit"; /* Adjust t0 for maximum length of line. */