#include "keymap.h"
#include "copy.h"
-
-#ifdef USE_IMAP
-#include "mx.h"
-#include "imap/imap.h"
-#endif
+#include <imap/imap.h>
#include <string.h>
#include <stdlib.h>
case M_BODY:
case M_HEADER:
case M_WHOLE_MSG:
-#ifdef USE_IMAP
/* IMAP search sets h->matched at search compile time */
if (ctx->magic == M_IMAP && pat->stringmatch)
return (h->matched);
-#endif
return (pat->not ^ msg_search (ctx, pat, h->msgno));
case M_SENDER:
return (pat->not ^ match_adrlist (pat, flags & M_MATCH_FULL_ADDRESS,
return (-1);
}
-#ifdef USE_IMAP
if (Context->magic == M_IMAP && imap_search (Context, pat) < 0)
return -1;
-#endif
mutt_message _("Executing command on matching messages...");
if (option (OPTSEARCHINVALID)) {
for (i = 0; i < Context->msgcount; i++)
Context->hdrs[i]->searched = 0;
-#ifdef USE_IMAP
if (Context->magic == M_IMAP && imap_search (Context, SearchPattern) < 0)
return -1;
-#endif
unset_option (OPTSEARCHINVALID);
}