X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pattern.c;h=7744e95222278cc3d25fa9a49945ebdb9c9fb17d;hp=594beda68fc52477c1cd86291a88483a185945a3;hb=0afd88891b641bb01d18f0e39890f5e460a0c02f;hpb=c76ab67f3430e67b14b381bc1e3a23a14a4053b8 diff --git a/pattern.c b/pattern.c index 594beda..7744e95 100644 --- a/pattern.c +++ b/pattern.c @@ -10,14 +10,14 @@ #include #include -#include #include -#include +#include #include #include #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(mod_core.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); } @@ -395,8 +384,8 @@ static const char *get_offset (struct tm *tm, const char *s, int sign) default: return s; } - mutt_normalize_time (tm); - return (ps + 1); + mktime(tm); + return ps + 1; } static void adjust_date_range (struct tm *min, struct tm *max) @@ -613,8 +602,8 @@ static int eat_date (pattern_t * pat, BUFFER * s, BUFFER * err) /* Since we allow two dates to be specified we'll have to adjust that. */ adjust_date_range (&min, &max); - pat->min = mutt_mktime (&min, 1); - pat->max = mutt_mktime (&max, 1); + pat->min = mktime(&min); + pat->max = mktime(&max); p_delete(&buffer.data); @@ -1125,7 +1114,7 @@ void mutt_check_simple (char *s, ssize_t len, const char *simple) } } -int mutt_pattern_func (int op, char *prompt) +int mutt_pattern_func (int op, const char *prompt) { pattern_t *pat; char buf[LONG_STRING] = "", *simple, error[STRING];