force our cflags in subdirs as well.
[apps/madmutt.git] / rfc2047.c
index d4e7d6a..e173254 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -63,8 +63,8 @@ static size_t convert_string (const char *f, size_t flen,
     return (size_t) (-1);
   obl = 4 * flen + 1;
   ob = buf = mem_malloc (obl);
-  n = iconv (cd, &f, &flen, &ob, &obl);
-  if (n == (size_t) (-1) || iconv (cd, 0, 0, &ob, &obl) == (size_t) (-1)) {
+  n = my_iconv(cd, &f, &flen, &ob, &obl);
+  if (n == (size_t) (-1) || my_iconv(cd, 0, 0, &ob, &obl) == (size_t) (-1)) {
     e = errno;
     mem_free (&buf);
     iconv_close (cd);
@@ -230,8 +230,8 @@ static size_t try_block (const char *d, size_t dlen,
     cd = mutt_iconv_open (tocode, fromcode, 0);
     assert (cd != (iconv_t) (-1));
     ib = d, ibl = dlen, ob = buf1, obl = sizeof (buf1) - str_len (tocode);
-    if (iconv (cd, &ib, &ibl, &ob, &obl) == (size_t) (-1) ||
-        iconv (cd, 0, 0, &ob, &obl) == (size_t) (-1)) {
+    if (my_iconv(cd, &ib, &ibl, &ob, &obl) == (size_t) (-1) ||
+        my_iconv(cd, 0, 0, &ob, &obl) == (size_t) (-1)) {
       assert (errno == E2BIG);
       iconv_close (cd);
       assert (ib > d);
@@ -296,8 +296,8 @@ static size_t encode_block (char *s, char *d, size_t dlen,
     cd = mutt_iconv_open (tocode, fromcode, 0);
     assert (cd != (iconv_t) (-1));
     ib = d, ibl = dlen, ob = buf1, obl = sizeof (buf1) - str_len (tocode);
-    n1 = iconv (cd, &ib, &ibl, &ob, &obl);
-    n2 = iconv (cd, 0, 0, &ob, &obl);
+    n1 = my_iconv(cd, &ib, &ibl, &ob, &obl);
+    n2 = my_iconv(cd, 0, 0, &ob, &obl);
     assert (n1 != (size_t) (-1) && n2 != (size_t) (-1));
     iconv_close (cd);
     return (*encoder) (s, buf1, ob - buf1, tocode);
@@ -357,7 +357,7 @@ static int rfc2047_encode (const char *d, size_t dlen, int col,
   encoder_t encoder;
   char *tocode1 = 0;
   const char *tocode;
-  char *icode = "UTF-8";
+  const char *icode = "UTF-8";
 
   /* Try to convert to UTF-8. */
   if (convert_string (d, dlen, fromcode, icode, &u, &ulen)) {
@@ -520,7 +520,7 @@ void _rfc2047_encode_string (char **pd, int encode_specials, int col)
 {
   char *e;
   size_t elen;
-  char *charsets;
+  const char *charsets;
 
   if (!Charset || !*pd)
     return;