diff options
author | Damien Riegel <damien@riegel.io> | 2016-05-25 15:53:07 -0700 |
---|---|---|
committer | Damien Riegel <damien@riegel.io> | 2016-05-25 15:53:07 -0700 |
commit | 802f2d765ded0df5a6e6789e9a55239efda84461 (patch) | |
tree | 48f13acdcbd661f9aaf2c94354942cd184ca501b /mh.c | |
parent | c97fcf569fc8e3ee773fa3e2bcdad09b97656a57 (diff) |
add open_new_msg operation to struct mx_ops
The code was already using a function pointer to do this operation. This
commit moves this function pointer to the mx_ops structure and the
open_new_message functions to their respective source files if it needs
to.
Diffstat (limited to 'mh.c')
-rw-r--r-- | mh.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1248,7 +1248,7 @@ static int mh_open_mailbox (CONTEXT *ctx) * Open a new (temporary) message in an MH folder. */ -int mh_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr) +static int mh_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr) { return mh_mkstemp (dest, &msg->fp, &msg->path); } @@ -1294,7 +1294,7 @@ static void maildir_flags (char *dest, size_t destlen, HEADER * hdr) * */ -int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr) +static int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr) { int fd; char path[_POSIX_PATH_MAX]; @@ -2361,9 +2361,11 @@ int mx_is_mh (const char *path) struct mx_ops mx_maildir_ops = { .open = maildir_open_mailbox, .close = mh_close_mailbox, + .open_new_msg = maildir_open_new_message, }; struct mx_ops mx_mh_ops = { .open = mh_open_mailbox, .close = mh_close_mailbox, + .open_new_msg = mh_open_new_message, }; |