# HG changeset patch
# User Damien Riegel <[email protected]>
# Date 1462397783 14400
#      Wed May 04 17:36:23 2016 -0400
# Node ID 2587d69eddd66e623c4f82c5099cdf4a49bb5315
# Parent  693f6409278341aaa5cdb66fb50e73f5714682ac
rename mbox_close_mailbox to mx_close_mailbox_append and move it

mbox_close_mailbox was used as the counterpart of
mx_open_mailbox_append. To make things clearer, rename it
mx_close_mailbox_append.

As it is only used in mx.c, move it there and make it static.

diff -r 693f64092783 -r 2587d69eddd6 mbox.c
--- a/mbox.c    Wed May 04 15:57:42 2016 -0400
+++ b/mbox.c    Wed May 04 17:36:23 2016 -0400
@@ -1069,15 +1069,6 @@
   return rc;
 }
 
-/* close a mailbox opened in write-mode */
-int mbox_close_mailbox (CONTEXT *ctx)
-{
-  mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
-  mutt_unblock_signals ();
-  mx_fastclose_mailbox (ctx);
-  return 0;
-}
-
 int mutt_reopen_mailbox (CONTEXT *ctx, int *index_hint)
 {
   int (*cmp_headers) (const HEADER *, const HEADER *) = NULL;
diff -r 693f64092783 -r 2587d69eddd6 mx.c
--- a/mx.c      Wed May 04 15:57:42 2016 -0400
+++ b/mx.c      Wed May 04 17:36:23 2016 -0400
@@ -572,6 +572,15 @@
   return 0;
 }
 
+/* close a mailbox opened in write-mode */
+static int mx_close_mailbox_append (CONTEXT *ctx)
+{
+  mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
+  mutt_unblock_signals ();
+  mx_fastclose_mailbox (ctx);
+  return 0;
+}
+
 /*
  * open a mailbox and parse it
  *
@@ -801,7 +810,7 @@
   {
     /* mailbox was opened in write-mode */
     if (ctx->magic == MUTT_MBOX || ctx->magic == MUTT_MMDF)
-      mbox_close_mailbox (ctx);
+      mx_close_mailbox_append (ctx);
     else
       mx_fastclose_mailbox (ctx);
     return 0;
diff -r 693f64092783 -r 2587d69eddd6 mx.h
--- a/mx.h      Wed May 04 15:57:42 2016 -0400
+++ b/mx.h      Wed May 04 17:36:23 2016 -0400
@@ -46,7 +46,6 @@
 int mbox_sync_mailbox (CONTEXT *, int *);
 int mbox_open_mailbox (CONTEXT *);
 int mbox_check_mailbox (CONTEXT *, int *);
-int mbox_close_mailbox (CONTEXT *);
 int mbox_lock_mailbox (CONTEXT *, int, int);
 int mbox_parse_mailbox (CONTEXT *);
 int mmdf_parse_mailbox (CONTEXT *);

Reply via email to