X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pattern.c;h=1eee48c52b2857192de268e47db1e551077755e9;hp=de4efb4436c05c6a286d9c238ede9077d118c6a5;hb=3fb238bec424fbc43ebe3a50eca3c84ea7bedf6a;hpb=8476307969a605bea67f6b702b0c1e7a52038bed diff --git a/pattern.c b/pattern.c index de4efb4..1eee48c 100644 --- a/pattern.c +++ b/pattern.c @@ -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); } @@ -149,7 +149,7 @@ msg_search (CONTEXT *ctx, pattern_t* pat, int msgno) { mx_close_message (&msg); if (fp) { - fclose (fp); + m_fclose(&fp); unlink (tempfile); } return (0); @@ -200,7 +200,7 @@ msg_search (CONTEXT *ctx, pattern_t* pat, int msgno) mx_close_message (&msg); if (option (OPTTHOROUGHSRC)) { - fclose (fp); + m_fclose(&fp); unlink (tempfile); } } @@ -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); } } }