X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pattern.c;h=c8dff191357eb263642ecf270b83f9c3f4f80324;hp=392a4a657a982b5708e3d3b225a2d71d3d8591cf;hb=6790552986464d9ad4be03f361a332441b0f08eb;hpb=1ee89902de184a640c171ae3285bff6882a791bd diff --git a/pattern.c b/pattern.c index 392a4a6..c8dff19 100644 --- a/pattern.c +++ b/pattern.c @@ -12,11 +12,11 @@ #include #include #include +#include #include "mutt.h" #include "alias.h" #include "handler.h" -#include "mx.h" #include "keymap.h" #include "copy.h" @@ -133,9 +133,9 @@ msg_search (CONTEXT *ctx, pattern_t* pat, int msgno) p_clear(&s, 1); s.fpin = msg->fp; s.flags = M_CHARCONV; - mutt_mktemp (tempfile); - if ((s.fpout = safe_fopen (tempfile, "w+")) == NULL) { - mutt_perror (tempfile); + s.fpout = m_tempfile(tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); + if (!s.fpout) { + mutt_error(_("Could not create temporary file")); return (0); } @@ -1141,7 +1141,7 @@ void mutt_check_simple (char *s, ssize_t len, const char *simple) m_strcpy(s, len, "~U"); else { quote_simple (tmp, sizeof (tmp), s); - mutt_expand_fmt (s, len, simple, tmp); + m_file_fmt(s, len, simple, tmp); } } }