#define SW (option(OPTMBOXPANE)?SidebarWidth:0)
-BODY *mutt_new_body (void)
-{
- BODY *p = p_new(BODY, 1);
-
- p->disposition = DISPATTACH;
- p->use_disp = 1;
- return (p);
-}
-
-
/* Modified by blong to accept a "suggestion" for file name. If
* that file exists, then construct one with unique name but
* keep any extension. This might fail, I guess.
if (mutt_save_attachment (fp, src, tmp, 0, NULL) == -1)
return -1;
- *tgt = mutt_new_body ();
+ *tgt = body_new();
b = *tgt;
memcpy (b, src, sizeof (BODY));
return 0;
}
-
-static void body_wipe(BODY *b)
-{
- if (b->parameter)
- parameter_list_wipe(&b->parameter);
-
- if (b->unlink && b->filename) {
- unlink (b->filename);
- }
-
- p_delete(&b->filename);
- p_delete(&b->content);
- p_delete(&b->xtype);
- p_delete(&b->subtype);
- p_delete(&b->description);
- p_delete(&b->form_name);
-
- if (b->hdr) {
- /* Don't free twice (b->hdr->content = b->parts) */
- b->hdr->content = NULL;
- header_delete(&b->hdr);
- }
-
- if (b->parts)
- mutt_free_body(&b->parts);
-}
-
-DO_DELETE(BODY, body);
-
-void mutt_free_body(BODY **p)
-{
- while (*p) {
- BODY *b = *p;
- *p = b->next;
-
- body_delete(&b);
- }
-}
-
HEADER *mutt_dup_header (HEADER * h)
{
HEADER *hnew;