X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=hook.c;h=674777109ed5679934dcca2a6507b66582d4b454;hb=9468c36e7656e50a91f759e3f5498b7f86dbec30;hp=9bb2386310441005aab71e600173fdedf7438dfd;hpb=1ee89902de184a640c171ae3285bff6882a791bd;p=apps%2Fmadmutt.git diff --git a/hook.c b/hook.c index 9bb2386..6747771 100644 --- a/hook.c +++ b/hook.c @@ -9,12 +9,12 @@ #include #include +#include +#include +#include -#include "mutt.h" #include "alias.h" -#include "mx.h" -#include -#include "compress.h" +#include "pattern.h" #define ERROR_STOP 0 @@ -105,7 +105,7 @@ int mutt_parse_hook (BUFFER * buf __attribute__ ((unused)), BUFFER * s, /* check to make sure that a matching hook doesn't already exist */ for (ptr = Hooks; ptr; ptr = ptr->next) { - if (ptr->type == data && + if (ptr->type == (int)data && ptr->rx.not == not && !m_strcmp(pattern.data, ptr->rx.pattern)) { if (data & (M_FOLDERHOOK | M_SENDHOOK | M_SEND2HOOK | M_MESSAGEHOOK | @@ -192,7 +192,7 @@ static void delete_hook (HOOK * h) if (h->rx.rx) { regfree (h->rx.rx); } - mutt_pattern_free (&h->pattern); + pattern_list_wipe(&h->pattern); p_delete(&h); }