X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mime%2Frfc2231.c;h=e1eec1e6c1100c373e41052e4fa1bcbef3cdbce3;hp=3f194066025a5d8884592f7b59b43f136f3708c4;hb=108f3c7ab59844591f7540347914ea57be5245e2;hpb=c660c8cbae7f647c637502779862e4a36ad6a074 diff --git a/lib-mime/rfc2231.c b/lib-mime/rfc2231.c index 3f19406..e1eec1e 100644 --- a/lib-mime/rfc2231.c +++ b/lib-mime/rfc2231.c @@ -47,7 +47,6 @@ #include #include "charset.h" -#include "rfc2047.h" typedef struct rfc2231_param { struct rfc2231_param *next; @@ -142,7 +141,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; } @@ -194,7 +193,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; @@ -221,9 +220,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; @@ -245,8 +242,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; @@ -307,7 +304,7 @@ int rfc2231_encode_string(char **s) char *charset = NULL; char *e, *p, *t, *d = NULL; int escapes = 0; - size_t dlen = 0; + ssize_t dlen = 0; /* * A shortcut to detect pure 7bit data.