From fc10f2d372e6a612daed15049d75912f70348d53 Mon Sep 17 00:00:00 2001 From: Edmund GRIMLEY EVANS Date: Fri, 31 May 2002 16:58:55 +0000 Subject: [PATCH] Fix charset-hook. --- charset.c | 4 ++++ charset.h | 2 ++ sendlib.c | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/charset.c b/charset.c index 38b6edbd5..86e7a3c7c 100644 --- 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))) diff --git a/charset.h b/charset.h index 09f6afb5c..fa2f20e5c 100644 --- 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 */ diff --git a/sendlib.c b/sendlib.c index 64a870609..2a16002de 100644 --- 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; -- 2.40.0