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"
24 const char MimeSpecials[] = "@.,;:<>[]\\\"()?/= \t";
26 const char *BodyTypes[] = {
38 const char *BodyEncodings[] = {
48 void address_wipe(address_t *addr)
50 p_delete(&addr->personal);
51 p_delete(&addr->mailbox);
52 address_delete(&addr->next);
55 void parameter_wipe(PARAMETER *param)
57 p_delete(¶m->attribute);
58 p_delete(¶m->value);
59 parameter_delete(¶m->next);
62 void envelope_wipe(ENVELOPE *p)
64 address_delete(&p->return_path);
65 address_delete(&p->from);
66 address_delete(&p->to);
67 address_delete(&p->cc);
68 address_delete(&p->bcc);
69 address_delete(&p->sender);
70 address_delete(&p->reply_to);
71 address_delete(&p->mail_followup_to);
73 p_delete(&p->list_post);
74 p_delete(&p->subject);
75 /* real_subj is just an offset to subject and shouldn't be freed */
76 p_delete(&p->message_id);
77 p_delete(&p->supersedes);
79 p_delete(&p->x_label);
80 p_delete(&p->organization);
82 p_delete(&p->newsgroups);
84 p_delete(&p->followup_to);
85 p_delete(&p->x_comment_to);
88 mutt_buffer_free (&p->spam);
89 mutt_free_list(&p->references);
90 mutt_free_list(&p->in_reply_to);
91 mutt_free_list(&p->userhdrs);
94 void header_wipe(HEADER *h)
96 envelope_delete(&h->env);
97 mutt_free_body (&h->content);
98 p_delete(&h->maildir_flags);
102 mutt_free_list(&h->chain);