]> granicus.if.org Git - neomutt/commitdiff
email: shorten function names
authorRichard Russon <rich@flatcap.org>
Tue, 16 Jul 2019 18:25:21 +0000 (19:25 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 16 Jul 2019 21:17:49 +0000 (22:17 +0100)
35 files changed:
commands.c
context.c
context.h
core/mailbox.c
email/body.c
email/email.c
email/email.h
email/parse.c
hcache/serialize.c
hdrline.c
imap/message.c
index.c
maildir/maildir.c
maildir/mh.c
maildir/shared.c
main.c
mbox/mbox.c
mutt_attach.c
muttlib.c
mx.c
nntp/nntp.c
notmuch/mutt_notmuch.c
pager.c
pop/pop.c
pop/pop_lib.c
query.c
recvcmd.c
send.c
sendlib.c
test/Makefile.autosetup
test/email/email_cmp_strict.c [moved from test/email/mutt_email_cmp_strict.c with 78% similarity]
test/email/email_free.c [moved from test/email/mutt_email_free.c with 78% similarity]
test/email/email_new.c [moved from test/email/mutt_email_new.c with 89% similarity]
test/email/email_size.c [moved from test/email/mutt_email_size.c with 84% similarity]
test/main.c

index ab2072df0b034995cf78a3d5515f5c24bd99902b..a0b28fd6fc98fef436a750efa9ddf0ee64598be1 100644 (file)
@@ -1266,7 +1266,7 @@ bool mutt_edit_content_type(struct Email *e, struct Body *b, FILE *fp)
   {
     structure_changed = true;
     b->email->content = NULL;
-    mutt_email_free(&b->email);
+    email_free(&b->email);
   }
 
   if (fp && !b->parts && (is_multipart(b) || mutt_is_message_type(b->type, b->subtype)))
index ccb4d261199b4764f55a6b7ffc71ca1da000c5dd..c248973770ce329d5d913bf0825cbbf537dc3675 100644 (file)
--- a/context.c
+++ b/context.c
@@ -249,7 +249,7 @@ void ctx_update_tables(struct Context *ctx, bool committing)
        * last_tag being stale if it's not reset here.  */
       if (ctx->last_tag == m->emails[i])
         ctx->last_tag = NULL;
-      mutt_email_free(&m->emails[i]);
+      email_free(&m->emails[i]);
     }
   }
   m->msg_count = j;
index eb903b1325c578d16e5607cc2afe69955268e7b4..cd0f67f382445bea71ed0018b34824277fc2e852 100644 (file)
--- a/context.h
+++ b/context.h
@@ -63,6 +63,6 @@ bool message_is_visible(struct Context *ctx, int index);
 
 int  el_add_email(struct EmailList *el, struct Email *e);
 int  el_add_tagged(struct EmailList *el, struct Context *ctx, struct Email *e, bool use_tagged);
-void mutt_emaillist_clear(struct EmailList *el);
+void emaillist_clear(struct EmailList *el);
 
 #endif /* MUTT_CONTEXT_H */
index 5df958821bc626d414531b6ac7fa3337f2b62f99..6e427c864f884bbf25204bafea43d87644c87484 100644 (file)
@@ -171,7 +171,7 @@ void mailbox_changed(struct Mailbox *m, enum MailboxNotification action)
  */
 void mailbox_size_add(struct Mailbox *m, const struct Email *e)
 {
-  m->size += mutt_email_size(e);
+  m->size += email_size(e);
 }
 
 /**
@@ -181,5 +181,5 @@ void mailbox_size_add(struct Mailbox *m, const struct Email *e)
  */
 void mailbox_size_sub(struct Mailbox *m, const struct Email *e)
 {
-  m->size -= mutt_email_size(e);
+  m->size -= email_size(e);
 }
index cb0f821c987d20b944f7da5770d39c9eabb0370f..846f54131e25c449544e1e09d30fe0ac868c2088 100644 (file)
@@ -88,7 +88,7 @@ void mutt_body_free(struct Body **p)
     {
       /* Don't free twice (b->email->content = b->parts) */
       b->email->content = NULL;
-      mutt_email_free(&b->email);
+      email_free(&b->email);
     }
 
     mutt_env_free(&b->mime_headers);
index a9c295b48606b6c4691773580df755555d2c159a..4e83d97da82385566e848a185ad2a7a8ba6734a7 100644 (file)
 #include "tags.h"
 
 /**
- * mutt_email_free - Free an Email
+ * email_free - Free an Email
  * @param[out] e Email to free
  */
-void mutt_email_free(struct Email **e)
+void email_free(struct Email **e)
 {
   if (!e || !*e)
     return;
@@ -57,10 +57,10 @@ void mutt_email_free(struct Email **e)
 }
 
 /**
- * mutt_email_new - Create a new Email
+ * email_new - Create a new Email
  * @retval ptr Newly created Email
  */
-struct Email *mutt_email_new(void)
+struct Email *email_new(void)
 {
   struct Email *e = mutt_mem_calloc(1, sizeof(struct Email));
 #ifdef MIXMASTER
@@ -71,12 +71,12 @@ struct Email *mutt_email_new(void)
 }
 
 /**
- * mutt_email_cmp_strict - Strictly compare message emails
+ * email_cmp_strict - Strictly compare message emails
  * @param e1 First Email
  * @param e2 Second Email
  * @retval true Emails are strictly identical
  */
-bool mutt_email_cmp_strict(const struct Email *e1, const struct Email *e2)
+bool email_cmp_strict(const struct Email *e1, const struct Email *e2)
 {
   if (e1 && e2)
   {
@@ -102,11 +102,11 @@ bool mutt_email_cmp_strict(const struct Email *e1, const struct Email *e2)
 }
 
 /**
- * mutt_email_size - compute the size of an email
+ * email_size - compute the size of an email
  * @param e Email
  * @retval num Size of the email, in bytes
  */
-size_t mutt_email_size(const struct Email *e)
+size_t email_size(const struct Email *e)
 {
   if (!e || !e->content)
     return 0;
@@ -114,12 +114,12 @@ size_t mutt_email_size(const struct Email *e)
 }
 
 /**
- * mutt_emaillist_clear - Drop a private list of Emails
+ * emaillist_clear - Drop a private list of Emails
  * @param el EmailList to empty
  *
  * The Emails are not freed.
  */
-void mutt_emaillist_clear(struct EmailList *el)
+void emaillist_clear(struct EmailList *el)
 {
   if (!el)
     return;
index a840f1718a599fb127f31560a0404090d6611c77..0feaa6d6f9311db9721818a9198acd0d42049b0f 100644 (file)
@@ -121,11 +121,11 @@ struct EmailNode
 };
 STAILQ_HEAD(EmailList, EmailNode);
 
-bool          mutt_email_cmp_strict(const struct Email *e1, const struct Email *e2);
-void          mutt_email_free      (struct Email **e);
-struct Email *mutt_email_new       (void);
-size_t        mutt_email_size      (const struct Email *e);
+bool          email_cmp_strict(const struct Email *e1, const struct Email *e2);
+void          email_free      (struct Email **e);
+struct Email *email_new       (void);
+size_t        email_size      (const struct Email *e);
 
-void mutt_emaillist_clear(struct EmailList *el);
+void emaillist_clear(struct EmailList *el);
 
 #endif /* MUTT_EMAIL_EMAIL_H */
index 0214e2b73c33f86af254f2e25ec53ed62f31203b..ccb88ec4d2ac61cb0081d550c558a641b5131a36 100644 (file)
@@ -1445,7 +1445,7 @@ struct Body *mutt_rfc822_parse_message(FILE *fp, struct Body *parent)
   if (!fp || !parent)
     return NULL;
 
-  parent->email = mutt_email_new();
+  parent->email = email_new();
   parent->email->offset = ftello(fp);
   parent->email->env = mutt_rfc822_read_header(fp, parent->email, false, false);
   struct Body *msg = parent->email->content;
index 61dc57b4e54f3e7a7493817ebdd6887a96492b67..78ff8faa3ba614a27f9b246fa89ac70c6266467b 100644 (file)
@@ -642,12 +642,12 @@ void *mutt_hcache_dump(header_cache_t *hc, const struct Email *e, int *off, unsi
  * @retval ptr Success, the restored header (can't be NULL)
  *
  * @note The returned Email must be free'd by caller code with
- *       mutt_email_free().
+ *       email_free().
  */
 struct Email *mutt_hcache_restore(const unsigned char *d)
 {
   int off = 0;
-  struct Email *e = mutt_email_new();
+  struct Email *e = email_new();
   bool convert = !CharsetIsUtf8;
 
   /* skip validate */
index 48914f575945a4d03e75ce19c84fb7ab9cf00419..b4a76f6d07d5636cf60af128079ccf63d5737891 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -657,7 +657,7 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co
 
     case 'c':
       colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_SIZE);
-      mutt_str_pretty_size(tmp, sizeof(tmp), mutt_email_size(e));
+      mutt_str_pretty_size(tmp, sizeof(tmp), email_size(e));
       mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
       add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
       break;
index d411aa888012437c721482af92bab9adfc639f19..d766fd9dc281037467f11f43fc134777b85acbb0 100644 (file)
@@ -1149,7 +1149,7 @@ static int read_headers_fetch_new(struct Mailbox *m, unsigned int msn_begin,
           continue;
         }
 
-        m->emails[idx] = mutt_email_new();
+        m->emails[idx] = email_new();
 
         mdata->max_msn = MAX(mdata->max_msn, h.edata->msn);
         mdata->msn_index[h.edata->msn - 1] = m->emails[idx];
diff --git a/index.c b/index.c
index 31fd1e490ccfcc7732f2d100cd57e3c423df9e21..e0b853defc0e227e666aac421f5912d8a2abfd2f 100644 (file)
--- a/index.c
+++ b/index.c
@@ -1833,7 +1833,7 @@ int mutt_index_menu(void)
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_tagged(&el, Context, CUR_EMAIL, tag);
         ci_send_message(SEND_TO_SENDER, NULL, NULL, Context, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         menu->redraw = REDRAW_FULL;
         break;
       }
@@ -2343,7 +2343,7 @@ int mutt_index_menu(void)
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_tagged(&el, Context, CUR_EMAIL, tag);
           mutt_check_traditional_pgp(&el, &menu->redraw);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         int hint =
             Context->mailbox->emails[Context->mailbox->v2r[menu->current]]->index;
@@ -2457,7 +2457,7 @@ int mutt_index_menu(void)
           else
             mutt_error(_("No thread linked"));
 
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
 
         if (menu->menu == MENU_PAGER)
@@ -2608,7 +2608,7 @@ int mutt_index_menu(void)
           else
             menu->redraw |= REDRAW_CURRENT;
         }
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         break;
       }
 
@@ -2920,7 +2920,7 @@ int mutt_index_menu(void)
           else
             menu->redraw |= REDRAW_CURRENT;
         }
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         break;
       }
 
@@ -2980,7 +2980,7 @@ int mutt_index_menu(void)
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_tagged(&el, Context, CUR_EMAIL, tag);
         ci_bounce_message(Context->mailbox, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         break;
       }
 
@@ -3011,7 +3011,7 @@ int mutt_index_menu(void)
         mutt_emails_set_flag(Context->mailbox, &el, MUTT_PURGE, (op == OP_PURGE_MESSAGE));
         if (C_DeleteUntag)
           mutt_emails_set_flag(Context->mailbox, &el, MUTT_TAG, 0);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
 
         if (tag)
         {
@@ -3130,12 +3130,12 @@ int mutt_index_menu(void)
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_tagged(&el, Context, CUR_EMAIL, tag);
           mutt_check_traditional_pgp(&el, &menu->redraw);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_tagged(&el, Context, CUR_EMAIL, tag);
         mutt_ev_message(Context->mailbox, &el, edit ? EVM_EDIT : EVM_VIEW);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         menu->redraw = REDRAW_FULL;
 
         break;
@@ -3152,7 +3152,7 @@ int mutt_index_menu(void)
           mutt_check_traditional_pgp(&el, &menu->redraw);
         }
         ci_send_message(SEND_FORWARD, NULL, NULL, Context, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         menu->redraw = REDRAW_FULL;
         break;
       }
@@ -3178,7 +3178,7 @@ int mutt_index_menu(void)
           mutt_check_traditional_pgp(&el, &menu->redraw);
         }
         ci_send_message(replyflags, NULL, NULL, Context, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         menu->redraw = REDRAW_FULL;
         break;
       }
@@ -3191,7 +3191,7 @@ int mutt_index_menu(void)
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_tagged(&el, Context, CUR_EMAIL, tag);
         int num_changed = mutt_label_message(Context->mailbox, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
 
         if (num_changed > 0)
         {
@@ -3223,7 +3223,7 @@ int mutt_index_menu(void)
           mutt_check_traditional_pgp(&el, &menu->redraw);
         }
         ci_send_message(SEND_REPLY | SEND_LIST_REPLY, NULL, NULL, Context, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         menu->redraw = REDRAW_FULL;
         break;
       }
@@ -3253,7 +3253,7 @@ int mutt_index_menu(void)
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_tagged(&el, Context, CUR_EMAIL, tag);
         crypt_extract_keys_from_messages(&el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         menu->redraw = REDRAW_FULL;
         break;
       }
@@ -3269,7 +3269,7 @@ int mutt_index_menu(void)
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_tagged(&el, Context, CUR_EMAIL, tag);
           mutt_check_traditional_pgp(&el, &menu->redraw);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
 
         if (menu->menu == MENU_PAGER)
@@ -3287,7 +3287,7 @@ int mutt_index_menu(void)
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_tagged(&el, Context, CUR_EMAIL, tag);
         mutt_pipe_message(Context->mailbox, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
 
 #ifdef USE_IMAP
         /* in an IMAP folder index with imap_peek=no, piping could change
@@ -3307,7 +3307,7 @@ int mutt_index_menu(void)
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_tagged(&el, Context, CUR_EMAIL, tag);
         mutt_print_message(Context->mailbox, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
 
 #ifdef USE_IMAP
         /* in an IMAP folder index with imap_peek=no, printing could change
@@ -3447,7 +3447,7 @@ int mutt_index_menu(void)
             el_add_tagged(&el, Context, CUR_EMAIL, tag);
             ci_send_message(((op == OP_FOLLOWUP) ? SEND_REPLY : SEND_FORWARD) | SEND_NEWS,
                             NULL, NULL, Context, &el);
-            mutt_emaillist_clear(&el);
+            emaillist_clear(&el);
           }
           menu->redraw = REDRAW_FULL;
           break;
@@ -3465,7 +3465,7 @@ int mutt_index_menu(void)
           mutt_check_traditional_pgp(&el, &menu->redraw);
         }
         ci_send_message(SEND_REPLY, NULL, NULL, Context, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         menu->redraw = REDRAW_FULL;
         break;
       }
@@ -3512,7 +3512,7 @@ int mutt_index_menu(void)
 
         mutt_emails_set_flag(Context->mailbox, &el, MUTT_DELETE, 0);
         mutt_emails_set_flag(Context->mailbox, &el, MUTT_PURGE, 0);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
 
         if (tag)
         {
index e27f8681be2d52feac200a625afe322bd2d221aa..b36a30ddc6317e00babee4c133821cda6482312f 100644 (file)
@@ -478,7 +478,7 @@ int maildir_mbox_check(struct Mailbox *m, int *index_hint)
       e->trash = p->email->trash;
 
       /* this is a duplicate of an existing header, so remove it */
-      mutt_email_free(&p->email);
+      email_free(&p->email);
     }
     /* This message was not in the list of messages we just scanned.
      * Check to see if we have enough information to know if the
index 5cb8702bd77c9b8a24787b3354147328f1f53628..7153cabd90b591a96011e58d7818c9de8746ac7e 100644 (file)
@@ -683,7 +683,7 @@ int mh_mbox_check(struct Mailbox *m, int *index_hint)
     m->emails[i]->active = false;
 
     p = mutt_hash_find(fnames, m->emails[i]->path);
-    if (p && p->email && mutt_email_cmp_strict(m->emails[i], p->email))
+    if (p && p->email && email_cmp_strict(m->emails[i], p->email))
     {
       m->emails[i]->active = true;
       /* found the right message */
@@ -691,7 +691,7 @@ int mh_mbox_check(struct Mailbox *m, int *index_hint)
         if (maildir_update_flags(m, m->emails[i], p->email))
           flags_changed = true;
 
-      mutt_email_free(&p->email);
+      email_free(&p->email);
     }
     else /* message has disappeared */
       occult = true;
index 5a58f6478dff89f5bb36e36cda82658e5b8c4c39..c6bf3b80cb38046c6a11dd683caac0157250de57 100644 (file)
@@ -269,7 +269,7 @@ static void maildir_free_entry(struct Maildir **md)
 
   FREE(&(*md)->canon_fname);
   if ((*md)->email)
-    mutt_email_free(&(*md)->email);
+    email_free(&(*md)->email);
 
   FREE(md);
 }
@@ -370,7 +370,7 @@ int maildir_parse_dir(struct Mailbox *m, struct Maildir ***last,
     /* FOO - really ignore the return value? */
     mutt_debug(LL_DEBUG2, "queueing %s\n", de->d_name);
 
-    e = mutt_email_new();
+    e = email_new();
     e->old = is_old;
     if (m->magic == MUTT_MAILDIR)
       maildir_parse_flags(e, de->d_name);
@@ -750,7 +750,7 @@ void maildir_delayed_parsing(struct Mailbox *m, struct Maildir **md, struct Prog
       struct Email *e = mutt_hcache_restore((unsigned char *) data);
       e->old = p->email->old;
       e->path = mutt_str_strdup(p->email->path);
-      mutt_email_free(&p->email);
+      email_free(&p->email);
       p->email = e;
       if (m->magic == MUTT_MAILDIR)
         maildir_parse_flags(p->email, fn);
@@ -777,7 +777,7 @@ void maildir_delayed_parsing(struct Mailbox *m, struct Maildir **md, struct Prog
 #endif
       }
       else
-        mutt_email_free(&p->email);
+        email_free(&p->email);
 #ifdef USE_HCACHE
     }
     mutt_hcache_free(hc, &data);
@@ -1315,7 +1315,7 @@ struct Email *maildir_parse_stream(enum MailboxType magic, FILE *fp,
                                    const char *fname, bool is_old, struct Email *e)
 {
   if (!e)
-    e = mutt_email_new();
+    e = email_new();
   e->env = mutt_rfc822_read_header(fp, e, false, false);
 
   struct stat st;
diff --git a/main.c b/main.c
index 8558deec322b92236b889a19442fe4a27a851b82..a77883feea6f66bcb807660b391d955dc35ca608 100644 (file)
--- a/main.c
+++ b/main.c
@@ -645,7 +645,7 @@ int main(int argc, char *argv[], char *envp[])
 
   if (!STAILQ_EMPTY(&cc_list) || !STAILQ_EMPTY(&bcc_list))
   {
-    e = mutt_email_new();
+    e = email_new();
     e->env = mutt_env_new();
 
     struct ListNode *np = NULL;
@@ -855,7 +855,7 @@ int main(int argc, char *argv[], char *envp[])
       mutt_flushinp();
 
     if (!e)
-      e = mutt_email_new();
+      e = email_new();
     if (!e->env)
       e->env = mutt_env_new();
 
@@ -972,7 +972,7 @@ int main(int argc, char *argv[], char *envp[])
 
         /* Set up a tmp Email with just enough information so that
          * mutt_prepare_template() can parse the message in fp_in.  */
-        struct Email *e_tmp = mutt_email_new();
+        struct Email *e_tmp = email_new();
         e_tmp->offset = 0;
         e_tmp->content = mutt_body_new();
         if (fstat(fileno(fp_in), &st) != 0)
@@ -986,7 +986,7 @@ int main(int argc, char *argv[], char *envp[])
         {
           mutt_error(_("Can't parse message template: %s"), draft_file);
           mutt_env_free(&opts_env);
-          mutt_email_free(&e_tmp);
+          email_free(&e_tmp);
           goto main_curses;
         }
 
@@ -1012,7 +1012,7 @@ int main(int argc, char *argv[], char *envp[])
           mutt_str_replace(&e->env->subject, opts_env->subject);
 
         mutt_env_free(&opts_env);
-        mutt_email_free(&e_tmp);
+        email_free(&e_tmp);
       }
       /* Editing the include_file: pass it directly in.
        * Note that SEND_NO_FREE_HEADER is set above so it isn't unlinked.  */
@@ -1107,7 +1107,7 @@ int main(int argc, char *argv[], char *envp[])
         mutt_file_fclose(&fp_out);
       }
 
-      mutt_email_free(&e);
+      email_free(&e);
     }
 
     /* !edit_infile && draft_file will leave the tempfile around */
index 7ac7662a7ad70b99377e55fcd1f8f02596ccdfce..708ec49fce2b1bb933fd4ebe2aa912c12e95e77b 100644 (file)
@@ -236,7 +236,7 @@ static int mmdf_parse_mailbox(struct Mailbox *m)
 
       if (m->msg_count == m->email_max)
         mx_alloc_memory(m);
-      e = mutt_email_new();
+      e = email_new();
       m->emails[m->msg_count] = e;
       e->offset = loc;
       e->index = m->msg_count;
@@ -422,7 +422,7 @@ static int mbox_parse_mailbox(struct Mailbox *m)
       if (m->msg_count == m->email_max)
         mx_alloc_memory(m);
 
-      m->emails[m->msg_count] = mutt_email_new();
+      m->emails[m->msg_count] = email_new();
       e_cur = m->emails[m->msg_count];
       e_cur->received = t - mutt_date_local_tz(t);
       e_cur->offset = loc;
@@ -586,7 +586,7 @@ static int reopen_mailbox(struct Mailbox *m, int *index_hint)
   if (m->readonly)
   {
     for (int i = 0; i < m->msg_count; i++)
-      mutt_email_free(&(m->emails[i])); /* nothing to do! */
+      email_free(&(m->emails[i])); /* nothing to do! */
     FREE(&m->emails);
   }
   else
@@ -614,7 +614,7 @@ static int reopen_mailbox(struct Mailbox *m, int *index_hint)
   {
     case MUTT_MBOX:
     case MUTT_MMDF:
-      cmp_headers = mutt_email_cmp_strict;
+      cmp_headers = email_cmp_strict;
       mutt_file_fclose(&adata->fp);
       adata->fp = mutt_file_fopen(mutt_b2s(m->pathbuf), "r");
       if (!adata->fp)
@@ -634,7 +634,7 @@ static int reopen_mailbox(struct Mailbox *m, int *index_hint)
   {
     /* free the old headers */
     for (int i = 0; i < old_msg_count; i++)
-      mutt_email_free(&(e_old[i]));
+      email_free(&(e_old[i]));
     FREE(&e_old);
 
     m->quiet = false;
@@ -701,7 +701,7 @@ static int reopen_mailbox(struct Mailbox *m, int *index_hint)
         mutt_set_flag(m, m->emails[i], MUTT_TAG, e_old[j]->tagged);
 
         /* we don't need this header any more */
-        mutt_email_free(&(e_old[j]));
+        email_free(&(e_old[j]));
       }
     }
 
@@ -710,7 +710,7 @@ static int reopen_mailbox(struct Mailbox *m, int *index_hint)
     {
       if (e_old[j])
       {
-        mutt_email_free(&(e_old[j]));
+        email_free(&(e_old[j]));
         msg_mod = true;
       }
     }
@@ -802,13 +802,13 @@ static bool test_last_status_new(FILE *fp)
   if (fseek_last_message(fp) == -1)
     return false;
 
-  e = mutt_email_new();
+  e = email_new();
   tmp_envelope = mutt_rfc822_read_header(fp, e, false, false);
   if (!(e->read || e->old))
     rc = true;
 
   mutt_env_free(&tmp_envelope);
-  mutt_email_free(&e);
+  email_free(&e);
 
   return rc;
 }
index 0a508e22028db1308244a7c0f310f9f0420b73ac..d3d23028459951210d55e1aa7a27c17f573fd967 100644 (file)
@@ -997,7 +997,7 @@ int mutt_decode_save_attachment(FILE *fp, struct Body *m, const char *path,
     m->encoding = saved_encoding;
     if (saved_parts)
     {
-      mutt_email_free(&m->email);
+      email_free(&m->email);
       m->parts = saved_parts;
       m->email = e_saved;
     }
index 72d462c004f84d073f410fc92f24787706738414..a7878226a64046b18b3a1ff4c7a6c9d1a9ce8dfe 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -221,7 +221,7 @@ void mutt_buffer_expand_path_regex(struct Buffer *buf, bool regex)
         struct AddressList *al = mutt_alias_lookup(s + 1);
         if (!TAILQ_EMPTY(al))
         {
-          struct Email *e = mutt_email_new();
+          struct Email *e = email_new();
           e->env = mutt_env_new();
           mutt_addrlist_copy(&e->env->from, al, false);
           mutt_addrlist_copy(&e->env->to, al, false);
@@ -231,7 +231,7 @@ void mutt_buffer_expand_path_regex(struct Buffer *buf, bool regex)
           mutt_default_save(p->data, p->dsize, e);
           mutt_buffer_fix_dptr(p);
 
-          mutt_email_free(&e);
+          email_free(&e);
           /* Avoid infinite recursion if the resulting folder starts with '@' */
           if (*p->data != '@')
             recurse = true;
diff --git a/mx.c b/mx.c
index 446105bffa88d37b03d44d2062a10c1236f1eb93..a3ccdb934e80c64e5c25abd6d04326220286521b 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -418,7 +418,7 @@ void mx_fastclose_mailbox(struct Mailbox *m)
   if (m->emails)
   {
     for (int i = 0; i < m->msg_count; i++)
-      mutt_email_free(&m->emails[i]);
+      email_free(&m->emails[i]);
     FREE(&m->emails);
   }
   FREE(&m->v2r);
@@ -1359,12 +1359,12 @@ int mx_path_canon(char *buf, size_t buflen, const char *folder, enum MailboxType
       if (TAILQ_EMPTY(al))
         break;
 
-      struct Email *e = mutt_email_new();
+      struct Email *e = email_new();
       e->env = mutt_env_new();
       mutt_addrlist_copy(&e->env->from, al, false);
       mutt_addrlist_copy(&e->env->to, al, false);
       mutt_default_save(buf, buflen, e);
-      mutt_email_free(&e);
+      email_free(&e);
       break;
     }
     else
index a121902a001380b15a55f65ea094c20fa2d0a0fd..f967f396457dda3033992d3c0119f41047a8683d 100644 (file)
@@ -1153,7 +1153,7 @@ static int parse_overview_line(char *line, void *data)
     mx_alloc_memory(m);
 
   /* parse header */
-  m->emails[m->msg_count] = mutt_email_new();
+  m->emails[m->msg_count] = email_new();
   e = m->emails[m->msg_count];
   e->env = mutt_rfc822_read_header(fp, e, false, false);
   e->env->newsgroups = mutt_str_strdup(mdata->group);
@@ -1171,7 +1171,7 @@ static int parse_overview_line(char *line, void *data)
     if (hdata)
     {
       mutt_debug(LL_DEBUG2, "mutt_hcache_fetch %s\n", buf);
-      mutt_email_free(&e);
+      email_free(&e);
       e = mutt_hcache_restore(hdata);
       m->emails[m->msg_count] = e;
       mutt_hcache_free(fc->hc, &hdata);
@@ -1221,7 +1221,7 @@ static int parse_overview_line(char *line, void *data)
       mdata->last_loaded = anum;
   }
   else
-    mutt_email_free(&e);
+    email_free(&e);
 
   /* progress */
   if (!m->quiet)
@@ -1356,7 +1356,7 @@ static int nntp_fetch_headers(struct Mailbox *m, void *hc, anum_t first, anum_t
       /* skip header marked as deleted in cache */
       if (e->deleted && !restore)
       {
-        mutt_email_free(&e);
+        email_free(&e);
         if (mdata->bcache)
         {
           mutt_debug(LL_DEBUG2, "#2 mutt_bcache_del %s\n", buf);
@@ -1423,7 +1423,7 @@ static int nntp_fetch_headers(struct Mailbox *m, void *hc, anum_t first, anum_t
       }
 
       /* parse header */
-      m->emails[m->msg_count] = mutt_email_new();
+      m->emails[m->msg_count] = email_new();
       e = m->emails[m->msg_count];
       e->env = mutt_rfc822_read_header(fp, e, false, false);
       e->received = e->date_sent;
@@ -1561,7 +1561,7 @@ static int check_mailbox(struct Mailbox *m)
   if (mdata->last_message < mdata->last_loaded)
   {
     for (int i = 0; i < m->msg_count; i++)
-      mutt_email_free(&m->emails[i]);
+      email_free(&m->emails[i]);
     m->msg_count = 0;
     m->msg_tagged = 0;
 
@@ -1617,13 +1617,13 @@ static int check_mailbox(struct Mailbox *m)
           e->edata = NULL;
           deleted = e->deleted;
           flagged = e->flagged;
-          mutt_email_free(&e);
+          email_free(&e);
 
           /* header marked as deleted, removing from context */
           if (deleted)
           {
             mutt_set_flag(m, m->emails[i], MUTT_TAG, false);
-            mutt_email_free(&m->emails[i]);
+            email_free(&m->emails[i]);
             continue;
           }
         }
@@ -1665,7 +1665,7 @@ static int check_mailbox(struct Mailbox *m)
         e->edata = NULL;
         if (e->deleted)
         {
-          mutt_email_free(&e);
+          email_free(&e);
           if (mdata->bcache)
           {
             mutt_debug(LL_DEBUG2, "mutt_bcache_del %s\n", buf);
@@ -2251,7 +2251,7 @@ int nntp_check_msgid(struct Mailbox *m, const char *msgid)
   /* parse header */
   if (m->msg_count == m->email_max)
     mx_alloc_memory(m);
-  m->emails[m->msg_count] = mutt_email_new();
+  m->emails[m->msg_count] = email_new();
   struct Email *e = m->emails[m->msg_count];
   e->edata = nntp_edata_new();
   e->free_edata = nntp_edata_free;
@@ -2266,7 +2266,7 @@ int nntp_check_msgid(struct Mailbox *m, const char *msgid)
     snprintf(buf, sizeof(buf), "STAT %s\r\n", msgid);
     if (nntp_query(mdata, buf, sizeof(buf)) < 0)
     {
-      mutt_email_free(&e);
+      email_free(&e);
       return -1;
     }
     sscanf(buf + 4, ANUM, &nntp_edata_get(e)->article_num);
index fc413c4d9b87db0e83bb62e51728fafc50fd4b8b..cc74d241ca7d95386f55b497bd3f6911523f1d12 100644 (file)
@@ -983,7 +983,7 @@ static void append_message(header_cache_t *h, struct Mailbox *m,
 #endif
   if (init_email(e, newpath ? newpath : path, msg) != 0)
   {
-    mutt_email_free(&e);
+    email_free(&e);
     mutt_debug(LL_DEBUG1, "nm: failed to append email!\n");
     goto done;
   }
diff --git a/pager.c b/pager.c
index 29adb1d66f07b779dfa7f10c0189726ab9bb0b1d..2b5e7d4d0909ac4ccea926bcf2708de8047b7ca3 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -2954,7 +2954,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_email(&el, extra->email);
           ci_bounce_message(m, &el);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         break;
       }
@@ -2979,7 +2979,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_email(&el, extra->email);
           ci_send_message(SEND_TO_SENDER, NULL, NULL, extra->ctx, &el);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         pager_menu->redraw = REDRAW_FULL;
         break;
@@ -3038,7 +3038,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           ch = -1;
           rc = OP_MAIN_NEXT_UNDELETED;
         }
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         break;
       }
 
@@ -3144,7 +3144,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_tagged(&el, extra->ctx, extra->email, false);
           mutt_pipe_message(extra->ctx->mailbox, &el);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         break;
 
@@ -3157,7 +3157,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_tagged(&el, extra->ctx, extra->email, false);
           mutt_print_message(extra->ctx->mailbox, &el);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         break;
 
@@ -3196,7 +3196,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_email(&el, extra->email);
           ci_send_message(SEND_NEWS | SEND_FORWARD, NULL, NULL, extra->ctx, &el);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         pager_menu->redraw = REDRAW_FULL;
         break;
@@ -3229,7 +3229,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
             struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
             el_add_email(&el, extra->email);
             ci_send_message(SEND_NEWS | SEND_REPLY, NULL, NULL, extra->ctx, &el);
-            mutt_emaillist_clear(&el);
+            emaillist_clear(&el);
           }
           pager_menu->redraw = REDRAW_FULL;
           break;
@@ -3259,7 +3259,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_email(&el, extra->email);
           ci_send_message(replyflags, NULL, NULL, extra->ctx, &el);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         pager_menu->redraw = REDRAW_FULL;
         break;
@@ -3272,7 +3272,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_email(&el, extra->email);
         ci_send_message(SEND_POSTPONED, NULL, NULL, extra->ctx, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         pager_menu->redraw = REDRAW_FULL;
         break;
       }
@@ -3287,7 +3287,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
           el_add_email(&el, extra->email);
           ci_send_message(SEND_FORWARD, NULL, NULL, extra->ctx, &el);
-          mutt_emaillist_clear(&el);
+          emaillist_clear(&el);
         }
         pager_menu->redraw = REDRAW_FULL;
         break;
@@ -3334,7 +3334,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
           else
             pager_menu->redraw |= REDRAW_STATUS | REDRAW_INDEX;
         }
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         break;
       }
 
@@ -3468,7 +3468,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_email(&el, extra->email);
         ci_send_message(SEND_KEY, NULL, NULL, extra->ctx, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         pager_menu->redraw = REDRAW_FULL;
         break;
       }
@@ -3480,7 +3480,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_email(&el, extra->email);
         rc = mutt_label_message(Context->mailbox, &el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
 
         if (rc > 0)
         {
@@ -3510,7 +3510,7 @@ int mutt_pager(const char *banner, const char *fname, PagerFlags flags, struct P
         struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
         el_add_email(&el, extra->email);
         crypt_extract_keys_from_messages(&el);
-        mutt_emaillist_clear(&el);
+        emaillist_clear(&el);
         pager_menu->redraw = REDRAW_FULL;
         break;
       }
index 2d8a27ef90e3157c0027e1bd3b3ddb2878be99b1..baa16027eddd01a57e531ae82a5c9027f0d3cae4 100644 (file)
--- a/pop/pop.c
+++ b/pop/pop.c
@@ -287,7 +287,7 @@ static int fetch_uidl(const char *line, void *data)
       mx_alloc_memory(m);
 
     m->msg_count++;
-    m->emails[i] = mutt_email_new();
+    m->emails[i] = email_new();
 
     m->emails[i]->edata = pop_edata_new(line);
     m->emails[i]->free_edata = pop_edata_free;
@@ -472,7 +472,7 @@ static int pop_fetch_headers(struct Mailbox *m)
          *   hcache so there shouldn't be a memleak here) */
         struct Email *e = mutt_hcache_restore((unsigned char *) data);
         mutt_hcache_free(hc, &data);
-        mutt_email_free(&m->emails[i]);
+        email_free(&m->emails[i]);
         m->emails[i] = e;
         m->emails[i]->refno = refno;
         m->emails[i]->index = index;
@@ -532,7 +532,7 @@ static int pop_fetch_headers(struct Mailbox *m)
   if (rc < 0)
   {
     for (int i = m->msg_count; i < new_count; i++)
-      mutt_email_free(&m->emails[i]);
+      email_free(&m->emails[i]);
     return rc;
   }
 
index a428ea293dcc981f4517e189635a8ff4434c2702..a8fb7d3e5c6e04a17e5f3890cd6457874aca29be 100644 (file)
@@ -130,7 +130,7 @@ static int fetch_capa(const char *line, void *data)
   if (mutt_str_startswith(line, "SASL", CASE_IGNORE))
   {
     FREE(&adata->auth_list);
-    const charc = mutt_str_skip_email_wsp(line + 4);
+    const char *c = mutt_str_skip_email_wsp(line + 4);
     adata->auth_list = mutt_str_strdup(c);
   }
 
diff --git a/query.c b/query.c
index 07aa282654d232a6927da0bad2338ccaa91dcfe3..9150cd152ca280cc29893046228643b7be013721 100644 (file)
--- a/query.c
+++ b/query.c
@@ -508,7 +508,7 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, bool ret
         /* fallthrough */
         case OP_MAIL:
         {
-          struct Email *e = mutt_email_new();
+          struct Email *e = email_new();
           e->env = mutt_env_new();
           if (!menu->tagprefix)
           {
index 6a45be303be0f8e0546cbcdf1bd5ee710bbbf230..8b7430d46cdb00a126bf2c605fe826cad429693f 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -480,7 +480,7 @@ static void attach_forward_bodies(FILE *fp, struct Email *e, struct AttachCtx *a
     fp_parent = actx->fp_root;
   }
 
-  struct Email *e_tmp = mutt_email_new();
+  struct Email *e_tmp = email_new();
   e_tmp->env = mutt_env_new();
   mutt_make_forward_subject(e_tmp->env, Context->mailbox, e_parent);
 
@@ -489,7 +489,7 @@ static void attach_forward_bodies(FILE *fp, struct Email *e, struct AttachCtx *a
   if (!fp_tmp)
   {
     mutt_error(_("Can't open temporary file %s"), tmpbody);
-    mutt_email_free(&e_tmp);
+    email_free(&e_tmp);
     return;
   }
 
@@ -597,7 +597,7 @@ static void attach_forward_bodies(FILE *fp, struct Email *e, struct AttachCtx *a
   struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
   el_add_email(&el, e_parent);
   ci_send_message(SEND_NO_FLAGS, e_tmp, tmpbody, NULL, &el);
-  mutt_emaillist_clear(&el);
+  emaillist_clear(&el);
   return;
 
 bail:
@@ -608,7 +608,7 @@ bail:
     mutt_file_unlink(tmpbody);
   }
 
-  mutt_email_free(&e_tmp);
+  email_free(&e_tmp);
 }
 
 /**
@@ -652,7 +652,7 @@ static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx,
     }
   }
 
-  e_tmp = mutt_email_new();
+  e_tmp = email_new();
   e_tmp->env = mutt_env_new();
   mutt_make_forward_subject(e_tmp->env, Context->mailbox, e_cur);
 
@@ -668,7 +668,7 @@ static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx,
     if (!fp_tmp)
     {
       mutt_error(_("Can't create %s"), tmpbody);
-      mutt_email_free(&e_tmp);
+      email_free(&e_tmp);
       return;
     }
 
@@ -728,12 +728,12 @@ static void attach_forward_msgs(FILE *fp, struct AttachCtx *actx,
     }
   }
   else
-    mutt_email_free(&e_tmp);
+    email_free(&e_tmp);
 
   struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
   el_add_email(&el, e_cur);
   ci_send_message(flags, e_tmp, (tmpbody[0] != '\0') ? tmpbody : NULL, NULL, &el);
-  mutt_emaillist_clear(&el);
+  emaillist_clear(&el);
 }
 
 /**
@@ -945,13 +945,13 @@ void mutt_attach_reply(FILE *fp, struct Email *e, struct AttachCtx *actx,
   else if (nattach == 1)
     mime_reply_any = true;
 
-  e_tmp = mutt_email_new();
+  e_tmp = email_new();
   e_tmp->env = mutt_env_new();
 
   if (attach_reply_envelope_defaults(
           e_tmp->env, actx, e_parent ? e_parent : (e_cur ? e_cur->email : NULL), flags) == -1)
   {
-    mutt_email_free(&e_tmp);
+    email_free(&e_tmp);
     return;
   }
 
@@ -960,7 +960,7 @@ void mutt_attach_reply(FILE *fp, struct Email *e, struct AttachCtx *actx,
   if (!fp_tmp)
   {
     mutt_error(_("Can't create %s"), tmpbody);
-    mutt_email_free(&e_tmp);
+    email_free(&e_tmp);
     return;
   }
 
@@ -1030,7 +1030,7 @@ void mutt_attach_reply(FILE *fp, struct Email *e, struct AttachCtx *actx,
     if (mime_reply_any && !e_cur &&
         !copy_problematic_attachments(&e_tmp->content, actx, false))
     {
-      mutt_email_free(&e_tmp);
+      email_free(&e_tmp);
       mutt_file_fclose(&fp_tmp);
       return;
     }
@@ -1044,7 +1044,7 @@ void mutt_attach_reply(FILE *fp, struct Email *e, struct AttachCtx *actx,
   {
     mutt_set_flag(Context->mailbox, e, MUTT_REPLIED, true);
   }
-  mutt_emaillist_clear(&el);
+  emaillist_clear(&el);
 }
 
 /**
@@ -1065,7 +1065,7 @@ void mutt_attach_mail_sender(FILE *fp, struct Email *e, struct AttachCtx *actx,
     return;
   }
 
-  struct Email *e_tmp = mutt_email_new();
+  struct Email *e_tmp = email_new();
   e_tmp->env = mutt_env_new();
 
   if (cur)
diff --git a/send.c b/send.c
index 9f48a85307751f78157026ca2c8f34d28f293b62..4b1eaee13ff526960dd0a03340805a599ca7f29a 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1461,11 +1461,11 @@ static void fix_end_of_file(const char *data)
  */
 int mutt_resend_message(FILE *fp, struct Context *ctx, struct Email *e_cur)
 {
-  struct Email *e_new = mutt_email_new();
+  struct Email *e_new = email_new();
 
   if (mutt_prepare_template(fp, ctx->mailbox, e_new, e_cur, true) < 0)
   {
-    mutt_email_free(&e_new);
+    email_free(&e_new);
     return -1;
   }
 
@@ -1493,7 +1493,7 @@ int mutt_resend_message(FILE *fp, struct Context *ctx, struct Email *e_cur)
   struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
   el_add_email(&el, e_cur);
   int rc = ci_send_message(SEND_RESEND, e_new, NULL, ctx, &el);
-  mutt_emaillist_clear(&el);
+  emaillist_clear(&el);
 
   return rc;
 }
@@ -1891,7 +1891,7 @@ int ci_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile
 
   if (!e_templ)
   {
-    e_templ = mutt_email_new();
+    e_templ = email_new();
 
     if (flags == SEND_POSTPONED)
     {
@@ -2591,7 +2591,7 @@ cleanup:
 
   mutt_file_fclose(&fp_tmp);
   if (!(flags & SEND_NO_FREE_HEADER))
-    mutt_email_free(&e_templ);
+    email_free(&e_templ);
 
   FREE(&finalpath);
   return rc;
index 6b3ecf1781c2a3fa8e3b14090110dbac0f98da06..afe925a6367728f0f0a2b87c7994836b55d7a905 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1549,7 +1549,7 @@ struct Body *mutt_make_message_attach(struct Mailbox *m, struct Email *e, bool a
   fflush(fp);
   rewind(fp);
 
-  body->email = mutt_email_new();
+  body->email = email_new();
   body->email->offset = 0;
   /* we don't need the user headers here */
   body->email->env = mutt_rfc822_read_header(fp, body->email, false, false);
index a20d6ecaca3a990c2f2e9522182abe7d66db2974..efa5553b373f952788593a0cbcc0e281fd94c56d 100644 (file)
@@ -114,10 +114,10 @@ DATE_OBJS = test/date/mutt_date_add_timeout.o \
                  test/date/mutt_date_parse_date.o \
                  test/date/mutt_date_parse_imap.o
 
-EMAIL_OBJS     = test/email/mutt_email_new.o \
-                 test/email/mutt_email_free.o \
-                 test/email/mutt_email_size.o \
-                 test/email/mutt_email_cmp_strict.o
+EMAIL_OBJS     = test/email/email_new.o \
+                 test/email/email_free.o \
+                 test/email/email_size.o \
+                 test/email/email_cmp_strict.o
 
 ENVELOPE_OBJS  = test/envelope/mutt_env_free.o \
                  test/envelope/mutt_env_cmp_strict.o \
similarity index 78%
rename from test/email/mutt_email_cmp_strict.c
rename to test/email/email_cmp_strict.c
index c0abd7084bca3d746868471604bd16ddad53ed5c..5acc19185c0d2718a28105523b6022c7107e44bc 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * @file
- * Test code for mutt_email_cmp_strict()
+ * Test code for email_cmp_strict()
  *
  * @authors
  * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
 #include "address/lib.h"
 #include "email/lib.h"
 
-void test_mutt_email_cmp_strict(void)
+void test_email_cmp_strict(void)
 {
-  // bool mutt_email_cmp_strict(const struct Email *e1, const struct Email *e2);
+  // bool email_cmp_strict(const struct Email *e1, const struct Email *e2);
 
   {
     struct Email e = { 0 };
-    TEST_CHECK(!mutt_email_cmp_strict(NULL, &e));
+    TEST_CHECK(!email_cmp_strict(NULL, &e));
   }
 
   {
     struct Email e = { 0 };
-    TEST_CHECK(!mutt_email_cmp_strict(&e, NULL));
+    TEST_CHECK(!email_cmp_strict(&e, NULL));
   }
 }
similarity index 78%
rename from test/email/mutt_email_free.c
rename to test/email/email_free.c
index 7144f615e9d960dda1913e6cca603138415f1485..3bc50617e8192e3f9206accae1b261a3465b3cc9 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * @file
- * Test code for mutt_email_free()
+ * Test code for email_free()
  *
  * @authors
  * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
 #include "address/lib.h"
 #include "email/lib.h"
 
-void test_mutt_email_free(void)
+void test_email_free(void)
 {
-  // void mutt_email_free(struct Email **e);
+  // void email_free(struct Email **e);
 
   {
-    mutt_email_free(NULL);
-    TEST_CHECK_(1, "mutt_email_free(NULL)");
+    email_free(NULL);
+    TEST_CHECK_(1, "email_free(NULL)");
   }
 
   {
     struct Email *e = NULL;
-    mutt_email_free(&e);
-    TEST_CHECK_(1, "mutt_email_free(&e)");
+    email_free(&e);
+    TEST_CHECK_(1, "email_free(&e)");
   }
 }
similarity index 89%
rename from test/email/mutt_email_new.c
rename to test/email/email_new.c
index 574c8c000af202f019cf50d7e2eff68ea2a585a8..7f1e8a0997ba309ed919c142fa485c857c6bf908 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * @file
- * Test code for mutt_email_new()
+ * Test code for email_new()
  *
  * @authors
  * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
@@ -27,7 +27,7 @@
 #include "address/lib.h"
 #include "email/lib.h"
 
-void test_mutt_email_new(void)
+void test_email_new(void)
 {
-  // struct Email *mutt_email_new(void);
+  // struct Email *email_new(void);
 }
similarity index 84%
rename from test/email/mutt_email_size.c
rename to test/email/email_size.c
index 5e20d7d41dc779a37b799a93655c520ece1d3c08..124ecb9afa31b68860ec282f37e4c91099ee715a 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * @file
- * Test code for mutt_email_size()
+ * Test code for email_size()
  *
  * @authors
  * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
 #include "address/lib.h"
 #include "email/lib.h"
 
-void test_mutt_email_size(void)
+void test_email_size(void)
 {
-  // size_t mutt_email_size(const struct Email *e);
+  // size_t email_size(const struct Email *e);
 
   {
-    TEST_CHECK(mutt_email_size(NULL) == 0);
+    TEST_CHECK(email_size(NULL) == 0);
   }
 }
index a4b02aa903e8a288ad89dc5766cbd6c49699d9e6..2f36947ec27c0c873e05697bdac5525716390403 100644 (file)
   NEOMUTT_TEST_ITEM(test_mutt_date_normalize_time)                             \
   NEOMUTT_TEST_ITEM(test_mutt_date_parse_date)                                 \
   NEOMUTT_TEST_ITEM(test_mutt_date_parse_imap)                                 \
-  NEOMUTT_TEST_ITEM(test_mutt_email_cmp_strict)                                \
-  NEOMUTT_TEST_ITEM(test_mutt_email_free)                                      \
-  NEOMUTT_TEST_ITEM(test_mutt_email_new)                                       \
-  NEOMUTT_TEST_ITEM(test_mutt_email_size)                                      \
+  NEOMUTT_TEST_ITEM(test_email_cmp_strict)                                     \
+  NEOMUTT_TEST_ITEM(test_email_free)                                           \
+  NEOMUTT_TEST_ITEM(test_email_new)                                            \
+  NEOMUTT_TEST_ITEM(test_email_size)                                           \
   NEOMUTT_TEST_ITEM(test_mutt_env_cmp_strict)                                  \
   NEOMUTT_TEST_ITEM(test_mutt_env_free)                                        \
   NEOMUTT_TEST_ITEM(test_mutt_env_merge)                                       \