#include <lib-lib/lib-lib.h>
#include <lib-mime/mime.h>
-#include <lib-crypt/crypt.h>
#include <lib-ui/enter.h>
#include <lib-ui/curses.h>
#include <lib-mx/mx.h>
#include "pattern.h"
#include "alias.h"
+#include "crypt.h"
#include "handler.h"
#include "keymap.h"
#include "copy.h"
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);
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);
}
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)
}
}
-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];