* To append to a compressed mailbox we need an append-hook (or both open- and
* close-hooks).
*/
-static int comp_mbox_open_append(struct Context *ctx, int flags)
+static int comp_mbox_open_append(struct Mailbox *m, int flags)
{
- if (!ctx)
- return -1;
-
- struct Mailbox *m = ctx->mailbox;
if (!m)
return -1;
goto cmoa_fail2;
}
- if (ci->child_ops->mbox_open_append(ctx, flags) != 0)
+ if (ci->child_ops->mbox_open_append(m, flags) != 0)
goto cmoa_fail2;
return 0;
/**
* imap_mbox_open_append - Implements MxOps::mbox_open_append()
*/
-static int imap_mbox_open_append(struct Context *ctx, int flags)
+static int imap_mbox_open_append(struct Mailbox *m, int flags)
{
- if (!ctx)
- return -1;
-
- struct Mailbox *m = ctx->mailbox;
if (!m)
return -1;
/**
* maildir_mbox_open_append - Implements MxOps::mbox_open_append()
*/
-static int maildir_mbox_open_append(struct Context *ctx, int flags)
+static int maildir_mbox_open_append(struct Mailbox *m, int flags)
{
- if (!ctx)
- return -1;
-
- struct Mailbox *m = ctx->mailbox;
if (!m)
return -1;
/**
* mh_mbox_open_append - Implements MxOps::mbox_open_append()
*/
-static int mh_mbox_open_append(struct Context *ctx, int flags)
+static int mh_mbox_open_append(struct Mailbox *m, int flags)
{
- if (!ctx)
- return -1;
-
- struct Mailbox *m = ctx->mailbox;
if (!m)
return -1;
/**
* mbox_mbox_open_append - Implements MxOps::mbox_open_append()
*/
-static int mbox_mbox_open_append(struct Context *ctx, int flags)
+static int mbox_mbox_open_append(struct Mailbox *m, int flags)
{
- if (!ctx)
- return -1;
-
- struct Mailbox *m = ctx->mailbox;
if (!m)
return -1;
if (!m->mx_ops || !m->mx_ops->mbox_open_append)
return -1;
- return m->mx_ops->mbox_open_append(ctx, flags);
+ return m->mx_ops->mbox_open_append(ctx->mailbox, flags);
}
/**
int (*mbox_open) (struct Context *ctx);
/**
* mbox_open_append - Open a mailbox for appending
- * @param ctx Mailbox to open
+ * @param m Mailbox to open
* @param flags e.g. #MUTT_READONLY
* @retval 0 Success
* @retval -1 Failure
*/
- int (*mbox_open_append)(struct Context *ctx, int flags);
+ int (*mbox_open_append)(struct Mailbox *m, int flags);
/**
* mbox_check - Check for new mail
* @param ctx Mailbox