NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
mdata.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include "
mutt/lib.h
"
31
#include "
core/lib.h
"
32
#include "
mdata.h
"
33
37
void
mh_mdata_free
(
void
**ptr)
38
{
39
if
(!ptr || !*ptr)
40
return
;
41
42
FREE
(ptr);
43
}
44
49
struct
MhMboxData
*
mh_mdata_new
(
void
)
50
{
51
return
MUTT_MEM_CALLOC
(1,
struct
MhMboxData
);
52
}
53
59
struct
MhMboxData
*
mh_mdata_get
(
struct
Mailbox
*m)
60
{
61
if
(m && (m->
type
==
MUTT_MH
))
62
return
m->
mdata
;
63
64
return
NULL;
65
}
lib.h
Convenience wrapper for the core headers.
MUTT_MH
@ MUTT_MH
'MH' Mailbox type
Definition
mailbox.h:46
mh_mdata_free
void mh_mdata_free(void **ptr)
Free the private Mailbox data - Implements Mailbox::mdata_free() -.
Definition
mdata.c:37
FREE
#define FREE(x)
Free memory and set the pointer to NULL.
Definition
memory.h:68
MUTT_MEM_CALLOC
#define MUTT_MEM_CALLOC(n, type)
Definition
memory.h:52
mh_mdata_get
struct MhMboxData * mh_mdata_get(struct Mailbox *m)
Get the private data for this Mailbox.
Definition
mdata.c:59
mh_mdata_new
struct MhMboxData * mh_mdata_new(void)
Create a new MhMboxData object.
Definition
mdata.c:49
mdata.h
Mh-specific Mailbox data.
lib.h
Convenience wrapper for the library headers.
Mailbox
A mailbox.
Definition
mailbox.h:81
Mailbox::type
enum MailboxType type
Mailbox type.
Definition
mailbox.h:104
Mailbox::mdata
void * mdata
Driver specific data.
Definition
mailbox.h:134
MhMboxData
Mh-specific Mailbox data -.
Definition
mdata.h:35