]> granicus.if.org Git - mutt/commitdiff
Make _all_ IMAP-related code conditionally defined. From Byrial
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 22 Oct 1998 09:23:48 +0000 (09:23 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 22 Oct 1998 09:23:48 +0000 (09:23 +0000)
Jensen.

flags.c
lib.c
mx.c
mx.h

diff --git a/flags.c b/flags.c
index cd596b39cf5959999c4e763b9ac7ad6453b83de3..ccd5dc667a4f8a1f0bd75be11678e18b3c9bd564 100644 (file)
--- a/flags.c
+++ b/flags.c
@@ -46,12 +46,14 @@ void mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf)
       {
        h->deleted = 0;
        ctx->deleted--;
+#ifdef USE_IMAP
 /* if you undelete a message, the imap server will probably need to know. */
        if(ctx->magic==M_IMAP) 
        {
          h->changed = 1;
          ctx->changed = 1;
        }
+#endif
       }
       break;
 
diff --git a/lib.c b/lib.c
index f491c32ac1cb229090ae24bf63af51446f9ffd26..dddb45acdfff74f0ee39b36f65ac5cd7dd15f3c3 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -1154,7 +1154,9 @@ int mutt_save_confirm (const char *s, struct stat *st)
   }
   else
   {
+#ifdef USE_IMAP
     if (magic != M_IMAP)
+#endif /* execute the block unconditionally if we don't use imap */
     {
       st->st_mtime = 0;
       st->st_atime = 0;
diff --git a/mx.c b/mx.c
index f8b2c7275f00ec1a8f52a5d196457aea05437522..4f4d959470cd5bb1b47f51b22173103b60a97799 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -1104,8 +1104,8 @@ MESSAGE *mx_open_new_message (CONTEXT *dest, HEADER *hdr, int flags)
     if (dest->magic == M_MMDF)
       fputs (MMDF_SEP, msg->fp);
 
-    if ((msg->magic != M_MAILDIR) && ((msg->magic != M_MH) && msg->magic != M_IMAP) && 
-       (flags & M_ADD_FROM))
+    if ((msg->magic == M_MBOX || msg->magic ==  M_MMDF) &&
+       flags & M_ADD_FROM)
     {
       if (hdr)
       {
diff --git a/mx.h b/mx.h
index 2e31cd918daa64fbae265b57bb32492c5e6399aa..6501744c284ec917b54c35356bdba5632791ec7f 100644 (file)
--- a/mx.h
+++ b/mx.h
@@ -28,8 +28,10 @@ enum
   M_MBOX = 1,
   M_MMDF,
   M_MH,
-  M_MAILDIR,
-  M_IMAP
+  M_MAILDIR
+#ifdef USE_IMAP
+  , M_IMAP
+#endif
 };
 
 WHERE short DefaultMagic INITVAL (M_MBOX);