NeoMutt  2024-11-14-34-g5aaf0d
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
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...
 

Functions

 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.

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

Function Documentation

◆ ARRAY_HEAD()

ARRAY_HEAD ( MhEmailArray  ,
struct MhEmail  
)

◆ mharray_clear()

void mharray_clear ( struct MhEmailArray *  mha)

Free a Mh array.

Parameters
[out]mhaMh array to free

Definition at line 64 of file mhemail.c.

65{
66 if (!mha)
67 return;
68
69 struct MhEmail **mdp = NULL;
70 ARRAY_FOREACH(mdp, mha)
71 {
72 mh_entry_free(mdp);
73 }
74
75 ARRAY_FREE(mha);
76}
#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.

Parameters
[out]ptrMh to free

Definition at line 48 of file mhemail.c.

49{
50 if (!ptr || !*ptr)
51 return;
52
53 struct MhEmail *md = *ptr;
54 FREE(&md->canon_fname);
55 email_free(&md->email);
56
57 FREE(ptr);
58}
void email_free(struct Email **ptr)
Free an Email.
Definition: email.c:46
#define FREE(x)
Definition: memory.h:55
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.

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