]> granicus.if.org Git - neomutt/commitdiff
add maildir_commit_message function
authorDamien Riegel <damien.riegel@gmail.com>
Sat, 18 Jun 2016 20:36:19 +0000 (13:36 -0700)
committerDamien Riegel <damien.riegel@gmail.com>
Sat, 18 Jun 2016 20:36:19 +0000 (13:36 -0700)
This commit adds a maildir_commit_message with a prototype consistent
with other kind of mailboxes, to simplify upcoming refactoring.

mh.c
mx.c
mx.h

diff --git a/mh.c b/mh.c
index 5e997f1942021cd171f93c625dceab96d5026c9b..6038132fd2a0f70a063a5cea448f06147e28996b 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -1469,7 +1469,7 @@ static int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr
  * 
  */
 
-int _maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr)
+static int _maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr)
 {
   char subdir[4];
   char suffix[16];
@@ -1539,6 +1539,11 @@ int _maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr)
   }
 }
 
+int maildir_commit_message (CONTEXT * ctx, MESSAGE * msg)
+{
+  return _maildir_commit_message (ctx, msg, NULL);
+}
+
 /* 
  * commit a message to an MH folder.
  * 
diff --git a/mx.c b/mx.c
index c5416c702b7a4be6e08091a36aa84340fe51ea39..ecbc19595d590a436ee7befe103e173b3ae48a4b 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -1365,7 +1365,7 @@ int mx_commit_message (MESSAGE *msg, CONTEXT *ctx)
     
     case MUTT_MAILDIR:
     {
-      r = _maildir_commit_message (ctx, msg, NULL);
+      r = maildir_commit_message (ctx, msg);
       break;
     }
     
diff --git a/mx.h b/mx.h
index 2277268ea01eceb48b02ac55a1666720e085f675..e335d2068059569a174933260706af8c80588a53 100644 (file)
--- a/mx.h
+++ b/mx.h
@@ -57,7 +57,7 @@ int mh_check_empty (const char *);
 
 int maildir_check_empty (const char *);
 
-int _maildir_commit_message (CONTEXT *, MESSAGE *, HEADER *);
+int maildir_commit_message (CONTEXT *, MESSAGE *);
 int mh_commit_message (CONTEXT *, MESSAGE *);
 
 FILE *maildir_open_find_message (const char *, const char *);