From: Richard Russon Date: Tue, 3 Jul 2018 22:54:25 +0000 (+0100) Subject: move Header to library X-Git-Tag: 2019-10-25~762^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=959f7ae6770e138b02d409a6cb0291c67c6208e0;p=neomutt move Header to library --- diff --git a/Makefile.autosetup b/Makefile.autosetup index e62029ffa..5c3555170 100644 --- a/Makefile.autosetup +++ b/Makefile.autosetup @@ -65,8 +65,8 @@ NEOMUTTOBJS= addrbook.o alias.o bcache.o browser.o buffy.o \ color.o commands.o complete.o compose.o compress.o \ conststrings.o copy.o curs_lib.o curs_main.o edit.o editmsg.o \ enriched.o enter.o filter.o flags.o from.o group.o handler.o \ - hdrline.o header.o help.o history.o hook.o init.o keymap.o \ - main.o mbox.o menu.o mh.o muttlib.o mutt_account.o mutt_attach.o mutt_body.o \ + hdrline.o help.o history.o hook.o init.o keymap.o \ + main.o mbox.o menu.o mh.o muttlib.o mutt_account.o mutt_attach.o mutt_body.o mutt_header.o \ mutt_logging.o mutt_signal.o mutt_socket.o mutt_thread.o mutt_window.o mx.o newsrc.o \ nntp.o pager.o parse.o pattern.o pop.o pop_auth.o pop_lib.o \ postpone.o progress.o query.o recvattach.o recvcmd.o resize.o rfc1524.o \ @@ -94,7 +94,7 @@ ALLOBJS+= $(NEOMUTTOBJS) LIBMUTT= libmutt.a LIBMUTTOBJS= mutt/address.o mutt/attach.o mutt/base64.o mutt/body.o mutt/buffer.o mutt/charset.o \ mutt/date.o mutt/envelope.o mutt/envlist.o mutt/exit.o mutt/file.o mutt/hash.o \ - mutt/idna.o mutt/list.o mutt/logging.o mutt/mapping.o \ + mutt/header.o mutt/idna.o mutt/list.o mutt/logging.o mutt/mapping.o \ mutt/mbyte.o mutt/md5.o mutt/memory.o mutt/mime.o \ mutt/parameter.o mutt/regex.o mutt/rfc2047.o mutt/sha1.o \ mutt/signal.o mutt/string.o mutt/tags.o mutt/thread.o @@ -265,13 +265,13 @@ git_ver.h: $(ALL_FILES) hcache/hcversion.h: $(SRCDIR)/mutt.h $(SRCDIR)/mutt/address.h \ $(SRCDIR)/mutt/list.h $(SRCDIR)/mutt/buffer.h \ $(SRCDIR)/mutt/parameter.h $(SRCDIR)/mutt/body.h \ - $(SRCDIR)/mutt/envelope.h $(SRCDIR)/header.h \ + $(SRCDIR)/mutt/envelope.h $(SRCDIR)/mutt/header.h \ $(SRCDIR)/hcache/hcachever.sh $(MKDIR_P) $(PWD)/hcache ( echo '#include "config.h"'; echo '#include "mutt.h"'; \ echo '#include "mutt/address.h"'; echo '#include "mutt/list.h"'; \ echo '#include "mutt/buffer.h"'; echo '#include "mutt/parameter.h"'; \ - echo '#include "header.h"';) | $(CPP) $(CFLAGS) - | \ + echo '#include "mutt/header.h"';) | $(CPP) $(CFLAGS) - | \ sh $(SRCDIR)/hcache/hcachever.sh hcache/hcversion.h # clean diff --git a/buffy.c b/buffy.c index 8eb209e2d..9378fd294 100644 --- a/buffy.c +++ b/buffy.c @@ -34,7 +34,6 @@ #include "buffy.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mutt_menu.h" diff --git a/color.c b/color.c index 8269e5bfa..defd6d1b1 100644 --- a/color.c +++ b/color.c @@ -30,7 +30,6 @@ #include "mutt.h" #include "context.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mutt_curses.h" #include "mutt_menu.h" diff --git a/commands.c b/commands.c index 3bf6a3ec2..98639cbb5 100644 --- a/commands.c +++ b/commands.c @@ -39,7 +39,6 @@ #include "filter.h" #include "format_flags.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mailbox.h" #include "mutt_curses.h" diff --git a/compose.c b/compose.c index 42990b379..8126479e8 100644 --- a/compose.c +++ b/compose.c @@ -36,7 +36,6 @@ #include "context.h" #include "format_flags.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mailbox.h" #include "mutt_attach.h" diff --git a/copy.c b/copy.c index d37349ae2..b70f00289 100644 --- a/copy.c +++ b/copy.c @@ -37,7 +37,6 @@ #include "context.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mutt_window.h" diff --git a/curs_lib.c b/curs_lib.c index 8faada1df..2d4a48c20 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -43,7 +43,6 @@ #include "context.h" #include "enter_state.h" #include "globals.h" -#include "header.h" #include "mutt_curses.h" #include "mutt_menu.h" #include "mutt_window.h" diff --git a/curs_main.c b/curs_main.c index 4718086d9..e81a15e90 100644 --- a/curs_main.c +++ b/curs_main.c @@ -36,7 +36,6 @@ #include "context.h" #include "format_flags.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mailbox.h" #include "mutt_curses.h" diff --git a/edit.c b/edit.c index 1c7ba70af..4f2855947 100644 --- a/edit.c +++ b/edit.c @@ -34,7 +34,6 @@ #include "alias.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mutt_curses.h" #include "mutt_window.h" #include "options.h" diff --git a/editmsg.c b/editmsg.c index f169fc07d..18c81c567 100644 --- a/editmsg.c +++ b/editmsg.c @@ -40,7 +40,6 @@ #include "context.h" #include "copy.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mx.h" #include "options.h" diff --git a/flags.c b/flags.c index b54a3dcc5..3f0a32472 100644 --- a/flags.c +++ b/flags.c @@ -33,7 +33,6 @@ #include "mutt.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mutt_curses.h" #include "mutt_menu.h" #include "mutt_window.h" diff --git a/hcache/hcache.c b/hcache/hcache.c index 5c3505a0c..fd237be38 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -52,7 +52,6 @@ #include "globals.h" #include "hcache.h" #include "hcache/hcversion.h" -#include "header.h" #include "protos.h" static unsigned int hcachever = 0x0; diff --git a/hdrline.c b/hdrline.c index 8dc0a2099..00361bce4 100644 --- a/hdrline.c +++ b/hdrline.c @@ -34,7 +34,6 @@ #include "context.h" #include "format_flags.h" #include "globals.h" -#include "header.h" #include "mbtable.h" #include "mutt_curses.h" #include "mutt_thread.h" diff --git a/hook.c b/hook.c index 9646cd217..7d1b547e2 100644 --- a/hook.c +++ b/hook.c @@ -36,7 +36,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "ncrypt/ncrypt.h" #include "options.h" diff --git a/imap/command.c b/imap/command.c index 13be77a79..7eb42e2c4 100644 --- a/imap/command.c +++ b/imap/command.c @@ -42,7 +42,6 @@ #include "buffy.h" #include "context.h" #include "globals.h" -#include "header.h" #include "imap/imap.h" #include "mailbox.h" #include "message.h" diff --git a/imap/imap.c b/imap/imap.c index 4f423856e..839583cb4 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -47,7 +47,6 @@ #include "buffy.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "message.h" #include "mutt_account.h" diff --git a/imap/message.c b/imap/message.c index 33a189fc1..10ce5a837 100644 --- a/imap/message.c +++ b/imap/message.c @@ -42,7 +42,6 @@ #include "bcache.h" #include "context.h" #include "globals.h" -#include "header.h" #include "imap/imap.h" #include "mailbox.h" #include "mutt_account.h" diff --git a/imap/util.c b/imap/util.c index fccfdbf45..d73ddf757 100644 --- a/imap/util.c +++ b/imap/util.c @@ -47,7 +47,6 @@ #include "bcache.h" #include "context.h" #include "globals.h" -#include "header.h" #include "imap/imap.h" #include "mailbox.h" #include "message.h" diff --git a/init.c b/init.c index 3829bd19a..298113d65 100644 --- a/init.c +++ b/init.c @@ -42,7 +42,6 @@ #include "filter.h" #include "group.h" #include "hcache/hcache.h" -#include "header.h" #include "history.h" #include "keymap.h" #include "mailbox.h" diff --git a/main.c b/main.c index 969d339b2..410708c85 100644 --- a/main.c +++ b/main.c @@ -47,7 +47,6 @@ #include "alias.h" #include "buffy.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mailbox.h" #include "mutt_curses.h" diff --git a/mbox.c b/mbox.c index cb032c80f..d8ccaa5cb 100644 --- a/mbox.c +++ b/mbox.c @@ -38,7 +38,6 @@ #include "context.h" #include "copy.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mutt_thread.h" @@ -595,37 +594,6 @@ static int mbox_msg_open_new(struct Context *ctx, struct Message *msg, struct He return 0; } -/** - * mbox_strict_cmp_headers - Strictly compare message headers - * @param h1 First Header - * @param h2 Second Header - * @retval true Headers are strictly identical - */ -bool mbox_strict_cmp_headers(const struct Header *h1, const struct Header *h2) -{ - if (h1 && h2) - { - if ((h1->received != h2->received) || (h1->date_sent != h2->date_sent) || - (h1->content->length != h2->content->length) || - (h1->lines != h2->lines) || (h1->zhours != h2->zhours) || - (h1->zminutes != h2->zminutes) || (h1->zoccident != h2->zoccident) || - (h1->mime != h2->mime) || !mutt_env_cmp_strict(h1->env, h2->env) || - !mutt_body_cmp_strict(h1->content, h2->content)) - { - return false; - } - else - return true; - } - else - { - if (!h1 && !h2) - return true; - else - return false; - } -} - /** * reopen_mailbox - Close and reopen a mailbox * @param ctx Mailbox @@ -702,7 +670,7 @@ static int reopen_mailbox(struct Context *ctx, int *index_hint) { case MUTT_MBOX: case MUTT_MMDF: - cmp_headers = mbox_strict_cmp_headers; + cmp_headers = mutt_header_cmp_strict; mutt_file_fclose(&ctx->fp); ctx->fp = mutt_file_fopen(ctx->path, "r"); if (!ctx->fp) diff --git a/mh.c b/mh.c index 9a89ea663..7dca50e21 100644 --- a/mh.c +++ b/mh.c @@ -44,7 +44,6 @@ #include "context.h" #include "copy.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mutt_thread.h" @@ -2529,7 +2528,7 @@ static int mh_mbox_check(struct Context *ctx, int *index_hint) ctx->hdrs[i]->active = false; p = mutt_hash_find(fnames, ctx->hdrs[i]->path); - if (p && p->h && mbox_strict_cmp_headers(ctx->hdrs[i], p->h)) + if (p && p->h && mutt_header_cmp_strict(ctx->hdrs[i], p->h)) { ctx->hdrs[i]->active = true; /* found the right message */ diff --git a/header.h b/mutt/header.h similarity index 96% rename from header.h rename to mutt/header.h index 0645765dd..31029c156 100644 --- a/header.h +++ b/mutt/header.h @@ -26,7 +26,8 @@ #include #include #include -#include "mutt/mutt.h" +#include "list.h" +#include "tags.h" /** * struct Header - The header/envelope of an email @@ -55,9 +56,7 @@ struct Header bool recip_valid : 1; /**< is_recipient is valid */ bool active : 1; /**< message is not to be removed */ bool trash : 1; /**< message is marked as trashed on disk. - * This flag is used by the maildir_trash - * option. - */ + * This flag is used by the maildir_trash option. */ bool xlabel_changed : 1; /**< editable - used for syncing */ /* timezone of the sender of this message */ @@ -117,9 +116,8 @@ struct Header char *maildir_flags; /**< unknown maildir flags */ }; +bool mutt_header_cmp_strict(const struct Header *h1, const struct Header *h2); void mutt_header_free(struct Header **h); struct Header *mutt_header_new(void); -bool mbox_strict_cmp_headers(const struct Header *h1, const struct Header *h2); - #endif /* _MUTT_HEADER_H */ diff --git a/mutt/mutt.h b/mutt/mutt.h index fb4e8c794..20361571d 100644 --- a/mutt/mutt.h +++ b/mutt/mutt.h @@ -39,6 +39,7 @@ * | mutt/exit.c | @subpage exit | * | mutt/file.c | @subpage file | * | mutt/hash.c | @subpage hash | + * | mutt/header.c | @subpage header | * | mutt/idna.c | @subpage idna | * | mutt/list.c | @subpage list | * | mutt/logging.c | @subpage logging | @@ -76,6 +77,7 @@ #include "exit.h" #include "file.h" #include "hash.h" +#include "header.h" #include "idna2.h" #include "list.h" #include "logging.h" diff --git a/mutt/thread.c b/mutt/thread.c index 260f7ae76..9caeb2529 100644 --- a/mutt/thread.c +++ b/mutt/thread.c @@ -32,7 +32,7 @@ #include #include #include -#include "header.h" +#include "thread.h" /** * is_descendant - Is one thread a descendant of another diff --git a/mutt_attach.c b/mutt_attach.c index 349d238b9..0991ad471 100644 --- a/mutt_attach.c +++ b/mutt_attach.c @@ -33,7 +33,6 @@ #include "filter.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mx.h" diff --git a/header.c b/mutt_header.c similarity index 92% rename from header.c rename to mutt_header.c index fe16ef613..2910efe65 100644 --- a/header.c +++ b/mutt_header.c @@ -28,15 +28,118 @@ #include #include #include "mutt/mutt.h" -#include "mutt.h" -#include "header.h" #include "alias.h" #include "context.h" #include "globals.h" #include "ncrypt/ncrypt.h" -#include "options.h" #include "protos.h" +static void label_ref_dec(struct Context *ctx, char *label) +{ + struct HashElem *elem = mutt_hash_find_elem(ctx->label_hash, label); + if (!elem) + return; + + uintptr_t count = (uintptr_t) elem->data; + if (count <= 1) + { + mutt_hash_delete(ctx->label_hash, label, NULL); + return; + } + + count--; + elem->data = (void *) count; +} + +static void label_ref_inc(struct Context *ctx, char *label) +{ + uintptr_t count; + + struct HashElem *elem = mutt_hash_find_elem(ctx->label_hash, label); + if (!elem) + { + count = 1; + mutt_hash_insert(ctx->label_hash, label, (void *) count); + return; + } + + count = (uintptr_t) elem->data; + count++; + elem->data = (void *) count; +} + +/** + * label_message - add an X-Label: field + */ +static bool label_message(struct Context *ctx, struct Header *hdr, char *new) +{ + if (!hdr) + return false; + if (mutt_str_strcmp(hdr->env->x_label, new) == 0) + return false; + + if (hdr->env->x_label) + label_ref_dec(ctx, hdr->env->x_label); + mutt_str_replace(&hdr->env->x_label, new); + if (hdr->env->x_label) + label_ref_inc(ctx, hdr->env->x_label); + + hdr->changed = true; + hdr->xlabel_changed = true; + return true; +} + +int mutt_label_message(struct Header *hdr) +{ + char buf[LONG_STRING], *new = NULL; + int changed; + + if (!Context || !Context->label_hash) + return 0; + + *buf = '\0'; + if (hdr != NULL && hdr->env->x_label != NULL) + { + mutt_str_strfcpy(buf, hdr->env->x_label, sizeof(buf)); + } + + if (mutt_get_field("Label: ", buf, sizeof(buf), MUTT_LABEL /* | MUTT_CLEAR */) != 0) + return 0; + + new = buf; + SKIPWS(new); + if (*new == '\0') + new = NULL; + + changed = 0; + if (hdr) + { + if (label_message(Context, hdr, new)) + { + changed++; + mutt_set_header_color(Context, hdr); + } + } + else + { + for (int i = 0; i < Context->msgcount; ++i) + { + if (!message_is_tagged(Context, i)) + continue; + + struct Header *h = Context->hdrs[i]; + if (label_message(Context, h, new)) + { + changed++; + mutt_set_flag(Context, h, MUTT_TAG, 0); + /* mutt_set_flag re-evals the header color */ + } + } + } + + return changed; +} + void mutt_edit_headers(const char *editor, const char *body, struct Header *msg, char *fcc, size_t fcclen) { @@ -223,112 +326,6 @@ void mutt_edit_headers(const char *editor, const char *body, struct Header *msg, } } -static void label_ref_dec(struct Context *ctx, char *label) -{ - struct HashElem *elem = mutt_hash_find_elem(ctx->label_hash, label); - if (!elem) - return; - - uintptr_t count = (uintptr_t) elem->data; - if (count <= 1) - { - mutt_hash_delete(ctx->label_hash, label, NULL); - return; - } - - count--; - elem->data = (void *) count; -} - -static void label_ref_inc(struct Context *ctx, char *label) -{ - uintptr_t count; - - struct HashElem *elem = mutt_hash_find_elem(ctx->label_hash, label); - if (!elem) - { - count = 1; - mutt_hash_insert(ctx->label_hash, label, (void *) count); - return; - } - - count = (uintptr_t) elem->data; - count++; - elem->data = (void *) count; -} - -/** - * label_message - add an X-Label: field - */ -static bool label_message(struct Context *ctx, struct Header *hdr, char *new) -{ - if (!hdr) - return false; - if (mutt_str_strcmp(hdr->env->x_label, new) == 0) - return false; - - if (hdr->env->x_label) - label_ref_dec(ctx, hdr->env->x_label); - mutt_str_replace(&hdr->env->x_label, new); - if (hdr->env->x_label) - label_ref_inc(ctx, hdr->env->x_label); - - hdr->changed = true; - hdr->xlabel_changed = true; - return true; -} - -int mutt_label_message(struct Header *hdr) -{ - char buf[LONG_STRING], *new = NULL; - int changed; - - if (!Context || !Context->label_hash) - return 0; - - *buf = '\0'; - if (hdr != NULL && hdr->env->x_label != NULL) - { - mutt_str_strfcpy(buf, hdr->env->x_label, sizeof(buf)); - } - - if (mutt_get_field("Label: ", buf, sizeof(buf), MUTT_LABEL /* | MUTT_CLEAR */) != 0) - return 0; - - new = buf; - SKIPWS(new); - if (*new == '\0') - new = NULL; - - changed = 0; - if (hdr) - { - if (label_message(Context, hdr, new)) - { - changed++; - mutt_set_header_color(Context, hdr); - } - } - else - { - for (int i = 0; i < Context->msgcount; ++i) - { - if (!message_is_tagged(Context, i)) - continue; - - struct Header *h = Context->hdrs[i]; - if (label_message(Context, h, new)) - { - changed++; - mutt_set_flag(Context, h, MUTT_TAG, 0); - /* mutt_set_flag re-evals the header color */ - } - } - } - - return changed; -} - void mutt_make_label_hash(struct Context *ctx) { /* 131 is just a rough prime estimate of how many distinct @@ -352,34 +349,3 @@ void mutt_label_hash_remove(struct Context *ctx, struct Header *hdr) if (hdr->env->x_label) label_ref_dec(ctx, hdr->env->x_label); } - -void mutt_header_free(struct Header **h) -{ - if (!h || !*h) - return; - mutt_env_free(&(*h)->env); - mutt_body_free(&(*h)->content); - FREE(&(*h)->maildir_flags); - FREE(&(*h)->tree); - FREE(&(*h)->path); -#ifdef MIXMASTER - mutt_list_free(&(*h)->chain); -#endif - driver_tags_free(&(*h)->tags); -#if defined(USE_POP) || defined(USE_IMAP) || defined(USE_NNTP) || defined(USE_NOTMUCH) - if ((*h)->free_cb) - (*h)->free_cb(*h); - FREE(&(*h)->data); -#endif - FREE(h); -} - -struct Header *mutt_header_new(void) -{ - struct Header *h = mutt_mem_calloc(1, sizeof(struct Header)); -#ifdef MIXMASTER - STAILQ_INIT(&h->chain); -#endif - STAILQ_INIT(&h->tags); - return h; -} diff --git a/mutt_header.h b/mutt_header.h new file mode 100644 index 000000000..ab2173552 --- /dev/null +++ b/mutt_header.h @@ -0,0 +1,30 @@ +/** + * @file + * Representation of the email's header + * + * @authors + * Copyright (C) 2017 Richard Russon + * + * @copyright + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 2 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#ifndef _MUTT_HEADER_H +#define _MUTT_HEADER_H + +#include +#include +#include + +#endif /* _MUTT_HEADER_H */ diff --git a/mutt_notmuch.c b/mutt_notmuch.c index 86e5945d2..6075bbc0c 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -53,7 +53,6 @@ #include "buffy.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mutt_thread.h" diff --git a/mutt_thread.c b/mutt_thread.c index 247321217..97827e1d5 100644 --- a/mutt_thread.c +++ b/mutt_thread.c @@ -31,7 +31,6 @@ #include "mutt_thread.h" #include "context.h" #include "globals.h" -#include "header.h" #include "options.h" #include "protos.h" #include "sort.h" diff --git a/muttlib.c b/muttlib.c index 2e55fefb8..5d3e439a6 100644 --- a/muttlib.c +++ b/muttlib.c @@ -46,7 +46,6 @@ #include "filter.h" #include "format_flags.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mutt_window.h" diff --git a/mx.c b/mx.c index 185109897..b0fcfc00a 100644 --- a/mx.c +++ b/mx.c @@ -43,7 +43,6 @@ #include "context.h" #include "copy.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mailbox.h" #include "mutt_thread.h" diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index 92bc91028..5d18f727c 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -46,7 +46,6 @@ #include "cryptglue.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "mutt_curses.h" #include "ncrypt.h" #include "options.h" diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index ae0caa82d..3f89cf49f 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -55,7 +55,6 @@ #include "format_flags.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "keymap.h" #include "mutt_curses.h" #include "mutt_menu.h" diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index b57fe4742..9bf889e92 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -49,7 +49,6 @@ #include "filter.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "mutt_curses.h" #include "ncrypt.h" #include "options.h" diff --git a/ncrypt/smime.c b/ncrypt/smime.c index ff9428794..f4fe7de2c 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -46,7 +46,6 @@ #include "format_flags.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "keymap.h" #include "mutt_curses.h" #include "mutt_menu.h" diff --git a/newsrc.c b/newsrc.c index 990d7f6cc..a4e9e3f90 100644 --- a/newsrc.c +++ b/newsrc.c @@ -45,7 +45,6 @@ #include "context.h" #include "format_flags.h" #include "globals.h" -#include "header.h" #include "mutt_account.h" #include "mutt_curses.h" #include "mutt_socket.h" diff --git a/nntp.c b/nntp.c index fdc2e05ef..c0df76533 100644 --- a/nntp.c +++ b/nntp.c @@ -41,7 +41,6 @@ #include "bcache.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mutt_account.h" #include "mutt_curses.h" diff --git a/pager.c b/pager.c index c6eda5ed2..8ed1dc8da 100644 --- a/pager.c +++ b/pager.c @@ -39,7 +39,6 @@ #include "context.h" #include "format_flags.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mailbox.h" #include "mutt_attach.h" diff --git a/parse.c b/parse.c index 53b3e90da..00f660d1b 100644 --- a/parse.c +++ b/parse.c @@ -31,7 +31,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "ncrypt/ncrypt.h" #include "options.h" diff --git a/pattern.c b/pattern.c index a19d6b66f..75bbf3ae6 100644 --- a/pattern.c +++ b/pattern.c @@ -42,7 +42,6 @@ #include "globals.h" #include "group.h" #include "handler.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mutt_menu.h" diff --git a/po/POTFILES.in b/po/POTFILES.in index 97a9f3a1a..ec271c323 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -37,7 +37,6 @@ hcache/lmdb.c hcache/qdbm.c hcache/tc.c hdrline.c -header.c help.c history.c hook.c @@ -72,6 +71,7 @@ mutt/envlist.c mutt/exit.c mutt/file.c mutt/hash.c +mutt/header.c mutt/idna.c mutt/list.c mutt/logging.c @@ -91,6 +91,7 @@ mutt/thread.c mutt_account.c mutt_attach.c mutt_body.c +mutt_header.c mutt_logging.c mutt_lua.c mutt_notmuch.c @@ -149,7 +150,6 @@ state.c status.c system.c terminal.c -thread.c url.c version.c wcscasecmp.c diff --git a/pop.c b/pop.c index b2557b65a..ac87aa7d7 100644 --- a/pop.c +++ b/pop.c @@ -41,7 +41,6 @@ #include "bcache.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mutt_account.h" #include "mutt_curses.h" diff --git a/pop_lib.c b/pop_lib.c index 47d0507d7..455b1edaa 100644 --- a/pop_lib.c +++ b/pop_lib.c @@ -33,7 +33,6 @@ #include "mutt.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mutt_account.h" #include "mutt_curses.h" #include "mutt_socket.h" diff --git a/postpone.c b/postpone.c index d3ea06aae..47c826a08 100644 --- a/postpone.c +++ b/postpone.c @@ -42,7 +42,6 @@ #include "format_flags.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "keymap.h" #include "mailbox.h" #include "mutt_menu.h" diff --git a/query.c b/query.c index ffc90126c..4699ae32b 100644 --- a/query.c +++ b/query.c @@ -33,7 +33,6 @@ #include "filter.h" #include "format_flags.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mutt_curses.h" #include "mutt_menu.h" diff --git a/recvattach.c b/recvattach.c index 6fa766047..ef1f424b3 100644 --- a/recvattach.c +++ b/recvattach.c @@ -35,7 +35,6 @@ #include "format_flags.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "keymap.h" #include "mailbox.h" #include "mutt_attach.h" diff --git a/recvcmd.c b/recvcmd.c index 94f70c16b..5d1d65004 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -31,7 +31,6 @@ #include "copy.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "mutt_body.h" #include "mutt_curses.h" #include "mutt_window.h" diff --git a/remailer.c b/remailer.c index daaddcdc6..dbae0c4e1 100644 --- a/remailer.c +++ b/remailer.c @@ -34,7 +34,6 @@ #include "format_flags.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "keymap.h" #include "mutt_curses.h" #include "mutt_menu.h" diff --git a/rfc3676.c b/rfc3676.c index 302d62035..47f724317 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -31,7 +31,6 @@ #include #include "mutt/mutt.h" #include "globals.h" -#include "header.h" #include "mutt_curses.h" #include "mutt_window.h" #include "options.h" diff --git a/score.c b/score.c index eaa17f2d9..007872cc5 100644 --- a/score.c +++ b/score.c @@ -28,7 +28,6 @@ #include "mutt.h" #include "context.h" #include "globals.h" -#include "header.h" #include "keymap.h" #include "mutt_menu.h" #include "options.h" diff --git a/send.c b/send.c index 0c9bf07dd..880f4868e 100644 --- a/send.c +++ b/send.c @@ -38,7 +38,6 @@ #include "copy.h" #include "filter.h" #include "globals.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "ncrypt/ncrypt.h" diff --git a/sendlib.c b/sendlib.c index c48063df7..97c39c8a1 100644 --- a/sendlib.c +++ b/sendlib.c @@ -44,7 +44,6 @@ #include "format_flags.h" #include "globals.h" #include "handler.h" -#include "header.h" #include "mailbox.h" #include "mutt_curses.h" #include "mutt_window.h" diff --git a/sort.c b/sort.c index 54629b2f8..9e6c773f0 100644 --- a/sort.c +++ b/sort.c @@ -28,7 +28,6 @@ #include "sort.h" #include "context.h" #include "globals.h" -#include "header.h" #include "mutt_thread.h" #include "options.h" #include "protos.h"