NeoMutt  2021-02-05-666-ge300cd
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 788 of file compress.c.

789 {
790  if (!m->compress_info)
791  return -1;
792 
793  struct CompressInfo *ci = m->compress_info;
794 
795  const struct MxOps *ops = ci->child_ops;
796  if (!ops)
797  return -1;
798 
799  /* Delegate */
800  return ops->msg_close(m, msg);
801 }
Private data for compress.
Definition: lib.h:46
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:124
int(* msg_close)(struct Mailbox *m, struct Message *msg)
Definition: mxapi.h:287
const struct MxOps * child_ops
callbacks of de-compressed file
Definition: lib.h:52
Definition: mxapi.h:103

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

2146 {
2147  return mutt_file_fclose(&msg->fp);
2148 }
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:153
FILE * fp
pointer to the message data
Definition: mxapi.h:43
+ 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 1563 of file maildir.c.

1564 {
1565  return mutt_file_fclose(&msg->fp);
1566 }
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:153
FILE * fp
pointer to the message data
Definition: mxapi.h:43
+ 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 1159 of file mh.c.

1160 {
1161  return mutt_file_fclose(&msg->fp);
1162 }
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:153
FILE * fp
pointer to the message data
Definition: mxapi.h:43
+ 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 1610 of file mbox.c.

1611 {
1612  if (msg->write)
1613  msg->fp = NULL;
1614  else
1615  mutt_file_fclose(&msg->fp);
1616 
1617  return 0;
1618 }
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:153
bool write
nonzero if message is open for writing
Definition: mxapi.h:46
FILE * fp
pointer to the message data
Definition: mxapi.h:43
+ 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 2701 of file nntp.c.

2702 {
2703  return mutt_file_fclose(&msg->fp);
2704 }
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:153
FILE * fp
pointer to the message data
Definition: mxapi.h:43
+ 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 2397 of file notmuch.c.

2398 {
2399  mutt_file_fclose(&(msg->fp));
2400  return 0;
2401 }
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:153
FILE * fp
pointer to the message data
Definition: mxapi.h:43
+ 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 1140 of file pop.c.

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