]> granicus.if.org Git - neomutt/commitdiff
rename header functions
authorRichard Russon <rich@flatcap.org>
Sun, 1 Apr 2018 01:36:48 +0000 (02:36 +0100)
committerRichard Russon <rich@flatcap.org>
Sun, 1 Apr 2018 01:36:48 +0000 (02:36 +0100)
22 files changed:
attach.c
body.c
buffy.c
commands.c
hcache/hcache.c
hcache/hcache.h
header.c
header.h
imap/message.c
main.c
mbox.c
mh.c
mutt_notmuch.c
muttlib.c
mx.c
nntp.c
parse.c
pop.c
query.c
recvcmd.c
send.c
sendlib.c

index 7587c04666f253af250a42dd3eb873e257087096..b984e814706c8104e351b8f57eaa49008d43c149 100644 (file)
--- 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 dec39886e5ead18be99f94071d37045855b92539..d9c770294d0cb2268d0f8a4defa8848ecc7dacc6 100644 (file)
--- 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 eed86a4051e32db19d2d4b705881aa71cd2ef095..04fb34f9ef7cc1b2cbe9ef1e4b1616d43ac8167e 100644 (file)
--- 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;
 }
index 0acef5b798f9e2db0d64c164bdaebfac32943fae..334a4d1dc9bbc279b20051b8e51b72eec3040388 100644 (file)
@@ -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)))
index cac43e0275c992491cfe3f8185b07dcd71577503..ff8929074bea12d8989168dea16b6695270da677 100644 (file)
@@ -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 */
index 7b00ac228f453f249c816329cec4d4f032341ab0..f5f6ac8982e9fdb3f127db7c9ccfd7115dfdfd09 100644 (file)
@@ -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);
 
index b0d2fb112db6327d00b3368cb7a40bb691f92dac..212127cc7e22a5ba948c0bfaa02b2e23b505a82a 100644 (file)
--- 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
index 8465ac806c75efdbb22c97c677a482456953c552..6c4f951a4749253ad9ceeb6de2adf0d540c629c8 100644 (file)
--- 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 */
index 761be2c37cd2b24590dcd44961afd612aca5d3cb..5ad3b32ced1f039c40d5d289065946539aab1b3f 100644 (file)
@@ -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 edfeb84cd7e3d20bc69d93465fd26cc5fddb02d8..fbf1eb621d3db5020269098fa15b8ca9c6c31ec1 100644 (file)
--- 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 bd9c2470970d87a87a32249dd427a9e7c083c380..a72f462c3b3ed8d5ed6def31e17f02bee61745f7 100644 (file)
--- 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 1dbe92d7707da25ba7f969d1c3023d7ab72d6bfc..57c0a120482f5930386b7b5280a1e4521fa19e5b 100644 (file)
--- 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;
index a2939aa86b9d7320de746e96513cefdfeb58c949..31178891f4675fce696afd4112791848ef03680e 100644 (file)
@@ -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;
   }
index 52145b88a43c1f4943f38eb2b0ae2011970f614d..dad4466ddde5276f9a4b0014d0025f482e95f5a2 100644 (file)
--- 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 aa394d3661ff539481345a081db1f5c0a71bfc9c..d29b063a1b1dd6868deedf2df23f7c684f88c872 100644 (file)
--- 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 b8f941b1820025cdc321726a03eba504975c80d9..61363e78dc10e5aaab0fde02f3900addda0cb902 100644 (file)
--- 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 c00caab448f768fc456e7615c17fa5d174ca36d6..bf80ab4ecfe7e44264aff07c9f707a2175da482a 100644 (file)
--- 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 b59a96d0c8ac017ccda2d977021b73e530cc6358..df6275b233b4ae88ab8f138eb43e29a3739b2e51 100644 (file)
--- 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 012a22fe2d87b859648ca985e160489f53de5cf5..2d0b5a85d3b6878a3ceb3dd4602c1de885db2d2d 100644 (file)
--- 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)
           {
index 01453cf5552a3c653c3e10eaa9c24eff218eb441..e7ff676473a05a36d57dcca5ffe36c59f3a7da98 100644 (file)
--- 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 a2a34cea75ca4731f29edcc84a3778711761a2bd..5819450b9a099b54f5945eded34e1b1ffea4301a 100644 (file)
--- 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;
index 5dc933fa1bbc254027c5cc11c5ff9dde8eb01b1d..8d07332dc0e4fc1b110c21e70d5d5111222a4d76 100644 (file)
--- 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);