X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mime%2Frfc2231.c;h=bf05bef9b8400dfaa6b4258da34a4d79b77b1d89;hp=1d53c8e38e86bec8530b90fbb32f04ffe57ba0aa;hb=49081299c673ceebc38d9a4f0985608cb3aecfce;hpb=a743b55a20cbf3a33699fdb24dcb8638e878cc46 diff --git a/lib-mime/rfc2231.c b/lib-mime/rfc2231.c index 1d53c8e..bf05bef 100644 --- a/lib-mime/rfc2231.c +++ b/lib-mime/rfc2231.c @@ -47,6 +47,7 @@ #include #include "charset.h" +#include "mutt.h" typedef struct rfc2231_param { struct rfc2231_param *next; @@ -141,7 +142,7 @@ static void purge_empty_parameters(PARAMETER **headp) if (!p->attribute || !p->value) { *headp = p->next; p->next = NULL; - mutt_free_parameter(&p); + parameter_list_wipe(&p); } else { headp = &(*headp)->next; } @@ -193,7 +194,7 @@ rfc2231_join_continuations(PARAMETER **head, rfc2231_param *par) if (value) { if (encoded) mutt_convert_string (&value, charset, Charset, M_ICONV_HOOK_FROM); - *head = mutt_new_parameter (); + *head = parameter_new(); (*head)->attribute = m_strdup(attribute); (*head)->value = value; head = &(*head)->next; @@ -220,9 +221,7 @@ void rfc2231_decode_parameters (PARAMETER ** headp) int encoded; int idx; - short dirty = 0; /* set to 1 when we may have created - * empty parameters. - */ + short dirty = 0; /* 1 when we may have created empty parameters. */ if (!headp) return; @@ -244,8 +243,8 @@ void rfc2231_decode_parameters (PARAMETER ** headp) if (option (OPTRFC2047PARAMS) && p->value && strstr (p->value, "=?")) rfc2047_decode (&p->value); else if (!option (OPTSTRICTMIME)) { - if (ascii_strcasecmp (AssumedCharset, "us-ascii")) - mutt_convert_nonmime_string (&p->value); + if (mime_which_token(AssumedCharset, -1) == MIME_US_ASCII) + mutt_convert_nonmime_string(&p->value); } *last = p;