X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pattern.c;h=6bcda216c5310a944baa8c45557ef60d7893f216;hp=ea72544f65a08ea375d726133511560be1e82603;hb=7f591b58f859555c0eb573477f9ff179bfc46751;hpb=8e075eda08c6f099ec6988e16607fb4f6a10ba92 diff --git a/pattern.c b/pattern.c index ea72544..6bcda21 100644 --- a/pattern.c +++ b/pattern.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -18,6 +17,7 @@ #include "pattern.h" #include "alias.h" +#include "crypt.h" #include "handler.h" #include "keymap.h" #include "copy.h" @@ -141,7 +141,7 @@ msg_search (CONTEXT *ctx, pattern_t* pat, int msgno) p_clear(&s, 1); s.fpin = msg->fp; s.flags = M_CHARCONV; - s.fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); + s.fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL); if (!s.fpout) { mutt_error(_("Could not create temporary file")); return (0); @@ -152,17 +152,6 @@ msg_search (CONTEXT *ctx, pattern_t* pat, int msgno) if (pat->op != M_HEADER) { mutt_parse_mime_message (ctx, h); - - if ((h->security & ENCRYPT) && !crypt_valid_passphrase (h->security)) - { - mx_close_message (&msg); - if (fp) { - m_fclose(&fp); - unlink (tempfile); - } - return (0); - } - fseeko (msg->fp, h->offset, 0); mutt_body_handler (h->content, &s); } @@ -631,20 +620,16 @@ static const struct pattern_flags *lookup_tag (char tag) return NULL; } -static /* const */ char *find_matching_paren ( /* const */ char *s) +static const char *find_matching_paren (const char *s) { - int level = 1; - - for (; *s; s++) { - if (*s == '(') - level++; - else if (*s == ')') { - level--; - if (!level) - break; + int level = 1; + + for (; *s; s++) { + level += (*s == '(') - (*s == ')'); + if (!level) + break; } - } - return s; + return s; } pattern_t *mutt_pattern_comp(const char *s, int flags, BUFFER *err)