#include <lib-lib/buffer.h>
#include <lib-lib/mapping.h>
+#include <lib-mime/mime.h>
+
#include "mutt.h"
#include "handler.h"
#include "enter.h"
#include "mx.h"
#include "keymap.h"
#include "copy.h"
-#include "mime.h"
#ifdef USE_IMAP
if (pat->op != M_HEADER) {
mutt_parse_mime_message (ctx, h);
- if (WithCrypto && (h->security & ENCRYPT)
- && !crypt_valid_passphrase (h->security)) {
+ if ((h->security & ENCRYPT) && !crypt_valid_passphrase (h->security))
+ {
mx_close_message (&msg);
if (fp) {
fclose (fp);
return NULL;
}
/* compile the sub-expression */
- buf = str_substrdup (ps.dptr + 1, p);
+ buf = p_dupstr(ps.dptr + 1, p - ps.dptr - 1);
if ((tmp = mutt_pattern_comp (buf, flags, err)) == NULL) {
p_delete(&buf);
mutt_pattern_free (&curlist);
int n, ...)
{
va_list ap;
- ADDRESS *a;
+ address_t *a;
va_start (ap, n);
for (; n; n--) {
- for (a = va_arg (ap, ADDRESS *); a; a = a->next) {
+ for (a = va_arg (ap, address_t *); a; a = a->next) {
if (pat->alladdr ^
((a->mailbox && patmatch (pat, a->mailbox) == 0) ||
(match_personal && a->personal &&
return 0;
}
-int mutt_is_list_recipient (int alladdr, ADDRESS * a1, ADDRESS * a2)
+int mutt_is_list_recipient (int alladdr, address_t * a1, address_t * a2)
{
for (; a1; a1 = a1->next)
if (alladdr ^ mutt_is_subscribed_list (a1))
return alladdr;
}
-int mutt_is_list_cc (int alladdr, ADDRESS * a1, ADDRESS * a2)
+int mutt_is_list_cc (int alladdr, address_t * a1, address_t * a2)
{
for (; a1; a1 = a1->next)
if (alladdr ^ mutt_is_mail_list (a1))
return alladdr;
}
-static int match_user (int alladdr, ADDRESS * a1, ADDRESS * a2)
+static int match_user (int alladdr, address_t * a1, address_t * a2)
{
for (; a1; a1 = a1->next)
if (alladdr ^ mutt_addr_is_user (a1))
case M_COLLAPSED:
return (pat->not ^ (h->collapsed && h->num_hidden > 1));
case M_CRYPT_SIGN:
- if (!WithCrypto)
- break;
return (pat->not ^ ((h->security & SIGN) ? 1 : 0));
case M_CRYPT_VERIFIED:
- if (!WithCrypto)
- break;
return (pat->not ^ ((h->security & GOODSIGN) ? 1 : 0));
case M_CRYPT_ENCRYPT:
- if (!WithCrypto)
- break;
return (pat->not ^ ((h->security & ENCRYPT) ? 1 : 0));
case M_PGP_KEY:
- if (!(WithCrypto & APPLICATION_PGP))
- break;
return (pat->not ^ ((h->security & APPLICATION_PGP)
&& (h->security & PGPKEY)));
case M_XLABEL: