From: Damien Riegel Date: Sat, 18 Jun 2016 20:36:19 +0000 (-0700) Subject: add maildir_commit_message function X-Git-Tag: mutt-1-7-rel~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c626413306ef5214a8d2c1758d8b17d7e653f37;p=mutt 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 5e997f19..6038132f 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 c5416c70..ecbc1959 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 2277268e..e335d206 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 *);