X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=muttlib.c;h=fc9606d6160e6494a2b3c6698b175993471f4ce2;hb=8d5f74a1030b2e5e93027c91c35b7facea2d61be;hp=cffef1970220ecfd946165492c06ba999380622d;hpb=69f4685e616347559d4ec714fd826d7f97a472ef;p=apps%2Fmadmutt.git diff --git a/muttlib.c b/muttlib.c index cffef19..fc9606d 100644 --- a/muttlib.c +++ b/muttlib.c @@ -53,16 +53,6 @@ #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. @@ -125,7 +115,7 @@ int mutt_copy_body (FILE * fp, BODY ** tgt, BODY * src) 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)); @@ -167,45 +157,6 @@ int mutt_copy_body (FILE * fp, BODY ** tgt, BODY * src) 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;