Move mbox operations that were done in mx_commit_message to a dedicated
mbox_commit_message function.
return 0;
}
+int mbox_commit_message (CONTEXT *ctx, MESSAGE *msg)
+{
+ int r = fputc ('\n', msg->fp);
+
+ if (r == EOF)
+ return -1;
+
+ return 0;
+}
+
static int mbox_open_new_message (MESSAGE *msg, CONTEXT *dest, HEADER *hdr)
{
msg->fp = dest->fp;
case MUTT_MBOX:
{
- if (fputc ('\n', msg->fp) == EOF)
- r = -1;
+ r = mbox_commit_message (ctx, msg);
break;
}
void mbox_unlock_mailbox (CONTEXT *);
int mbox_check_empty (const char *);
void mbox_reset_atime (CONTEXT *, struct stat *);
+int mbox_commit_message (CONTEXT *ctx, MESSAGE *msg);
int mh_sync_mailbox (CONTEXT *, int *);
int mh_check_empty (const char *);