]> granicus.if.org Git - neomutt/commitdiff
Fix charset-hook.
authorEdmund GRIMLEY EVANS <edmundo@rano.org>
Fri, 31 May 2002 16:58:55 +0000 (16:58 +0000)
committerEdmund GRIMLEY EVANS <edmundo@rano.org>
Fri, 31 May 2002 16:58:55 +0000 (16:58 +0000)
charset.c
charset.h
sendlib.c

index 38b6edbd55646d8165cddcd9a8943db6e3b8c663..86e7a3c7c1ff423fad26b788073fa86270e1747c 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -314,8 +314,12 @@ iconv_t mutt_iconv_open (const char *tocode, const char *fromcode, int flags)
   iconv_t cd;
   
   mutt_canonical_charset (tocode1, sizeof (tocode1), tocode);
+
+#ifdef M_ICONV_HOOK_TO
+  /* Not used. */
   if ((flags & M_ICONV_HOOK_TO) && (tmp = mutt_charset_hook (tocode1)))
     mutt_canonical_charset (tocode1, sizeof (tocode1), tmp);
+#endif
 
   mutt_canonical_charset (fromcode1, sizeof (fromcode1), fromcode);
   if ((flags & M_ICONV_HOOK_FROM) && (tmp = mutt_charset_hook (fromcode1)))
index 09f6afb5cfc17effa175c3a99c9c1226227351cd..fa2f20e5cabb7f95529bf247ab7bb3ba3495a9ec 100644 (file)
--- a/charset.h
+++ b/charset.h
@@ -36,6 +36,8 @@ void fgetconv_close (FGETCONV **);
 void mutt_set_langinfo_charset (void);
 
 #define M_ICONV_HOOK_FROM 1
+#if 0
 #define M_ICONV_HOOK_TO   2
+#endif
 
 #endif /* _CHARSET_H */
index 64a870609f736eec3cebc956e6215fbcca352408..2a16002de383ded8d7c276fd813fdb514f68ccf9 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -507,7 +507,7 @@ int mutt_write_mime_body (BODY *a, FILE *f)
   if (a->type == TYPETEXT && (!a->noconv))
     fc = fgetconv_open (fpin, Charset, 
                        mutt_get_body_charset (send_charset, sizeof (send_charset), a),
-                       M_ICONV_HOOK_TO);
+                       0);
   else
     fc = fgetconv_open (fpin, 0, 0, 0);
 
@@ -694,7 +694,7 @@ static size_t convert_file_to (FILE *file, const char *fromcode,
   CONTENT_STATE *states;
   size_t *score;
 
-  cd1 = mutt_iconv_open ("UTF-8", fromcode, M_ICONV_HOOK_FROM);
+  cd1 = mutt_iconv_open ("UTF-8", fromcode, 0);
   if (cd1 == (iconv_t)(-1))
     return -1;