From: Richard Russon Date: Sun, 1 Apr 2018 01:36:48 +0000 (+0100) Subject: rename header functions X-Git-Tag: neomutt-20180512~69^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87c57a1fb1518702a36ef643ffc2cfec1dc16f0e;p=neomutt rename header functions --- diff --git a/attach.c b/attach.c index 7587c0466..b984e8147 100644 --- a/attach.c +++ b/attach.c @@ -955,7 +955,7 @@ int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displa m->encoding = saved_encoding; if (saved_parts) { - mutt_free_header(&m->hdr); + mutt_header_free(&m->hdr); m->parts = saved_parts; m->hdr = saved_hdr; } diff --git a/body.c b/body.c index dec39886e..d9c770294 100644 --- a/body.c +++ b/body.c @@ -145,7 +145,7 @@ void mutt_body_free(struct Body **p) { /* Don't free twice (b->hdr->content = b->parts) */ b->hdr->content = NULL; - mutt_free_header(&b->hdr); + mutt_header_free(&b->hdr); } if (b->parts) diff --git a/buffy.c b/buffy.c index eed86a405..04fb34f9e 100644 --- a/buffy.c +++ b/buffy.c @@ -123,13 +123,13 @@ static int test_last_status_new(FILE *f) if (fseek_last_message(f) == -1) return 0; - hdr = mutt_new_header(); + hdr = mutt_header_new(); tmp_envelope = mutt_read_rfc822_header(f, hdr, 0, 0); if (!(hdr->read || hdr->old)) result = 1; mutt_env_free(&tmp_envelope); - mutt_free_header(&hdr); + mutt_header_free(&hdr); return result; } diff --git a/commands.c b/commands.c index 0acef5b79..334a4d1dc 100644 --- a/commands.c +++ b/commands.c @@ -1027,7 +1027,7 @@ int mutt_edit_content_type(struct Header *h, struct Body *b, FILE *fp) { structure_changed = 1; b->hdr->content = NULL; - mutt_free_header(&b->hdr); + mutt_header_free(&b->hdr); } if (fp && !b->parts && (is_multipart(b) || mutt_is_message_type(b->type, b->subtype))) diff --git a/hcache/hcache.c b/hcache/hcache.c index cac43e027..ff8929074 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -686,7 +686,7 @@ static void *hcache_dump(header_cache_t *h, struct Header *header, int *off, struct Header *mutt_hcache_restore(const unsigned char *d) { int off = 0; - struct Header *h = mutt_new_header(); + struct Header *h = mutt_header_new(); bool convert = !CharsetIsUtf8; /* skip validate */ diff --git a/hcache/hcache.h b/hcache/hcache.h index 7b00ac228..f5f6ac898 100644 --- a/hcache/hcache.h +++ b/hcache/hcache.h @@ -110,7 +110,7 @@ void mutt_hcache_free(header_cache_t *h, void **data); * @param d Data retrieved using mutt_hcache_fetch or mutt_hcache_fetch_raw * @retval Pointer to the restored header (cannot be NULL) * @note The returned Header must be free'd by caller code with - * mutt_free_header(). + * mutt_header_free(). */ struct Header *mutt_hcache_restore(const unsigned char *d); diff --git a/header.c b/header.c index b0d2fb112..212127cc7 100644 --- a/header.c +++ b/header.c @@ -354,7 +354,7 @@ void mutt_label_hash_remove(struct Context *ctx, struct Header *hdr) label_ref_dec(ctx, hdr->env->x_label); } -void mutt_free_header(struct Header **h) +void mutt_header_free(struct Header **h) { if (!h || !*h) return; @@ -375,7 +375,7 @@ void mutt_free_header(struct Header **h) FREE(h); } -struct Header *mutt_new_header(void) +struct Header *mutt_header_new(void) { struct Header *h = mutt_mem_calloc(1, sizeof(struct Header)); #ifdef MIXMASTER diff --git a/header.h b/header.h index 8465ac806..6c4f951a4 100644 --- a/header.h +++ b/header.h @@ -118,8 +118,9 @@ struct Header char *maildir_flags; /**< unknown maildir flags */ }; +void mutt_header_free(struct Header **h); +struct Header *mutt_header_new(void); + int mbox_strict_cmp_headers(const struct Header *h1, const struct Header *h2); -struct Header *mutt_new_header(void); -void mutt_free_header(struct Header **h); #endif /* _MUTT_HEADER_H */ diff --git a/imap/message.c b/imap/message.c index 761be2c37..5ad3b32ce 100644 --- a/imap/message.c +++ b/imap/message.c @@ -859,7 +859,7 @@ int imap_read_headers(struct ImapData *idata, unsigned int msn_begin, unsigned i continue; } - ctx->hdrs[idx] = mutt_new_header(); + ctx->hdrs[idx] = mutt_header_new(); idata->max_msn = MAX(idata->max_msn, h.data->msn); idata->msn_index[h.data->msn - 1] = ctx->hdrs[idx]; diff --git a/main.c b/main.c index edfeb84cd..fbf1eb621 100644 --- a/main.c +++ b/main.c @@ -478,7 +478,7 @@ int main(int argc, char *argv[], char *envp[]) if (!STAILQ_EMPTY(&cc_list) || !STAILQ_EMPTY(&bcc_list)) { - msg = mutt_new_header(); + msg = mutt_header_new(); msg->env = mutt_env_new(); struct ListNode *np = NULL; @@ -681,7 +681,7 @@ int main(int argc, char *argv[], char *envp[]) mutt_flushinp(); if (!msg) - msg = mutt_new_header(); + msg = mutt_header_new(); if (!msg->env) msg->env = mutt_env_new(); @@ -802,7 +802,7 @@ int main(int argc, char *argv[], char *envp[]) /* Set up a "context" header with just enough information so that * mutt_prepare_template() can parse the message in fin. */ - context_hdr = mutt_new_header(); + context_hdr = mutt_header_new(); context_hdr->offset = 0; context_hdr->content = mutt_body_new(); if (fstat(fileno(fin), &st) != 0) @@ -816,7 +816,7 @@ int main(int argc, char *argv[], char *envp[]) { mutt_error(_("Cannot parse message template: %s"), draft_file); mutt_env_free(&opts_env); - mutt_free_header(&context_hdr); + mutt_header_free(&context_hdr); goto main_curses; } @@ -842,7 +842,7 @@ int main(int argc, char *argv[], char *envp[]) mutt_str_replace(&msg->env->subject, opts_env->subject); mutt_env_free(&opts_env); - mutt_free_header(&context_hdr); + mutt_header_free(&context_hdr); } /* Editing the include_file: pass it directly in. * Note that SENDNOFREEHEADER is set above so it isn't unlinked. @@ -935,7 +935,7 @@ int main(int argc, char *argv[], char *envp[]) mutt_file_fclose(&fout); } - mutt_free_header(&msg); + mutt_header_free(&msg); } /* !edit_infile && draft_file will leave the tempfile around */ diff --git a/mbox.c b/mbox.c index bd9c24709..a72f462c3 100644 --- a/mbox.c +++ b/mbox.c @@ -144,7 +144,7 @@ static int mmdf_parse_mailbox(struct Context *ctx) if (ctx->msgcount == ctx->hdrmax) mx_alloc_memory(ctx); - ctx->hdrs[ctx->msgcount] = hdr = mutt_new_header(); + ctx->hdrs[ctx->msgcount] = hdr = mutt_header_new(); hdr->offset = loc; hdr->index = ctx->msgcount; @@ -309,7 +309,7 @@ static int mbox_parse_mailbox(struct Context *ctx) if (ctx->msgcount == ctx->hdrmax) mx_alloc_memory(ctx); - curhdr = ctx->hdrs[ctx->msgcount] = mutt_new_header(); + curhdr = ctx->hdrs[ctx->msgcount] = mutt_header_new(); curhdr->received = t - mutt_date_local_tz(t); curhdr->offset = loc; curhdr->index = ctx->msgcount; @@ -633,7 +633,7 @@ static int reopen_mailbox(struct Context *ctx, int *index_hint) if (ctx->readonly) { for (i = 0; i < ctx->msgcount; i++) - mutt_free_header(&(ctx->hdrs[i])); /* nothing to do! */ + mutt_header_free(&(ctx->hdrs[i])); /* nothing to do! */ FREE(&ctx->hdrs); } else @@ -679,7 +679,7 @@ static int reopen_mailbox(struct Context *ctx, int *index_hint) { /* free the old headers */ for (j = 0; j < old_msgcount; j++) - mutt_free_header(&(old_hdrs[j])); + mutt_header_free(&(old_hdrs[j])); FREE(&old_hdrs); ctx->quiet = false; @@ -749,7 +749,7 @@ static int reopen_mailbox(struct Context *ctx, int *index_hint) mutt_set_flag(ctx, ctx->hdrs[i], MUTT_TAG, old_hdrs[j]->tagged); /* we don't need this header any more */ - mutt_free_header(&(old_hdrs[j])); + mutt_header_free(&(old_hdrs[j])); } } @@ -758,7 +758,7 @@ static int reopen_mailbox(struct Context *ctx, int *index_hint) { if (old_hdrs[j]) { - mutt_free_header(&(old_hdrs[j])); + mutt_header_free(&(old_hdrs[j])); msg_mod = true; } } diff --git a/mh.c b/mh.c index 1dbe92d77..57c0a1204 100644 --- a/mh.c +++ b/mh.c @@ -672,7 +672,7 @@ static void maildir_free_entry(struct Maildir **md) FREE(&(*md)->canon_fname); if ((*md)->h) - mutt_free_header(&(*md)->h); + mutt_header_free(&(*md)->h); FREE(md); } @@ -783,7 +783,7 @@ struct Header *maildir_parse_stream(int magic, FILE *f, const char *fname, struct stat st; if (!h) - h = mutt_new_header(); + h = mutt_header_new(); h->env = mutt_read_rfc822_header(f, h, 0, 0); fstat(fileno(f), &st); @@ -863,7 +863,7 @@ static int maildir_parse_dir(struct Context *ctx, struct Maildir ***last, /* FOO - really ignore the return value? */ mutt_debug(2, "queueing %s\n", de->d_name); - h = mutt_new_header(); + h = mutt_header_new(); h->old = is_old; if (ctx->magic == MUTT_MAILDIR) maildir_parse_flags(h, de->d_name); @@ -1197,7 +1197,7 @@ static void maildir_delayed_parsing(struct Context *ctx, struct Maildir **md, struct Header *h = mutt_hcache_restore((unsigned char *) data); h->old = p->h->old; h->path = mutt_str_strdup(p->h->path); - mutt_free_header(&p->h); + mutt_header_free(&p->h); p->h = h; if (ctx->magic == MUTT_MAILDIR) maildir_parse_flags(p->h, fn); @@ -1224,7 +1224,7 @@ static void maildir_delayed_parsing(struct Context *ctx, struct Maildir **md, #endif } else - mutt_free_header(&p->h); + mutt_header_free(&p->h); #ifdef USE_HCACHE } mutt_hcache_free(hc, &data); @@ -2134,7 +2134,7 @@ static int maildir_check_mailbox(struct Context *ctx, int *index_hint) ctx->hdrs[i]->trash = p->h->trash; /* this is a duplicate of an existing header, so remove it */ - mutt_free_header(&p->h); + mutt_header_free(&p->h); } /* This message was not in the list of messages we just scanned. * Check to see if we have enough information to know if the @@ -2276,7 +2276,7 @@ static int mh_check_mailbox(struct Context *ctx, int *index_hint) if (maildir_update_flags(ctx, ctx->hdrs[i], p->h)) flags_changed = true; - mutt_free_header(&p->h); + mutt_header_free(&p->h); } else /* message has disappeared */ occult = true; diff --git a/mutt_notmuch.c b/mutt_notmuch.c index a2939aa86..31178891f 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -1020,7 +1020,7 @@ static void append_message(struct Context *ctx, notmuch_query_t *q, } if (init_header(h, newpath ? newpath : path, msg) != 0) { - mutt_free_header(&h); + mutt_header_free(&h); mutt_debug(1, "nm: failed to append header!\n"); goto done; } diff --git a/muttlib.c b/muttlib.c index 52145b88a..dad4466dd 100644 --- a/muttlib.c +++ b/muttlib.c @@ -213,12 +213,12 @@ char *mutt_expand_path_regex(char *s, size_t slen, int regex) alias = mutt_lookup_alias(s + 1); if (alias) { - h = mutt_new_header(); + h = mutt_header_new(); h->env = mutt_env_new(); h->env->from = h->env->to = alias; mutt_default_save(p, sizeof(p), h); h->env->from = h->env->to = NULL; - mutt_free_header(&h); + mutt_header_free(&h); /* Avoid infinite recursion if the resulting folder starts with '@' */ if (*p != '@') recurse = true; diff --git a/mx.c b/mx.c index aa394d366..d29b063a1 100644 --- a/mx.c +++ b/mx.c @@ -538,7 +538,7 @@ void mx_fastclose_mailbox(struct Context *ctx) mutt_hash_destroy(&ctx->label_hash); mutt_clear_threads(ctx); for (int i = 0; i < ctx->msgcount; i++) - mutt_free_header(&ctx->hdrs[i]); + mutt_header_free(&ctx->hdrs[i]); FREE(&ctx->hdrs); FREE(&ctx->v2r); FREE(&ctx->path); @@ -982,7 +982,7 @@ void mx_update_tables(struct Context *ctx, bool committing) */ if (ctx->last_tag == ctx->hdrs[i]) ctx->last_tag = NULL; - mutt_free_header(&ctx->hdrs[i]); + mutt_header_free(&ctx->hdrs[i]); } } ctx->msgcount = j; diff --git a/nntp.c b/nntp.c index b8f941b18..61363e78d 100644 --- a/nntp.c +++ b/nntp.c @@ -1133,7 +1133,7 @@ static int parse_overview_line(char *line, void *data) mx_alloc_memory(ctx); /* parse header */ - hdr = ctx->hdrs[ctx->msgcount] = mutt_new_header(); + hdr = ctx->hdrs[ctx->msgcount] = mutt_header_new(); hdr->env = mutt_read_rfc822_header(fp, hdr, 0, 0); hdr->env->newsgroups = mutt_str_strdup(nntp_data->group); hdr->received = hdr->date_sent; @@ -1152,7 +1152,7 @@ static int parse_overview_line(char *line, void *data) if (hdata) { mutt_debug(2, "mutt_hcache_fetch %s\n", buf); - mutt_free_header(&hdr); + mutt_header_free(&hdr); ctx->hdrs[ctx->msgcount] = hdr = mutt_hcache_restore(hdata); mutt_hcache_free(fc->hc, &hdata); hdr->data = 0; @@ -1200,7 +1200,7 @@ static int parse_overview_line(char *line, void *data) nntp_data->last_loaded = anum; } else - mutt_free_header(&hdr); + mutt_header_free(&hdr); /* progress */ if (!ctx->quiet) @@ -1316,7 +1316,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first, /* skip header marked as deleted in cache */ if (hdr->deleted && !restore) { - mutt_free_header(&hdr); + mutt_header_free(&hdr); if (nntp_data->bcache) { mutt_debug(2, "#2 mutt_bcache_del %s\n", buf); @@ -1386,7 +1386,7 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first, } /* parse header */ - hdr = ctx->hdrs[ctx->msgcount] = mutt_new_header(); + hdr = ctx->hdrs[ctx->msgcount] = mutt_header_new(); hdr->env = mutt_read_rfc822_header(fp, hdr, 0, 0); hdr->received = hdr->date_sent; mutt_file_fclose(&fp); @@ -1860,7 +1860,7 @@ static int check_mailbox(struct Context *ctx) if (nntp_data->last_message < nntp_data->last_loaded) { for (int i = 0; i < ctx->msgcount; i++) - mutt_free_header(&ctx->hdrs[i]); + mutt_header_free(&ctx->hdrs[i]); ctx->msgcount = 0; ctx->tagged = 0; @@ -1917,13 +1917,13 @@ static int check_mailbox(struct Context *ctx) hdr->data = 0; deleted = hdr->deleted; flagged = hdr->flagged; - mutt_free_header(&hdr); + mutt_header_free(&hdr); /* header marked as deleted, removing from context */ if (deleted) { mutt_set_flag(ctx, ctx->hdrs[i], MUTT_TAG, 0); - mutt_free_header(&ctx->hdrs[i]); + mutt_header_free(&ctx->hdrs[i]); continue; } } @@ -1964,7 +1964,7 @@ static int check_mailbox(struct Context *ctx) hdr->data = 0; if (hdr->deleted) { - mutt_free_header(&hdr); + mutt_header_free(&hdr); if (nntp_data->bcache) { mutt_debug(2, "mutt_bcache_del %s\n", buf); @@ -2389,7 +2389,7 @@ int nntp_check_msgid(struct Context *ctx, const char *msgid) /* parse header */ if (ctx->msgcount == ctx->hdrmax) mx_alloc_memory(ctx); - hdr = ctx->hdrs[ctx->msgcount] = mutt_new_header(); + hdr = ctx->hdrs[ctx->msgcount] = mutt_header_new(); hdr->data = mutt_mem_calloc(1, sizeof(struct NntpHeaderData)); hdr->env = mutt_read_rfc822_header(fp, hdr, 0, 0); mutt_file_fclose(&fp); @@ -2403,7 +2403,7 @@ int nntp_check_msgid(struct Context *ctx, const char *msgid) snprintf(buf, sizeof(buf), "STAT %s\r\n", msgid); if (nntp_query(nntp_data, buf, sizeof(buf)) < 0) { - mutt_free_header(&hdr); + mutt_header_free(&hdr); return -1; } sscanf(buf + 4, ANUM, &NHDR(hdr)->article_num); diff --git a/parse.c b/parse.c index c00caab44..bf80ab4ec 100644 --- a/parse.c +++ b/parse.c @@ -544,7 +544,7 @@ struct Body *mutt_parse_message_rfc822(FILE *fp, struct Body *parent) { struct Body *msg = NULL; - parent->hdr = mutt_new_header(); + parent->hdr = mutt_header_new(); parent->hdr->offset = ftello(fp); parent->hdr->env = mutt_read_rfc822_header(fp, parent->hdr, 0, 0); msg = parent->hdr->content; diff --git a/pop.c b/pop.c index b59a96d0c..df6275b23 100644 --- a/pop.c +++ b/pop.c @@ -186,7 +186,7 @@ static int fetch_uidl(char *line, void *data) mx_alloc_memory(ctx); ctx->msgcount++; - ctx->hdrs[i] = mutt_new_header(); + ctx->hdrs[i] = mutt_header_new(); ctx->hdrs[i]->data = mutt_str_strdup(line); } else if (ctx->hdrs[i]->index != index - 1) @@ -340,7 +340,7 @@ static int pop_fetch_headers(struct Context *ctx) */ struct Header *h = mutt_hcache_restore((unsigned char *) data); mutt_hcache_free(hc, &data); - mutt_free_header(&ctx->hdrs[i]); + mutt_header_free(&ctx->hdrs[i]); ctx->hdrs[i] = h; ctx->hdrs[i]->refno = refno; ctx->hdrs[i]->index = index; @@ -403,7 +403,7 @@ static int pop_fetch_headers(struct Context *ctx) if (ret < 0) { for (int i = ctx->msgcount; i < new_count; i++) - mutt_free_header(&ctx->hdrs[i]); + mutt_header_free(&ctx->hdrs[i]); return ret; } diff --git a/query.c b/query.c index 012a22fe2..2d0b5a85d 100644 --- a/query.c +++ b/query.c @@ -460,7 +460,7 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, int retb } /* fallthrough */ case OP_MAIL: - msg = mutt_new_header(); + msg = mutt_header_new(); msg->env = mutt_env_new(); if (!menu->tagprefix) { diff --git a/recvcmd.c b/recvcmd.c index 01453cf55..e7ff67647 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -409,7 +409,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx parent_fp = actx->root_fp; } - tmphdr = mutt_new_header(); + tmphdr = mutt_header_new(); tmphdr->env = mutt_env_new(); mutt_make_forward_subject(tmphdr->env, Context, parent_hdr); @@ -418,7 +418,7 @@ static void attach_forward_bodies(FILE *fp, struct Header *hdr, struct AttachCtx if (!tmpfp) { mutt_error(_("Can't open temporary file %s."), tmpbody); - mutt_free_header(&tmphdr); + mutt_header_free(&tmphdr); return; } @@ -539,7 +539,7 @@ bail: mutt_file_unlink(tmpbody); } - mutt_free_header(&tmphdr); + mutt_header_free(&tmphdr); } /** @@ -578,7 +578,7 @@ static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx, struct Body *c } } - tmphdr = mutt_new_header(); + tmphdr = mutt_header_new(); tmphdr->env = mutt_env_new(); mutt_make_forward_subject(tmphdr->env, Context, curhdr); @@ -594,7 +594,7 @@ static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx, struct Body *c if (!tmpfp) { mutt_error(_("Can't create %s."), tmpbody); - mutt_free_header(&tmphdr); + mutt_header_free(&tmphdr); return; } @@ -654,7 +654,7 @@ static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx, struct Body *c } } else - mutt_free_header(&tmphdr); + mutt_header_free(&tmphdr); ci_send_message(flags, tmphdr, *tmpbody ? tmpbody : NULL, NULL, curhdr); } @@ -847,13 +847,13 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx, else if (nattach == 1) mime_reply_any = true; - tmphdr = mutt_new_header(); + tmphdr = mutt_header_new(); tmphdr->env = mutt_env_new(); if (attach_reply_envelope_defaults( tmphdr->env, actx, parent_hdr ? parent_hdr : (cur ? cur->hdr : NULL), flags) == -1) { - mutt_free_header(&tmphdr); + mutt_header_free(&tmphdr); return; } @@ -862,7 +862,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx, if (!tmpfp) { mutt_error(_("Can't create %s."), tmpbody); - mutt_free_header(&tmphdr); + mutt_header_free(&tmphdr); return; } @@ -930,7 +930,7 @@ void mutt_attach_reply(FILE *fp, struct Header *hdr, struct AttachCtx *actx, if (mime_reply_any && !cur && copy_problematic_attachments(&tmphdr->content, actx, 0) == NULL) { - mutt_free_header(&tmphdr); + mutt_header_free(&tmphdr); mutt_file_fclose(&tmpfp); return; } diff --git a/send.c b/send.c index a2a34cea7..5819450b9 100644 --- a/send.c +++ b/send.c @@ -1170,7 +1170,7 @@ static void fix_end_of_file(const char *data) int mutt_compose_to_sender(struct Header *hdr) { - struct Header *msg = mutt_new_header(); + struct Header *msg = mutt_header_new(); msg->env = mutt_env_new(); if (!hdr) @@ -1189,11 +1189,11 @@ int mutt_compose_to_sender(struct Header *hdr) int mutt_resend_message(FILE *fp, struct Context *ctx, struct Header *cur) { - struct Header *msg = mutt_new_header(); + struct Header *msg = mutt_header_new(); if (mutt_prepare_template(fp, ctx, msg, cur, 1) < 0) { - mutt_free_header(&msg); + mutt_header_free(&msg); return -1; } @@ -1326,7 +1326,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, if (!msg) { - msg = mutt_new_header(); + msg = mutt_header_new(); if (flags == SENDPOSTPONED) { @@ -2203,7 +2203,7 @@ cleanup: mutt_file_fclose(&tempfp); if (!(flags & SENDNOFREEHEADER)) - mutt_free_header(&msg); + mutt_header_free(&msg); FREE(&finalpath); return rc; diff --git a/sendlib.c b/sendlib.c index 5dc933fa1..8d07332dc 100644 --- a/sendlib.c +++ b/sendlib.c @@ -1415,7 +1415,7 @@ struct Body *mutt_make_message_attach(struct Context *ctx, struct Header *hdr, i fflush(fp); rewind(fp); - body->hdr = mutt_new_header(); + body->hdr = mutt_header_new(); body->hdr->offset = 0; /* we don't need the user headers here */ body->hdr->env = mutt_read_rfc822_header(fp, body->hdr, 0, 0);