NeoMutt  2022-04-29-247-gc6aae8
Teaching an old dog new tricks
DOXYGEN
msg_close()

Close an email. More...

+ Collaboration diagram for msg_close():

Functions

static int comp_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
int imap_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
int maildir_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
int mh_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int mbox_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int nntp_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int nm_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int pop_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 

Detailed Description

Close an email.

Parameters
mMailbox
msgMessage to close
Return values
0Success
-1Failure

Contract

Function Documentation

◆ comp_msg_close()

static int comp_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Definition at line 794 of file compress.c.

795{
796 if (!m->compress_info)
797 return -1;
798
799 struct CompressInfo *ci = m->compress_info;
800
801 const struct MxOps *ops = ci->child_ops;
802 if (!ops)
803 return -1;
804
805 /* Delegate */
806 return ops->msg_close(m, msg);
807}
Private data for compress.
Definition: lib.h:47
const struct MxOps * child_ops
callbacks of de-compressed file
Definition: lib.h:52
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:120
Definition: mxapi.h:112
int(* msg_close)(struct Mailbox *m, struct Message *msg)
Definition: mxapi.h:295

◆ imap_msg_close()

int imap_msg_close ( struct Mailbox m,
struct Message msg 
)

Close an email - Implements MxOps::msg_close() -.

Note
May also return EOF Failure, see errno

Definition at line 2181 of file message.c.

2182{
2183 return mutt_file_fclose(&msg->fp);
2184}
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:152
FILE * fp
pointer to the message data
Definition: mxapi.h:44
+ Here is the call graph for this function:

◆ maildir_msg_close()

int maildir_msg_close ( struct Mailbox m,
struct Message msg 
)

Close an email - Implements MxOps::msg_close() -.

Note
May also return EOF Failure, see errno

Definition at line 1561 of file maildir.c.

1562{
1563 return mutt_file_fclose(&msg->fp);
1564}
+ Here is the call graph for this function:

◆ mh_msg_close()

int mh_msg_close ( struct Mailbox m,
struct Message msg 
)

Close an email - Implements MxOps::msg_close() -.

Note
May also return EOF Failure, see errno

Definition at line 1166 of file mh.c.

1167{
1168 return mutt_file_fclose(&msg->fp);
1169}
+ Here is the call graph for this function:

◆ mbox_msg_close()

static int mbox_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Definition at line 1620 of file mbox.c.

1621{
1622 if (msg->write)
1623 msg->fp = NULL;
1624 else
1625 mutt_file_fclose(&msg->fp);
1626
1627 return 0;
1628}
bool write
nonzero if message is open for writing
Definition: mxapi.h:47
+ Here is the call graph for this function:

◆ nntp_msg_close()

static int nntp_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Note
May also return EOF Failure, see errno

Definition at line 2693 of file nntp.c.

2694{
2695 return mutt_file_fclose(&msg->fp);
2696}
+ Here is the call graph for this function:

◆ nm_msg_close()

static int nm_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Definition at line 2371 of file notmuch.c.

2372{
2373 mutt_file_fclose(&(msg->fp));
2374 return 0;
2375}
+ Here is the call graph for this function:

◆ pop_msg_close()

static int pop_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Return values
0Success
EOFError, see errno

Definition at line 1132 of file pop.c.

1133{
1134 return mutt_file_fclose(&msg->fp);
1135}
+ Here is the call graph for this function: