From: Thomas Roessler Date: Wed, 20 Mar 2002 09:53:19 +0000 (+0000) Subject: Rename the new M_NEW by M_NEWFOLDER. There was another constant of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf6b7af7da06af5dd22af1dc4acc44e874090993;p=neomutt Rename the new M_NEW by M_NEWFOLDER. There was another constant of the same name. Problem noted by Will Yardley's compiler. --- diff --git a/editmsg.c b/editmsg.c index 19c4a2ebe..5149bb45f 100644 --- a/editmsg.c +++ b/editmsg.c @@ -65,7 +65,7 @@ static int edit_one_message (CONTEXT *ctx, HEADER *cur) omagic = DefaultMagic; DefaultMagic = M_MBOX; - rc = (mx_open_mailbox (tmp, M_NEW, &tmpctx) == NULL) ? -1 : 0; + rc = (mx_open_mailbox (tmp, M_NEWFOLDER, &tmpctx) == NULL) ? -1 : 0; DefaultMagic = omagic; diff --git a/mailbox.h b/mailbox.h index 0d6ce8438..4ac8e8dc0 100644 --- a/mailbox.h +++ b/mailbox.h @@ -24,7 +24,7 @@ #define M_APPEND (1<<1) /* open mailbox for appending messages */ #define M_READONLY (1<<2) /* open in read-only mode */ #define M_QUIET (1<<3) /* do not print any messages */ -#define M_NEW (1<<4) /* create a new folder - same as M_APPEND, but uses +#define M_NEWFOLDER (1<<4) /* create a new folder - same as M_APPEND, but uses * safe_fopen() for mbox-style folders. */ diff --git a/mx.c b/mx.c index d270c0e13..ad57c69dd 100644 --- a/mx.c +++ b/mx.c @@ -585,7 +585,7 @@ static int mx_open_mailbox_append (CONTEXT *ctx, int flags) { case M_MBOX: case M_MMDF: - if ((ctx->fp = safe_fopen (ctx->path, flags & M_NEW ? "w" : "a")) == NULL || + if ((ctx->fp = safe_fopen (ctx->path, flags & M_NEWFOLDER ? "w" : "a")) == NULL || mbox_lock_mailbox (ctx, 1, 1) != 0) { if (!ctx->fp) @@ -640,7 +640,7 @@ CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT *pctx) if (flags & M_READONLY) ctx->readonly = 1; - if (flags & (M_APPEND|M_NEW)) + if (flags & (M_APPEND|M_NEWFOLDER)) { if (mx_open_mailbox_append (ctx, flags) != 0) {