2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or (at
5 * your option) any later version.
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * Copyright © 2006 Pierre Habouzit
20 #include "mime-types.h"
22 const char MimeSpecials[] = "@.,;:<>[]\\\"()?/= \t";
24 const char *BodyTypes[] = {
36 const char *BodyEncodings[] = {
46 void address_wipe(address_t *addr)
48 p_delete(&addr->personal);
49 p_delete(&addr->mailbox);
50 address_delete(&addr->next);
53 void parameter_wipe(PARAMETER *param)
55 p_delete(¶m->attribute);
56 p_delete(¶m->value);
57 parameter_delete(¶m->next);
60 void envelope_wipe(ENVELOPE *p)
62 address_delete(&p->return_path);
63 address_delete(&p->from);
64 address_delete(&p->to);
65 address_delete(&p->cc);
66 address_delete(&p->bcc);
67 address_delete(&p->sender);
68 address_delete(&p->reply_to);
69 address_delete(&p->mail_followup_to);
71 p_delete(&p->list_post);
72 p_delete(&p->subject);
73 /* real_subj is just an offset to subject and shouldn't be freed */
74 p_delete(&p->message_id);
75 p_delete(&p->supersedes);
77 p_delete(&p->x_label);
78 p_delete(&p->organization);
80 p_delete(&p->newsgroups);
82 p_delete(&p->followup_to);
83 p_delete(&p->x_comment_to);
86 mutt_buffer_free (&p->spam);
87 mutt_free_list(&p->references);
88 mutt_free_list(&p->in_reply_to);
89 mutt_free_list(&p->userhdrs);
92 void header_wipe(HEADER *h)
94 envelope_delete(&h->env);
95 mutt_free_body (&h->content);
96 p_delete(&h->maildir_flags);
100 mutt_free_list(&h->chain);