NeoMutt  2024-04-25-85-g27bab4
Teaching an old dog new tricks
No Matches
mdemail.h File Reference

Maildir Email helper. More...

#include <stdbool.h>
#include <sys/types.h>
#include "mutt/lib.h"
+ Include dependency graph for mdemail.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MdEmail
 A Maildir Email helper. More...


 ARRAY_HEAD (MdEmailArray, struct MdEmail *)
void maildir_entry_free (struct MdEmail **ptr)
 Free a Maildir object.
struct MdEmailmaildir_entry_new (void)
 Create a new Maildir entry.
void maildirarray_clear (struct MdEmailArray *mda)
 Free a Maildir array.

Detailed Description

Maildir Email helper.

  • 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

Definition in file mdemail.h.

Function Documentation


ARRAY_HEAD ( MdEmailArray  ,
struct MdEmail  

◆ maildir_entry_free()

void maildir_entry_free ( struct MdEmail **  ptr)

Free a Maildir object.

[out]ptrMaildir to free

Definition at line 48 of file mdemail.c.

50 if (!ptr || !*ptr)
51 return;
53 struct MdEmail *md = *ptr;
54 FREE(&md->canon_fname);
55 email_free(&md->email);
57 FREE(ptr);
void email_free(struct Email **ptr)
Free an Email.
Definition: email.c:46
#define FREE(x)
Definition: memory.h:45
A Maildir Email helper.
Definition: mdemail.h:34
char * canon_fname
Canonical filename for hashing.
Definition: mdemail.h:36
struct Email * email
Temporary Email.
Definition: mdemail.h:35
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maildir_entry_new()

struct MdEmail * maildir_entry_new ( void  )

Create a new Maildir entry.

Return values
ptrNew Maildir entry

Definition at line 39 of file mdemail.c.

41 return mutt_mem_calloc(1, sizeof(struct MdEmail));
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:51
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maildirarray_clear()

void maildirarray_clear ( struct MdEmailArray *  mda)

Free a Maildir array.

[out]mdaMaildir array to free

Definition at line 64 of file mdemail.c.

66 if (!mda)
67 return;
69 struct MdEmail **mdp = NULL;
70 ARRAY_FOREACH(mdp, mda)
71 {
73 }
75 ARRAY_FREE(mda);
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
Definition: array.h:212
#define ARRAY_FREE(head)
Release all memory.
Definition: array.h:204
void maildir_entry_free(struct MdEmail **ptr)
Free a Maildir object.
Definition: mdemail.c:48
+ Here is the call graph for this function:
+ Here is the caller graph for this function: