From: Richard Russon Date: Tue, 3 Jul 2018 16:09:43 +0000 (+0100) Subject: move Body to library X-Git-Tag: 2019-10-25~762^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c91c800b2b17983be1c0b86e8f73187b4ecba2e9;p=neomutt move Body to library --- diff --git a/Makefile.autosetup b/Makefile.autosetup index bd80b1467..aa2ace917 100644 --- a/Makefile.autosetup +++ b/Makefile.autosetup @@ -61,12 +61,12 @@ ALL_FILES!= (cd $(SRCDIR) && git ls-files 2>/dev/null) || true ############################################################################### # neomutt NEOMUTT= neomutt$(EXEEXT) -NEOMUTTOBJS= addrbook.o alias.o attach.o bcache.o body.o browser.o buffy.o \ +NEOMUTTOBJS= addrbook.o alias.o attach.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 \ + main.o mbox.o menu.o mh.o muttlib.o mutt_account.o mutt_body.o \ mutt_logging.o mutt_signal.o mutt_socket.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 \ @@ -92,7 +92,7 @@ ALLOBJS+= $(NEOMUTTOBJS) ############################################################################### # libmutt LIBMUTT= libmutt.a -LIBMUTTOBJS= mutt/address.o mutt/base64.o mutt/buffer.o mutt/charset.o \ +LIBMUTTOBJS= mutt/address.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/mbyte.o mutt/md5.o mutt/memory.o mutt/mime.o \ @@ -264,14 +264,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)/body.h \ + $(SRCDIR)/mutt/parameter.h $(SRCDIR)/mutt/body.h \ $(SRCDIR)/mutt/envelope.h $(SRCDIR)/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 "body.h"'; echo '#include "mutt/envelope.h"'; \ echo '#include "header.h"';) | $(CPP) $(CFLAGS) - | \ sh $(SRCDIR)/hcache/hcachever.sh hcache/hcversion.h diff --git a/attach.c b/attach.c index f15fe413c..1a88a8c17 100644 --- a/attach.c +++ b/attach.c @@ -31,7 +31,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "attach.h" -#include "body.h" #include "context.h" #include "copy.h" #include "filter.h" diff --git a/browser.c b/browser.c index f0faa7822..93c3198bd 100644 --- a/browser.c +++ b/browser.c @@ -40,7 +40,6 @@ #include "mutt.h" #include "browser.h" #include "attach.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "format_flags.h" diff --git a/commands.c b/commands.c index 47241ebd7..3bf6a3ec2 100644 --- a/commands.c +++ b/commands.c @@ -33,7 +33,6 @@ #include "conn/conn.h" #include "mutt.h" #include "alias.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "copy.h" diff --git a/compose.c b/compose.c index aee999ef3..b56510809 100644 --- a/compose.c +++ b/compose.c @@ -34,7 +34,6 @@ #include "mutt.h" #include "alias.h" #include "attach.h" -#include "body.h" #include "context.h" #include "format_flags.h" #include "globals.h" diff --git a/copy.c b/copy.c index 12d02570d..098716a48 100644 --- a/copy.c +++ b/copy.c @@ -34,7 +34,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "copy.h" -#include "body.h" #include "context.h" #include "globals.h" #include "handler.h" diff --git a/curs_main.c b/curs_main.c index 00cc73b2d..01acb251c 100644 --- a/curs_main.c +++ b/curs_main.c @@ -32,7 +32,6 @@ #include "conn/conn.h" #include "mutt.h" #include "alias.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "format_flags.h" diff --git a/edit.c b/edit.c index cd480e30d..1c7ba70af 100644 --- a/edit.c +++ b/edit.c @@ -32,7 +32,6 @@ #include #include "mutt/mutt.h" #include "alias.h" -#include "body.h" #include "context.h" #include "globals.h" #include "header.h" diff --git a/enriched.c b/enriched.c index 585d145fd..3c11d24da 100644 --- a/enriched.c +++ b/enriched.c @@ -32,7 +32,6 @@ #include #include #include "mutt/mutt.h" -#include "body.h" #include "mutt_window.h" #include "state.h" diff --git a/handler.c b/handler.c index b2ee00e45..cc8467a5c 100644 --- a/handler.c +++ b/handler.c @@ -35,7 +35,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "handler.h" -#include "body.h" #include "copy.h" #include "enriched.h" #include "filter.h" diff --git a/hcache/hcache.c b/hcache/hcache.c index 073e166cf..d61078776 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -49,7 +49,6 @@ #include #include "mutt/mutt.h" #include "backend.h" -#include "body.h" #include "globals.h" #include "hcache.h" #include "hcache/hcversion.h" diff --git a/hdrline.c b/hdrline.c index f5414cb85..4298a5975 100644 --- a/hdrline.c +++ b/hdrline.c @@ -31,7 +31,6 @@ #include #include "mutt/mutt.h" #include "mutt.h" -#include "body.h" #include "context.h" #include "format_flags.h" #include "globals.h" diff --git a/header.c b/header.c index f838bfe1c..fe16ef613 100644 --- a/header.c +++ b/header.c @@ -31,7 +31,6 @@ #include "mutt.h" #include "header.h" #include "alias.h" -#include "body.h" #include "context.h" #include "globals.h" #include "ncrypt/ncrypt.h" diff --git a/imap/imap.c b/imap/imap.c index e7fe8e66f..2756a47be 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -44,7 +44,6 @@ #include "imap.h" #include "auth.h" #include "bcache.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "globals.h" diff --git a/imap/message.c b/imap/message.c index a08092227..aef50279d 100644 --- a/imap/message.c +++ b/imap/message.c @@ -40,7 +40,6 @@ #include "mutt.h" #include "message.h" #include "bcache.h" -#include "body.h" #include "context.h" #include "globals.h" #include "header.h" diff --git a/main.c b/main.c index 081602b92..969d339b2 100644 --- a/main.c +++ b/main.c @@ -45,7 +45,6 @@ #include "conn/conn.h" #include "mutt.h" #include "alias.h" -#include "body.h" #include "buffy.h" #include "globals.h" #include "header.h" diff --git a/mbox.c b/mbox.c index df94b10dc..bfa9f1b28 100644 --- a/mbox.c +++ b/mbox.c @@ -34,7 +34,6 @@ #include #include "mutt/mutt.h" #include "mutt.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "copy.h" @@ -596,24 +595,6 @@ static int mbox_msg_open_new(struct Context *ctx, struct Message *msg, struct He return 0; } -/** - * strict_cmp_bodies - Strictly compare two email Body's - * @param b1 First Body - * @param b2 Second Body - * @retval true Body's are strictly identical - */ -static bool strict_cmp_bodies(const struct Body *b1, const struct Body *b2) -{ - if ((b1->type != b2->type) || (b1->encoding != b2->encoding) || - (mutt_str_strcmp(b1->subtype, b2->subtype) != 0) || - (mutt_str_strcmp(b1->description, b2->description) != 0) || - !mutt_param_cmp_strict(&b1->parameter, &b2->parameter) || (b1->length != b2->length)) - { - return false; - } - return true; -} - /** * mbox_strict_cmp_headers - Strictly compare message headers * @param h1 First Header @@ -629,7 +610,7 @@ bool mbox_strict_cmp_headers(const struct Header *h1, const struct Header *h2) (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) || - !strict_cmp_bodies(h1->content, h2->content)) + !mutt_body_cmp_strict(h1->content, h2->content)) { return false; } diff --git a/mh.c b/mh.c index 68d2d5369..7bd48e05b 100644 --- a/mh.c +++ b/mh.c @@ -40,7 +40,6 @@ #include #include "mutt/mutt.h" #include "mutt.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "copy.h" diff --git a/mutt/body.c b/mutt/body.c new file mode 100644 index 000000000..083266be0 --- /dev/null +++ b/mutt/body.c @@ -0,0 +1,116 @@ +/** + * @file + * Representation of the body of an email + * + * @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 . + */ + +/** + * @page body Representation of the body of an email + * + * Representation of the body of an email + */ + +#include "config.h" +#include +#include +#include +#include "body.h" +#include "header.h" +#include "logging.h" +#include "memory.h" +#include "mime.h" +#include "string2.h" + +/** + * mutt_body_new - Create a new Body + * @retval ptr Newly allocated Body + */ +struct Body *mutt_body_new(void) +{ + struct Body *p = mutt_mem_calloc(1, sizeof(struct Body)); + + p->disposition = DISPATTACH; + p->use_disp = true; + TAILQ_INIT(&p->parameter); + return p; +} + +/** + * mutt_body_free - Free a Body + * @param p Body to free + */ +void mutt_body_free(struct Body **p) +{ + struct Body *a = *p, *b = NULL; + + while (a) + { + b = a; + a = a->next; + + mutt_param_free(&b->parameter); + if (b->filename) + { + if (b->unlink) + unlink(b->filename); + mutt_debug(1, "%sunlinking %s.\n", b->unlink ? "" : "not ", b->filename); + } + + FREE(&b->filename); + FREE(&b->d_filename); + FREE(&b->charset); + FREE(&b->content); + FREE(&b->xtype); + FREE(&b->subtype); + FREE(&b->description); + FREE(&b->form_name); + + if (b->hdr) + { + /* Don't free twice (b->hdr->content = b->parts) */ + b->hdr->content = NULL; + mutt_header_free(&b->hdr); + } + + if (b->parts) + mutt_body_free(&b->parts); + + FREE(&b); + } + + *p = 0; +} + +/** + * mutt_body_cmp_strict - Strictly compare two email Body's + * @param b1 First Body + * @param b2 Second Body + * @retval true Body's are strictly identical + */ +bool mutt_body_cmp_strict(const struct Body *b1, const struct Body *b2) +{ + if ((b1->type != b2->type) || (b1->encoding != b2->encoding) || + (mutt_str_strcmp(b1->subtype, b2->subtype) != 0) || + (mutt_str_strcmp(b1->description, b2->description) != 0) || + !mutt_param_cmp_strict(&b1->parameter, &b2->parameter) || (b1->length != b2->length)) + { + return false; + } + return true; +} diff --git a/body.h b/mutt/body.h similarity index 97% rename from body.h rename to mutt/body.h index 00f5b22ff..b46c1ca6c 100644 --- a/body.h +++ b/mutt/body.h @@ -26,7 +26,7 @@ #include #include #include -#include "mutt/mutt.h" +#include "parameter.h" /** * struct Body - The body of an email @@ -99,7 +99,7 @@ struct Body }; -int mutt_body_copy(FILE *fp, struct Body **tgt, struct Body *src); +bool mutt_body_cmp_strict(const struct Body *b1, const struct Body *b2); void mutt_body_free(struct Body **p); struct Body *mutt_body_new(void); diff --git a/mutt/header.c b/mutt/header.c new file mode 100644 index 000000000..8cd047367 --- /dev/null +++ b/mutt/header.c @@ -0,0 +1,113 @@ +/** + * @file + * Representation of the email's header + * + * @authors + * Copyright (C) 1996-2009,2012 Michael R. Elkins + * + * @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 . + */ + +/** + * @page header Representation of the email's header + * + * Representation of the email's header + */ + +#include "config.h" +#include +#include +#include +#include +#include +#include +#include "header.h" +#include "body.h" +#include "envelope.h" +#include "file.h" +#include "hash.h" +#include "logging.h" +#include "memory.h" +#include "string2.h" + +/** + * mutt_header_free - Free an email Header + * @param h Header to free + */ +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); +} + +/** + * mutt_header_new - Create a new email Header + * @retval ptr Newly created Header + */ +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; +} + +/** + * mutt_header_cmp_strict - Strictly compare message headers + * @param h1 First Header + * @param h2 Second Header + * @retval true Headers are strictly identical + */ +bool mutt_header_cmp_strict(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; + } +} diff --git a/mutt/mutt.h b/mutt/mutt.h index 718683ebf..841abb4ac 100644 --- a/mutt/mutt.h +++ b/mutt/mutt.h @@ -29,6 +29,7 @@ * | :--------------- | :----------------- | * | mutt/address.c | @subpage address | * | mutt/base64.c | @subpage base64 | + * | mutt/body.c | @subpage base64 | * | mutt/buffer.c | @subpage buffer | * | mutt/charset.c | @subpage charset | * | mutt/date.c | @subpage date | @@ -61,6 +62,7 @@ #include "address.h" #include "base64.h" +#include "body.h" #include "buffer.h" #include "charset.h" #include "content.h" diff --git a/body.c b/mutt_body.c similarity index 71% rename from body.c rename to mutt_body.c index 6d09e4827..58d6a14cc 100644 --- a/body.c +++ b/mutt_body.c @@ -30,25 +30,8 @@ #include #include #include -#include "mutt/mutt.h" -#include "body.h" -#include "header.h" #include "protos.h" -/** - * mutt_body_new - Create a new Body - * @retval ptr Newly allocated Body - */ -struct Body *mutt_body_new(void) -{ - struct Body *p = mutt_mem_calloc(1, sizeof(struct Body)); - - p->disposition = DISPATTACH; - p->use_disp = true; - TAILQ_INIT(&p->parameter); - return p; -} - /** * mutt_body_copy - Create a send-mode duplicate from a receive-mode body * @param[in] fp FILE pointer to attachments @@ -129,49 +112,3 @@ int mutt_body_copy(FILE *fp, struct Body **tgt, struct Body *src) return 0; } - -/** - * mutt_body_free - Free a Body - * @param p Body to free - */ -void mutt_body_free(struct Body **p) -{ - struct Body *a = *p, *b = NULL; - - while (a) - { - b = a; - a = a->next; - - mutt_param_free(&b->parameter); - if (b->filename) - { - if (b->unlink) - unlink(b->filename); - mutt_debug(1, "%sunlinking %s.\n", b->unlink ? "" : "not ", b->filename); - } - - FREE(&b->filename); - FREE(&b->d_filename); - FREE(&b->charset); - FREE(&b->content); - FREE(&b->xtype); - FREE(&b->subtype); - FREE(&b->description); - FREE(&b->form_name); - - if (b->hdr) - { - /* Don't free twice (b->hdr->content = b->parts) */ - b->hdr->content = NULL; - mutt_header_free(&b->hdr); - } - - if (b->parts) - mutt_body_free(&b->parts); - - FREE(&b); - } - - *p = 0; -} diff --git a/mutt_body.h b/mutt_body.h new file mode 100644 index 000000000..e4322b598 --- /dev/null +++ b/mutt_body.h @@ -0,0 +1,32 @@ +/** + * @file + * Representation of the body of an email + * + * @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_BODY2_H +#define _MUTT_BODY2_H + +#include + +struct Body; + +int mutt_body_copy(FILE *fp, struct Body **tgt, struct Body *src); + +#endif /* _MUTT_BODY2_H */ diff --git a/mutt_notmuch.c b/mutt_notmuch.c index 3c1276e52..5b5b06d04 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -50,7 +50,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "mutt_notmuch.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "globals.h" diff --git a/muttlib.c b/muttlib.c index 0970e23cc..7dbb2dff2 100644 --- a/muttlib.c +++ b/muttlib.c @@ -43,7 +43,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "alias.h" -#include "body.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/mx.c b/mx.c index a5b846a2a..80fd481cf 100644 --- a/mx.c +++ b/mx.c @@ -39,7 +39,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "mx.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "copy.h" diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index d8ffdb3db..92bc91028 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -41,7 +41,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "alias.h" -#include "body.h" #include "context.h" #include "copy.h" #include "cryptglue.h" diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index a1157f21a..ae0caa82d 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -51,7 +51,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "alias.h" -#include "body.h" #include "crypt.h" #include "format_flags.h" #include "globals.h" diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index 77c916cde..b57fe4742 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -44,7 +44,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "pgp.h" -#include "body.h" #include "crypt.h" #include "cryptglue.h" #include "filter.h" diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index ebf4f7bea..4841417e1 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -41,7 +41,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "pgpkey.h" -#include "body.h" #include "crypt.h" #include "filter.h" #include "format_flags.h" diff --git a/ncrypt/smime.c b/ncrypt/smime.c index e4ffe26de..ff9428794 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -39,7 +39,6 @@ #include "mutt.h" #include "smime.h" #include "alias.h" -#include "body.h" #include "copy.h" #include "crypt.h" #include "cryptglue.h" diff --git a/nntp.c b/nntp.c index 36732787a..2f4bd1d5a 100644 --- a/nntp.c +++ b/nntp.c @@ -39,7 +39,6 @@ #include "mutt.h" #include "nntp.h" #include "bcache.h" -#include "body.h" #include "context.h" #include "globals.h" #include "header.h" diff --git a/pager.c b/pager.c index c21af6fe4..ea7a640f8 100644 --- a/pager.c +++ b/pager.c @@ -37,7 +37,6 @@ #include "pager.h" #include "alias.h" #include "attach.h" -#include "body.h" #include "context.h" #include "format_flags.h" #include "globals.h" diff --git a/parse.c b/parse.c index 6e6966a0c..53b3e90da 100644 --- a/parse.c +++ b/parse.c @@ -30,7 +30,6 @@ #include #include "mutt/mutt.h" #include "mutt.h" -#include "body.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/pattern.c b/pattern.c index ed7d2a756..1c2a3b322 100644 --- a/pattern.c +++ b/pattern.c @@ -37,7 +37,6 @@ #include "conn/conn.h" #include "mutt.h" #include "pattern.h" -#include "body.h" #include "context.h" #include "copy.h" #include "globals.h" diff --git a/po/POTFILES.in b/po/POTFILES.in index 55aba6b01..aadfcbd49 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -2,7 +2,6 @@ addrbook.c alias.c attach.c bcache.c -body.c browser.c buffy.c color.c @@ -64,6 +63,7 @@ menu.c mh.c mutt/address.c mutt/base64.c +mutt/body.c mutt/buffer.c mutt/charset.c mutt/date.c @@ -87,6 +87,7 @@ mutt/sha1.c mutt/signal.c mutt/string.c mutt_account.c +mutt_body.c mutt_logging.c mutt_lua.c mutt_notmuch.c diff --git a/pop.c b/pop.c index aef7d651e..b2557b65a 100644 --- a/pop.c +++ b/pop.c @@ -39,7 +39,6 @@ #include "mutt.h" #include "pop.h" #include "bcache.h" -#include "body.h" #include "context.h" #include "globals.h" #include "header.h" diff --git a/postpone.c b/postpone.c index 3c62a932a..1f65d7458 100644 --- a/postpone.c +++ b/postpone.c @@ -38,7 +38,6 @@ #include "mutt/mutt.h" #include "conn/conn.h" #include "mutt.h" -#include "body.h" #include "context.h" #include "format_flags.h" #include "globals.h" diff --git a/recvattach.c b/recvattach.c index aa60d79b2..e095ac148 100644 --- a/recvattach.c +++ b/recvattach.c @@ -31,7 +31,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "attach.h" -#include "body.h" #include "context.h" #include "filter.h" #include "format_flags.h" diff --git a/recvcmd.c b/recvcmd.c index c9a16e540..400c2daf6 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -29,11 +29,11 @@ #include "mutt.h" #include "alias.h" #include "attach.h" -#include "body.h" #include "copy.h" #include "globals.h" #include "handler.h" #include "header.h" +#include "mutt_body.h" #include "mutt_curses.h" #include "mutt_window.h" #include "options.h" diff --git a/rfc1524.c b/rfc1524.c index 0f146eb72..551d6e518 100644 --- a/rfc1524.c +++ b/rfc1524.c @@ -39,7 +39,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "rfc1524.h" -#include "body.h" #include "globals.h" #include "options.h" #include "protos.h" diff --git a/rfc3676.c b/rfc3676.c index c5ed0cc5e..302d62035 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -30,7 +30,6 @@ #include #include #include "mutt/mutt.h" -#include "body.h" #include "globals.h" #include "header.h" #include "mutt_curses.h" diff --git a/safe_asprintf.c b/safe_asprintf.c index 238704943..608c1ffc2 100644 --- a/safe_asprintf.c +++ b/safe_asprintf.c @@ -33,6 +33,7 @@ #include #include #include +#include "config.h" #include "mutt/mutt.h" #ifdef HAVE_VASPRINTF diff --git a/send.c b/send.c index fd80df9de..0c9bf07dd 100644 --- a/send.c +++ b/send.c @@ -34,7 +34,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "alias.h" -#include "body.h" #include "context.h" #include "copy.h" #include "filter.h" diff --git a/sendlib.c b/sendlib.c index 10bc6b750..c48063df7 100644 --- a/sendlib.c +++ b/sendlib.c @@ -37,7 +37,6 @@ #include #include "mutt/mutt.h" #include "mutt.h" -#include "body.h" #include "buffy.h" #include "context.h" #include "copy.h" diff --git a/sort.c b/sort.c index 3384cd061..8584914f1 100644 --- a/sort.c +++ b/sort.c @@ -26,7 +26,6 @@ #include #include "mutt/mutt.h" #include "sort.h" -#include "body.h" #include "context.h" #include "globals.h" #include "header.h" diff --git a/thread.c b/thread.c index 07b77ffd6..fa05913f0 100644 --- a/thread.c +++ b/thread.c @@ -29,7 +29,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "thread.h" -#include "body.h" #include "context.h" #include "globals.h" #include "header.h"