X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=handler.c;h=da10849406f5df4ab9b1ec86a3ee2317d1aeca83;hp=5df2b213548abbc93bcead3376bba1be2df2eb9b;hb=669e2b71f91e2bc8a1245068104bd8e163c449de;hpb=07ccefd6c97ddd433d8432f7b4596a5572e09b48 diff --git a/handler.c b/handler.c index 5df2b21..da10849 100644 --- a/handler.c +++ b/handler.c @@ -22,11 +22,9 @@ #include "keymap.h" #include "copy.h" #include "charset.h" -#include +#include "crypt.h" #include "state.h" #include "attach.h" -#include "lib.h" - typedef int handler_f (BODY *, STATE *); typedef handler_f *handler_t; @@ -1252,12 +1250,12 @@ void mutt_decode_attachment (BODY * b, STATE * s) const char *charset = parameter_getval(b->parameter, "charset"); if (!charset) - charset = charset_getfirst(AssumedCharset); - if (charset && Charset) - cd = mutt_iconv_open (Charset, charset, M_ICONV_HOOK_FROM); + charset = charset_getfirst(MCharset.assumed_charset); + if (charset && MCharset.charset) + cd = mutt_iconv_open (MCharset.charset, charset, M_ICONV_HOOK_FROM); } else { if (b->file_charset) - cd = mutt_iconv_open (Charset, b->file_charset, M_ICONV_HOOK_FROM); + cd = mutt_iconv_open (MCharset.charset, b->file_charset, M_ICONV_HOOK_FROM); } } @@ -1357,7 +1355,7 @@ int mutt_body_handler (BODY * b, STATE * s) if (!p) mutt_error(_("Error: multipart/encrypted has no protocol parameter!")); - else if (tok == MIME_APPLICATION_PGP_ENCRYPTED) + else if (mime_which_token(p, -1) == MIME_APPLICATION_PGP_ENCRYPTED) handler = crypt_pgp_encrypted_handler; } @@ -1385,7 +1383,7 @@ int mutt_body_handler (BODY * b, STATE * s) if (!plaintext) { /* decode to a tempfile, saving the original destination */ fp = s->fpout; - s->fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); + s->fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL); if (!s->fpout) { mutt_error _("Unable to open temporary file!"); goto bail;