Signed-off-by: Pierre Habouzit <madcoder@debian.org>
dnl -- locales --
+AC_CHECK_HEADERS(locale.h)
AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(wctype.h)
AC_CHECK_FUNCS(iswalnum iswalpha iswcntrl iswdigit)
void mutt_delete_parameter (const char *attribute, PARAMETER ** p)
{
- PARAMETER *q;
+ while (*p) {
+ if (!ascii_strcasecmp(attribute, (*p)->attribute)) {
+ PARAMETER *q = parameter_list_pop(p);
+ parameter_delete(&q);
+ return;
+ }
- for (q = *p; q; p = &q->next, q = q->next) {
- if (ascii_strcasecmp (attribute, q->attribute) == 0) {
- *p = q->next;
- q->next = NULL;
- parameter_list_wipe(&q);
- return;
+ p = &(*p)->next;
}
- }
}
/* returns 1 if Mutt can't display this type of data, 0 otherwise */