X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=hook.c;fp=hook.c;h=0a8cc51fa6b5e04a4c0bb5010b5976bb6aab8792;hp=b81b9c86c08354d3c21c33d70adb65532d3a85a6;hb=20392fc3c433909de76c676c235524acd96bec60;hpb=16534e98723674fa391e3fc29d2a07ce419c13dd diff --git a/hook.c b/hook.c index b81b9c8..0a8cc51 100644 --- a/hook.c +++ b/hook.c @@ -88,8 +88,7 @@ int mutt_parse_hook (BUFFER * buf __attribute__ ((unused)), BUFFER * s, return (-1); } } - else if (DefaultHook && !(data & (M_CHARSETHOOK | M_ACCOUNTHOOK)) - && !(data & M_CRYPTHOOK)) + else if (DefaultHook && !(data & M_ACCOUNTHOOK) && !(data & M_CRYPTHOOK)) { char tmp[HUGE_STRING]; @@ -152,22 +151,15 @@ int mutt_parse_hook (BUFFER * buf __attribute__ ((unused)), BUFFER * s, else { rx = p_new(regex_t, 1); #ifdef M_CRYPTHOOK - if ((rc = - REGCOMP (rx, NONULL (pattern.data), - ((data & (M_CRYPTHOOK | M_CHARSETHOOK)) ? REG_ICASE : 0))) - != 0) -#else - if ((rc = - REGCOMP (rx, NONULL (pattern.data), - (data & (M_CHARSETHOOK | M_ICONVHOOK)) ? REG_ICASE : 0)) != - 0) -#endif /* M_CRYPTHOOK */ + if ((rc = REGCOMP(rx, NONULL(pattern.data), + ((data & M_CRYPTHOOK) ? REG_ICASE : 0))) != 0) { regerror (rc, rx, err->data, err->dsize); regfree (rx); p_delete(&rx); goto error; } +#endif /* M_CRYPTHOOK */ } if (ptr) { @@ -384,16 +376,6 @@ static const char *_mutt_string_hook (const char *match, int hook) return (NULL); } -const char *mutt_charset_hook (const char *chs) -{ - return _mutt_string_hook (chs, M_CHARSETHOOK); -} - -const char *mutt_iconv_hook (const char *chs) -{ - return _mutt_string_hook (chs, M_ICONVHOOK); -} - const char *mutt_crypt_hook (address_t * adr) { return _mutt_string_hook (adr->mailbox, M_CRYPTHOOK);