NeoMutt  2024-12-12-19-ge4b57e
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
message.h File Reference

A local copy of an email. More...

#include <stdbool.h>
#include <stdio.h>
#include <time.h>
+ Include dependency graph for message.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Message
 A local copy of an email. More...
 

Functions

void message_free (struct Message **ptr)
 Free a Message.
 
struct Messagemessage_new (void)
 Create a new Message.
 

Detailed Description

A local copy of an email.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file message.h.

Function Documentation

◆ message_free()

void message_free ( struct Message **  ptr)

Free a Message.

Parameters
ptrMessage to free

Definition at line 37 of file message.c.

38{
39 if (!ptr || !*ptr)
40 return;
41
42 struct Message *msg = *ptr;
43 FREE(&msg->path);
44 FREE(&msg->committed_path);
45
46 FREE(ptr);
47}
#define FREE(x)
Definition: memory.h:55
A local copy of an email.
Definition: message.h:34
char * path
path to temp file
Definition: message.h:36
char * committed_path
the final path generated by mx_msg_commit()
Definition: message.h:37
+ Here is the caller graph for this function:

◆ message_new()

struct Message * message_new ( void  )

Create a new Message.

Return values
ptrNew Message

Definition at line 53 of file message.c.

54{
55 return MUTT_MEM_CALLOC(1, struct Message);
56}
#define MUTT_MEM_CALLOC(n, type)
Definition: memory.h:40
+ Here is the caller graph for this function: