X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=charset.c;h=1bc07952a32117b0e37a52d41c8f4d9265799e95;hb=590b3d82cd60994c06b2fae936008cdbc1a3611b;hp=0a9339fef6b48829539b9189fd0b026c1f4578a6;hpb=c3e57678c8be193fc137854020f3a90887be97c9;p=apps%2Fmadmutt.git diff --git a/charset.c b/charset.c index 0a9339f..1bc0795 100644 --- a/charset.c +++ b/charset.c @@ -25,6 +25,10 @@ #include "mutt.h" #include "charset.h" +#include "lib/mem.h" +#include "lib/intl.h" +#include "lib/str.h" + #ifndef EILSEQ # define EILSEQ EINVAL #endif @@ -331,7 +335,7 @@ size_t mutt_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft, for (t = inrepls; *t; t++) { ICONV_CONST char *ib1 = *t; - size_t ibl1 = strlen (*t); + size_t ibl1 = mutt_strlen (*t); char *ob1 = ob; size_t obl1 = obl; @@ -351,7 +355,7 @@ size_t mutt_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft, outrepl = "?"; iconv (cd, 0, 0, &ob, &obl); if (obl) { - int n = strlen (outrepl); + int n = mutt_strlen (outrepl); if (n > obl) { outrepl = "?"; @@ -402,7 +406,7 @@ int mutt_convert_string (char **ps, const char *from, const char *to, else outrepl = "?"; - len = strlen (s); + len = mutt_strlen (s); ib = s, ibl = len + 1; obl = MB_LEN_MAX * ibl; ob = buf = safe_malloc (obl + 1);