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

Mh Email helper. More...

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

Go to the source code of this file.

Data Structures

struct  MhEmail
 A Mh Email helper. More...


 ARRAY_HEAD (MhEmailArray, struct MhEmail *)
void mharray_clear (struct MhEmailArray *mha)
 Free a Mh array.
void mh_entry_free (struct MhEmail **ptr)
 Free a Mh object.
struct MhEmailmh_entry_new (void)
 Create a new Mh entry.

Detailed Description

Mh 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 mhemail.h.

Function Documentation


ARRAY_HEAD ( MhEmailArray  ,
struct MhEmail  

◆ mharray_clear()

void mharray_clear ( struct MhEmailArray *  mha)

Free a Mh array.

[out]mhaMh array to free

Definition at line 64 of file mhemail.c.

66 if (!mha)
67 return;
69 struct MhEmail **mdp = NULL;
70 ARRAY_FOREACH(mdp, mha)
71 {
72 mh_entry_free(mdp);
73 }
75 ARRAY_FREE(mha);
#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 mh_entry_free(struct MhEmail **ptr)
Free a Mh object.
Definition: mhemail.c:48
A Mh Email helper.
Definition: mhemail.h:36
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mh_entry_free()

void mh_entry_free ( struct MhEmail **  ptr)

Free a Mh object.

[out]ptrMh to free

Definition at line 48 of file mhemail.c.

50 if (!ptr || !*ptr)
51 return;
53 struct MhEmail *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
struct Email * email
Temporary Email.
Definition: mhemail.h:37
char * canon_fname
Canonical filename for hashing.
Definition: mhemail.h:38
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mh_entry_new()

struct MhEmail * mh_entry_new ( void  )

Create a new Mh entry.

Return values
ptrNew Mh entry

Definition at line 39 of file mhemail.c.

41 return mutt_mem_calloc(1, sizeof(struct MhEmail));
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: