Previous function called mutt_matches_ignore is now mutt_matches_list.
mutt_matches_ignore now calls mutt_matches_list on Ignored and UnIgnored.
Naming is now consistent with functionality; simplified mutt_matches_ignore()
call makes writing correct conditionals easier.
Fixed invocations in parse.c, copy.c, and url.c
/* note: CH_FROM takes precedence over header weeding. */
if (!((flags & CH_FROM) && (flags & CH_FORCE_FROM) && this_is_from) &&
- (flags & CH_WEED) &&
- mutt_matches_ignore (buf, Ignore) &&
- !mutt_matches_ignore (buf, UnIgnore))
+ (flags & CH_WEED) && mutt_matches_ignore (buf))
continue;
if ((flags & CH_WEED_DELIVERED) &&
ascii_strncasecmp ("Delivered-To:", buf, 13) == 0)
void mutt_free_rx_list (RX_LIST **);
void mutt_free_spam_list (SPAM_LIST **);
LIST *mutt_copy_list (LIST *);
-int mutt_matches_ignore (const char *, LIST *);
+int mutt_matches_ignore (const char *);
+int mutt_matches_list (const char *, LIST *);
/* add an element to a list */
LIST *mutt_add_list (LIST *, const char *);
}
/* returns true if the header contained in "s" is in list "t" */
-int mutt_matches_ignore (const char *s, LIST *t)
+int mutt_matches_list (const char *s, LIST *t)
{
for (; t; t = t->next)
{
return 0;
}
+/* checks Ignore and UnIgnore using mutt_matches_list */
+int mutt_matches_ignore (const char *s)
+{
+ return mutt_matches_list (s, Ignore) && !mutt_matches_list (s, UnIgnore);
+}
+
/* prepend the path part of *path to *link */
void mutt_expand_link (char *newpath, const char *path, const char *link)
{
/* restore the original line */
line[strlen (line)] = ':';
- if (weed && option (OPTWEED) && mutt_matches_ignore (line, Ignore)
- && !mutt_matches_ignore (line, UnIgnore))
+ if (weed && option (OPTWEED) && mutt_matches_ignore (line))
goto done;
if (last)
* choose to create a message with only a subset of the headers given in
* the URL.
*/
- if (mutt_matches_ignore(tag, MailtoAllow))
+ if (mutt_matches_list (tag, MailtoAllow))
{
if (!ascii_strcasecmp (tag, "body"))
{