2 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 /* possible values for RFC822Error */
35 typedef struct address_t
38 char *val; /* value of address as parsed */
40 char *personal; /* real name of address */
41 char *mailbox; /* mailbox and host address */
42 int group; /* group mailbox? */
43 struct address_t *next;
45 unsigned idn_checked : 1;
49 void rfc822_dequote_comment (char *s);
50 void rfc822_free_address (ADDRESS **);
51 void rfc822_qualify (ADDRESS *, const char *);
52 ADDRESS *rfc822_parse_adrlist (ADDRESS *, const char *s);
53 ADDRESS *rfc822_cpy_adr (ADDRESS *addr, int);
54 ADDRESS *rfc822_cpy_adr_real (ADDRESS *addr);
55 ADDRESS *rfc822_append (ADDRESS **a, ADDRESS *b, int);
56 int rfc822_write_address (char *, size_t, ADDRESS *, int);
57 void rfc822_write_address_single (char *, size_t, ADDRESS *, int);
58 void rfc822_free_address (ADDRESS **addr);
59 void rfc822_cat (char *, size_t, const char *, const char *);
60 int rfc822_valid_msgid (const char *msgid);
61 int rfc822_remove_from_adrlist (ADDRESS **a, const char *mailbox);
63 extern int RFC822Error;
64 extern const char *RFC822Errors[];
66 #define rfc822_error(x) RFC822Errors[x]
67 #define rfc822_new_address() safe_calloc(1,sizeof(ADDRESS))