From: Damien Riegel Date: Sat, 18 Jun 2016 20:36:19 +0000 (-0700) Subject: add maildir_commit_message function X-Git-Tag: neomutt-20160822~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07cca2a320c3038af0c81ebf17294c8b108ff00f;p=neomutt add maildir_commit_message function This commit adds a maildir_commit_message with a prototype consistent with other kind of mailboxes, to simplify upcoming refactoring. --- diff --git a/mh.c b/mh.c index 5e997f194..6038132fd 100644 --- 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 c5416c702..ecbc19595 100644 --- 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 2277268ea..e335d2068 100644 --- 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 *);