NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
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() -.
 
int imap_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
int maildir_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int mbox_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int mh_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int nntp_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int nm_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int pop_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 

Detailed Description

Close an email.

Parameters
mMailbox
msgMessage to close
Return values
0Success
-1Failure
Precondition
m is not NULL
msg is not NULL

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 774 of file compress.c.

775{
776 if (!m->compress_info)
777 return -1;
778
779 struct CompressInfo *ci = m->compress_info;
780
781 const struct MxOps *ops = ci->child_ops;
782 if (!ops)
783 return -1;
784
785 /* Delegate */
786 return ops->msg_close(m, msg);
787}
Private data for compress.
Definition lib.h:61
const struct MxOps * child_ops
callbacks of de-compressed file
Definition lib.h:66
void * compress_info
Compressed mbox module private data.
Definition mailbox.h:120
Definition mxapi.h:87
int(* msg_close)(struct Mailbox *m, struct Message *msg)
Definition mxapi.h:258

◆ 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 2203 of file message.c.

2204{
2205 return mutt_file_fclose(&msg->fp);
2206}
#define mutt_file_fclose(FP)
Definition file.h:139
FILE * fp
pointer to the message data
Definition message.h:35

◆ 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 638 of file message.c.

639{
640 return mutt_file_fclose(&msg->fp);
641}

◆ 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 1514 of file mbox.c.

1515{
1516 if (msg->write)
1517 msg->fp = NULL;
1518 else
1519 mutt_file_fclose(&msg->fp);
1520
1521 return 0;
1522}
bool write
nonzero if message is open for writing
Definition message.h:38

◆ mh_msg_close()

static int mh_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 1179 of file mh.c.

1180{
1181 return mutt_file_fclose(&msg->fp);
1182}

◆ 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 2775 of file nntp.c.

2776{
2777 return mutt_file_fclose(&msg->fp);
2778}

◆ 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 2444 of file notmuch.c.

2445{
2446 mutt_file_fclose(&(msg->fp));
2447 return 0;
2448}

◆ 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 1136 of file pop.c.

1137{
1138 return mutt_file_fclose(&msg->fp);
1139}