if (!p->attribute || !p->value) {
*headp = p->next;
p->next = NULL;
- mutt_free_parameter(&p);
+ parameter_delete(&p);
} else {
headp = &(*headp)->next;
}
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;
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;
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;