NeoMutt  2022-04-29-323-g5fcc6c
Teaching an old dog new tricks
address.h File Reference

Type representing an email address. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


void address_free (struct Address **addr)
 Free an Address object. More...
struct Addressaddress_new (const char *addr)
 Create an Address from a string. More...

Detailed Description

Type representing an email address.

  • 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 address.h.

Function Documentation

◆ address_free()

void address_free ( struct Address **  addr)

Free an Address object.

[out]addrAddress to free

Definition at line 249 of file address.c.

251 if (!addr || !*addr)
252 return;
254 FREE(&(*addr)->personal);
255 FREE(&(*addr)->mailbox);
256 FREE(addr);
#define FREE(x)
Definition: memory.h:43
+ Here is the caller graph for this function:

◆ address_new()

struct Address * address_new ( const char *  addr)

Create an Address from a string.

addrEmail address to parse
Return values
ptrNew Address object

Definition at line 237 of file address.c.

239 struct Address *a = mutt_mem_calloc(1, sizeof(*a));
240 // a->personal = mutt_str_dup(addr);
241 a->mailbox = mutt_str_dup(addr);
242 return a;
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:250
An email address.
Definition: address.h:36
char * mailbox
Mailbox and host address.
Definition: address.h:38
+ Here is the call graph for this function:
+ Here is the caller graph for this function: