From 5a9158ac64e3062b5bc6e7af4b174cbe20364d24 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 20 Mar 2002 09:53:19 +0000 Subject: [PATCH] Rename the new M_NEW by M_NEWFOLDER. There was another constant of the same name. Problem noted by Will Yardley's compiler. --- editmsg.c | 2 +- mailbox.h | 2 +- mx.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editmsg.c b/editmsg.c index 19c4a2eb..5149bb45 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 0d6ce843..4ac8e8dc 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 d270c0e1..ad57c69d 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) { -- 2.40.0