From: Richard Russon Date: Fri, 6 Jul 2018 16:12:45 +0000 (+0100) Subject: libemail X-Git-Tag: 2019-10-25~759^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=34129a13f8bf7c93658f48a35b08b40339817de2;p=neomutt libemail --- diff --git a/.clang-format b/.clang-format index 4e8568232..c41d0a208 100644 --- a/.clang-format +++ b/.clang-format @@ -18,10 +18,12 @@ IncludeCategories: Priority: -6 - Regex: '"mutt/.*\.h"' Priority: -4 - - Regex: '"conn/.*\.h"' + - Regex: '"email/.*\.h"' Priority: -3 - - Regex: '"mutt\.h"' + - Regex: '"conn/.*\.h"' Priority: -2 + - Regex: '"mutt\.h"' + Priority: -1 # Main Header 0 - Regex: '".*"' Priority: 5 diff --git a/Makefile.autosetup b/Makefile.autosetup index dfd71ab1c..1d168b2da 100644 --- a/Makefile.autosetup +++ b/Makefile.autosetup @@ -89,15 +89,23 @@ NEOMUTTOBJS+= mutt_lua.o CLEANFILES+= $(NEOMUTT) $(NEOMUTTOBJS) ALLOBJS+= $(NEOMUTTOBJS) +############################################################################### +# libemail +LIBEMAIL= libemail.a +LIBEMAILOBJS= email/address.o email/attach.o email/body.o email/envelope.o \ + email/header.o email/parameter.o email/tags.o email/thread.o +CLEANFILES+= $(LIBEMAIL) $(LIBEMAILOBJS) +MUTTLIBS+= $(LIBEMAIL) +ALLOBJS+= $(LIBEMAILOBJS) + ############################################################################### # libmutt 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/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 +LIBMUTTOBJS= mutt/base64.o mutt/buffer.o mutt/charset.o mutt/date.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 mutt/regex.o \ + mutt/rfc2047.o mutt/sha1.o mutt/signal.o mutt/string.o CLEANFILES+= $(LIBMUTT) $(LIBMUTTOBJS) MUTTLIBS+= $(LIBMUTT) ALLOBJS+= $(LIBMUTTOBJS) @@ -220,6 +228,13 @@ $(LIBMUTT): $(PWD)/mutt $(LIBMUTTOBJS) $(PWD)/mutt: $(MKDIR_P) $(PWD)/mutt +# libemail +$(LIBEMAIL): $(PWD)/email $(LIBEMAILOBJS) + $(AR) cr $@ $(LIBEMAILOBJS) + $(RANLIB) $@ +$(PWD)/email: + $(MKDIR_P) $(PWD)/email + # libncrypt $(LIBNCRYPT): $(PWD)/ncrypt $(LIBNCRYPTOBJS) $(AR) cr $@ $(LIBNCRYPTOBJS) @@ -262,23 +277,23 @@ git_ver.h: $(ALL_FILES) cmp -s git_ver.h.tmp git_ver.h || mv git_ver.h.tmp git_ver.h; \ rm -f git_ver.h.tmp -hcache/hcversion.h: $(SRCDIR)/mutt/address.h \ - $(SRCDIR)/mutt/body.h \ +hcache/hcversion.h: $(SRCDIR)/email/address.h \ + $(SRCDIR)/email/body.h \ + $(SRCDIR)/email/envelope.h \ + $(SRCDIR)/email/header.h \ + $(SRCDIR)/email/parameter.h \ $(SRCDIR)/mutt/buffer.h \ - $(SRCDIR)/mutt/envelope.h \ - $(SRCDIR)/mutt/header.h \ $(SRCDIR)/mutt/list.h \ - $(SRCDIR)/mutt/parameter.h \ $(SRCDIR)/hcache/hcachever.sh $(MKDIR_P) $(PWD)/hcache ( echo '#include "config.h"'; \ - echo '#include "mutt/address.h"'; \ - echo '#include "mutt/body.h"'; \ + echo '#include "email/address.h"'; \ + echo '#include "email/body.h"'; \ + echo '#include "email/envelope.h"'; \ + echo '#include "email/header.h"'; \ + echo '#include "email/parameter.h"'; \ echo '#include "mutt/buffer.h"'; \ - echo '#include "mutt/envelope.h"'; \ - echo '#include "mutt/header.h"'; \ - echo '#include "mutt/list.h"'; \ - echo '#include "mutt/parameter.h"';) | $(CPP) $(CFLAGS) - | \ + echo '#include "mutt/list.h"';) | $(CPP) $(CFLAGS) - | \ sh $(SRCDIR)/hcache/hcachever.sh hcache/hcversion.h # clean diff --git a/addrbook.c b/addrbook.c index 8c3665327..13d2f1081 100644 --- a/addrbook.c +++ b/addrbook.c @@ -31,6 +31,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "alias.h" #include "format_flags.h" diff --git a/alias.c b/alias.c index cec700515..e75a46b35 100644 --- a/alias.c +++ b/alias.c @@ -31,6 +31,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "alias.h" #include "globals.h" diff --git a/alias.h b/alias.h index 49f789f4a..69e4a1b45 100644 --- a/alias.h +++ b/alias.h @@ -25,6 +25,7 @@ #include #include "mutt/mutt.h" +#include "email/email.h" /** * struct Alias - A shortcut for an email address diff --git a/buffy.c b/buffy.c index 7fa162ae3..550555a89 100644 --- a/buffy.c +++ b/buffy.c @@ -30,6 +30,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "buffy.h" #include "context.h" #include "globals.h" diff --git a/color.c b/color.c index defd6d1b1..12b560589 100644 --- a/color.c +++ b/color.c @@ -27,6 +27,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "globals.h" diff --git a/commands.c b/commands.c index 9127fd1dc..e19db60b5 100644 --- a/commands.c +++ b/commands.c @@ -30,6 +30,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "alias.h" diff --git a/compose.c b/compose.c index d7e9a618e..14f53391e 100644 --- a/compose.c +++ b/compose.c @@ -30,6 +30,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "alias.h" diff --git a/copy.c b/copy.c index 5374111e0..b58d39cbe 100644 --- a/copy.c +++ b/copy.c @@ -32,6 +32,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "copy.h" #include "context.h" diff --git a/curs_lib.c b/curs_lib.c index f64739c52..704afe6d0 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -37,6 +37,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "enter_state.h" diff --git a/curs_main.c b/curs_main.c index 07182e53c..4d6c910c4 100644 --- a/curs_main.c +++ b/curs_main.c @@ -29,6 +29,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "alias.h" diff --git a/edit.c b/edit.c index af7db8ea4..ea89df9c7 100644 --- a/edit.c +++ b/edit.c @@ -31,6 +31,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "alias.h" #include "context.h" #include "globals.h" diff --git a/editmsg.c b/editmsg.c index 18c81c567..c691ac508 100644 --- a/editmsg.c +++ b/editmsg.c @@ -36,6 +36,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "copy.h" diff --git a/mutt/address.c b/email/address.c similarity index 99% rename from mutt/address.c rename to email/address.c index 140557217..1fa0008b6 100644 --- a/mutt/address.c +++ b/email/address.c @@ -31,10 +31,8 @@ #include #include #include +#include "mutt/mutt.h" #include "address.h" -#include "idna2.h" -#include "memory.h" -#include "string2.h" /** * AddressSpecials - Characters with special meaning for email addresses diff --git a/mutt/address.h b/email/address.h similarity index 97% rename from mutt/address.h rename to email/address.h index e6c439734..2d47a6eb5 100644 --- a/mutt/address.h +++ b/email/address.h @@ -20,8 +20,8 @@ * this program. If not, see . */ -#ifndef _MUTT_ADDRESS_H -#define _MUTT_ADDRESS_H +#ifndef _EMAIL_ADDRESS_H +#define _EMAIL_ADDRESS_H #include #include @@ -84,4 +84,4 @@ void mutt_addr_write_single(char *buf, size_t buflen, struct Address int mutt_addrlist_to_intl(struct Address *a, char **err); int mutt_addrlist_to_local(struct Address *a); -#endif /* _MUTT_ADDRESS_H */ +#endif /* _EMAIL_ADDRESS_H */ diff --git a/mutt/attach.c b/email/attach.c similarity index 98% rename from mutt/attach.c rename to email/attach.c index 722dbc7ee..2e4eab4fb 100644 --- a/mutt/attach.c +++ b/email/attach.c @@ -28,10 +28,9 @@ */ #include "config.h" +#include "mutt/mutt.h" #include "attach.h" #include "body.h" -#include "file.h" -#include "memory.h" /** * mutt_actx_add_attach - Add an Attachment to an Attachment Context diff --git a/mutt/attach.h b/email/attach.h similarity index 96% rename from mutt/attach.h rename to email/attach.h index 9132ad4f1..177663f4e 100644 --- a/mutt/attach.h +++ b/email/attach.h @@ -20,8 +20,8 @@ * this program. If not, see . */ -#ifndef _MUTT_ATTACH_H -#define _MUTT_ATTACH_H +#ifndef _EMAIL_ATTACH_H +#define _EMAIL_ATTACH_H #include #include @@ -73,4 +73,4 @@ void mutt_actx_add_fp(struct AttachCtx *actx, FILE *new_fp); void mutt_actx_free(struct AttachCtx **pactx); void mutt_actx_free_entries(struct AttachCtx *actx); -#endif /* _MUTT_ATTACH_H */ +#endif /* _EMAIL_ATTACH_H */ diff --git a/mutt/body.c b/email/body.c similarity index 95% rename from mutt/body.c rename to email/body.c index ae7ddcfdb..84dbabf63 100644 --- a/mutt/body.c +++ b/email/body.c @@ -29,14 +29,9 @@ #include "config.h" #include #include +#include "mutt/mutt.h" #include "body.h" #include "header.h" -#include "logging.h" -#include "memory.h" -#include "mime.h" -#include "parameter.h" -#include "queue.h" -#include "string2.h" /** * mutt_body_new - Create a new Body diff --git a/mutt/body.h b/email/body.h similarity index 98% rename from mutt/body.h rename to email/body.h index 994b1e23e..edaf25600 100644 --- a/mutt/body.h +++ b/email/body.h @@ -20,8 +20,8 @@ * this program. If not, see . */ -#ifndef _MUTT_BODY_H -#define _MUTT_BODY_H +#ifndef _EMAIL_BODY_H +#define _EMAIL_BODY_H #include #include @@ -102,4 +102,4 @@ 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); -#endif /* _MUTT_BODY_H */ +#endif /* _EMAIL_BODY_H */ diff --git a/mutt/content.h b/email/content.h similarity index 95% rename from mutt/content.h rename to email/content.h index b9e2644c8..2a2501f3d 100644 --- a/mutt/content.h +++ b/email/content.h @@ -20,8 +20,8 @@ * this program. If not, see . */ -#ifndef _MUTT_CONTENT_H -#define _MUTT_CONTENT_H +#ifndef _EMAIL_CONTENT_H +#define _EMAIL_CONTENT_H #include @@ -45,4 +45,4 @@ struct Content bool cr : 1; /**< has CR, even when in a CRLF pair */ }; -#endif /* _MUTT_CONTENT_H */ +#endif /* _EMAIL_CONTENT_H */ diff --git a/email/email.h b/email/email.h new file mode 100644 index 000000000..7e141364b --- /dev/null +++ b/email/email.h @@ -0,0 +1,56 @@ +/** + * @file + * Structs that make up 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 mutt Structs that make up an email + * + * Structs that make up an email + * + * | File | Description | + * | :---------------- | :----------------- | + * | email/address.c | @subpage address | + * | email/attach.c | @subpage attach | + * | email/body.c | @subpage body | + * | email/envelope.c | @subpage envelope | + * | email/header.c | @subpage header | + * | email/parameter.c | @subpage parameter | + * | email/tags.c | @subpage tags | + * | email/thread.c | @subpage thread | + * + * @note The library is self-contained -- some files may depend on others in + * the library, but none depends on source from outside. + */ + +#ifndef _EMAIL_EMAIL_H +#define _EMAIL_EMAIL_H + +#include "address.h" +#include "attach.h" +#include "body.h" +#include "content.h" +#include "envelope.h" +#include "header.h" +#include "parameter.h" +#include "tags.h" +#include "thread.h" + +#endif /* _EMAIL_EMAIL_H */ diff --git a/mutt/envelope.c b/email/envelope.c similarity index 98% rename from mutt/envelope.c rename to email/envelope.c index db732d9e5..61b6af215 100644 --- a/mutt/envelope.c +++ b/email/envelope.c @@ -29,13 +29,9 @@ #include "config.h" #include #include +#include "mutt/mutt.h" #include "envelope.h" #include "address.h" -#include "buffer.h" -#include "list.h" -#include "memory.h" -#include "queue.h" -#include "string2.h" /** * mutt_env_new - Create a new Envelope diff --git a/mutt/envelope.h b/email/envelope.h similarity index 95% rename from mutt/envelope.h rename to email/envelope.h index 8f998e7a3..d2c614570 100644 --- a/mutt/envelope.h +++ b/email/envelope.h @@ -20,11 +20,11 @@ * this program. If not, see . */ -#ifndef _MUTT_ENVELOPE_H -#define _MUTT_ENVELOPE_H +#ifndef _EMAIL_ENVELOPE_H +#define _EMAIL_ENVELOPE_H #include -#include "list.h" +#include "mutt/mutt.h" /** * struct Envelope - The header of an email @@ -71,4 +71,4 @@ struct Envelope *mutt_env_new(void); int mutt_env_to_intl(struct Envelope *env, char **tag, char **err); void mutt_env_to_local(struct Envelope *e); -#endif /* _MUTT_ENVELOPE_H */ +#endif /* _EMAIL_ENVELOPE_H */ diff --git a/mutt/header.c b/email/header.c similarity index 97% rename from mutt/header.c rename to email/header.c index e9423516a..18569be76 100644 --- a/mutt/header.c +++ b/email/header.c @@ -28,12 +28,10 @@ #include "config.h" #include +#include "mutt/mutt.h" #include "header.h" #include "body.h" #include "envelope.h" -#include "list.h" -#include "memory.h" -#include "queue.h" #include "tags.h" /** diff --git a/mutt/header.h b/email/header.h similarity index 97% rename from mutt/header.h rename to email/header.h index 3f6515d3b..abcc34fe9 100644 --- a/mutt/header.h +++ b/email/header.h @@ -20,14 +20,14 @@ * this program. If not, see . */ -#ifndef _MUTT_HEADER_H -#define _MUTT_HEADER_H +#ifndef _EMAIL_HEADER_H +#define _EMAIL_HEADER_H #include #include #include #include -#include "list.h" +#include "mutt/mutt.h" #include "tags.h" /** @@ -121,4 +121,4 @@ bool mutt_header_cmp_strict(const struct Header *h1, const struct Head void mutt_header_free(struct Header **h); struct Header *mutt_header_new(void); -#endif /* _MUTT_HEADER_H */ +#endif /* _EMAIL_HEADER_H */ diff --git a/mutt/parameter.c b/email/parameter.c similarity index 98% rename from mutt/parameter.c rename to email/parameter.c index 37466673e..cef8842db 100644 --- a/mutt/parameter.c +++ b/email/parameter.c @@ -29,10 +29,8 @@ #include "config.h" #include #include +#include "mutt/mutt.h" #include "parameter.h" -#include "memory.h" -#include "queue.h" -#include "string2.h" /** * mutt_param_new - Create a new Parameter diff --git a/mutt/parameter.h b/email/parameter.h similarity index 93% rename from mutt/parameter.h rename to email/parameter.h index fd740f2b1..90cf235c4 100644 --- a/mutt/parameter.h +++ b/email/parameter.h @@ -20,11 +20,11 @@ * this program. If not, see . */ -#ifndef _MUTT_PARAMETER_H -#define _MUTT_PARAMETER_H +#ifndef _EMAIL_PARAMETER_H +#define _EMAIL_PARAMETER_H #include -#include "queue.h" +#include "mutt/mutt.h" /** * struct ParameterList - List of parameters. @@ -49,4 +49,4 @@ char * mutt_param_get(const struct ParameterList *p, const char *s); struct Parameter *mutt_param_new(void); void mutt_param_set(struct ParameterList *p, const char *attribute, const char *value); -#endif /* _MUTT_PARAMETER_H */ +#endif /* _EMAIL_PARAMETER_H */ diff --git a/mutt/tags.c b/email/tags.c similarity index 98% rename from mutt/tags.c rename to email/tags.c index 95665e472..5e258827b 100644 --- a/mutt/tags.c +++ b/email/tags.c @@ -30,11 +30,8 @@ #include #include #include +#include "mutt/mutt.h" #include "tags.h" -#include "hash.h" -#include "memory.h" -#include "queue.h" -#include "string2.h" char *HiddenTags; /**< Config: Private tags which should not be displayed */ struct Hash *TagTransforms; /**< Lookup table of alternative tag names */ diff --git a/mutt/tags.h b/email/tags.h similarity index 94% rename from mutt/tags.h rename to email/tags.h index a0429c765..df20db920 100644 --- a/mutt/tags.h +++ b/email/tags.h @@ -20,11 +20,11 @@ * this program. If not, see . */ -#ifndef _MUTT_TAG_H -#define _MUTT_TAG_H +#ifndef _EMAIL_TAG_H +#define _EMAIL_TAG_H #include -#include "queue.h" +#include "mutt/mutt.h" extern char *HiddenTags; extern struct Hash *TagTransforms; @@ -51,4 +51,4 @@ char *driver_tags_get_transformed_for(char *name, struct TagHead *head); char *driver_tags_get_with_hidden(struct TagHead *head); bool driver_tags_replace(struct TagHead *head, char *tags); -#endif /* _MUTT_TAG_H */ +#endif /* _EMAIL_TAG_H */ diff --git a/mutt/thread.c b/email/thread.c similarity index 98% rename from mutt/thread.c rename to email/thread.c index 7d6d12b4f..48ea55ed1 100644 --- a/mutt/thread.c +++ b/email/thread.c @@ -30,13 +30,10 @@ #include #include #include +#include "mutt/mutt.h" #include "thread.h" #include "envelope.h" #include "header.h" -#include "list.h" -#include "memory.h" -#include "queue.h" -#include "string2.h" /** * is_descendant - Is one thread a descendant of another diff --git a/mutt/thread.h b/email/thread.h similarity index 95% rename from mutt/thread.h rename to email/thread.h index f69e988f2..b5b696c42 100644 --- a/mutt/thread.h +++ b/email/thread.h @@ -20,8 +20,8 @@ * this program. If not, see . */ -#ifndef _MUTT_THREAD_H -#define _MUTT_THREAD_H +#ifndef _EMAIL_THREAD_H +#define _EMAIL_THREAD_H #include #include @@ -57,4 +57,4 @@ void mutt_break_thread(struct Header *hdr); void thread_hash_destructor(int type, void *obj, intptr_t data); void unlink_message(struct MuttThread **old, struct MuttThread *cur); -#endif /* _MUTT_THREAD_H */ +#endif /* _EMAIL_THREAD_H */ diff --git a/enriched.c b/enriched.c index 269e5e0f2..51a354407 100644 --- a/enriched.c +++ b/enriched.c @@ -31,6 +31,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt_window.h" #include "state.h" diff --git a/flags.c b/flags.c index 3f0a32472..ba8d6a38e 100644 --- a/flags.c +++ b/flags.c @@ -30,6 +30,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "globals.h" diff --git a/group.c b/group.c index 931285c6a..2dcaccbd0 100644 --- a/group.c +++ b/group.c @@ -22,9 +22,10 @@ */ #include "config.h" -#include #include +#include #include "mutt/mutt.h" +#include "email/email.h" #include "group.h" #include "globals.h" #include "protos.h" diff --git a/handler.c b/handler.c index cc8467a5c..0f2a1be4d 100644 --- a/handler.c +++ b/handler.c @@ -33,6 +33,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "handler.h" #include "copy.h" diff --git a/hcache/hcache.c b/hcache/hcache.c index f55917f9f..831458eea 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -32,6 +32,7 @@ */ #include "config.h" +#include "email/email.h" #if !(defined(HAVE_BDB) || defined(HAVE_GDBM) || defined(HAVE_KC) || \ defined(HAVE_LMDB) || defined(HAVE_QDBM) || defined(HAVE_TC)) diff --git a/hdrline.c b/hdrline.c index 00361bce4..a6528cca8 100644 --- a/hdrline.c +++ b/hdrline.c @@ -30,6 +30,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "format_flags.h" diff --git a/hook.c b/hook.c index 7d1b547e2..442d0dc0a 100644 --- a/hook.c +++ b/hook.c @@ -34,6 +34,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "globals.h" #include "mailbox.h" diff --git a/imap/command.c b/imap/command.c index 26ee5fe44..f849a64e6 100644 --- a/imap/command.c +++ b/imap/command.c @@ -39,6 +39,7 @@ #include #include "imap_private.h" #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "buffy.h" #include "context.h" diff --git a/imap/imap.c b/imap/imap.c index ce58cbda2..206a06819 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -38,6 +38,7 @@ #include #include "imap_private.h" #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "imap.h" diff --git a/imap/message.c b/imap/message.c index 4b1a55a5b..245677299 100644 --- a/imap/message.c +++ b/imap/message.c @@ -36,6 +36,7 @@ #include #include "imap_private.h" #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "message.h" diff --git a/imap/message.h b/imap/message.h index 63e17d43f..b99b2bbe9 100644 --- a/imap/message.h +++ b/imap/message.h @@ -26,6 +26,7 @@ #include #include +#include "email/email.h" /** * struct ImapHeaderData - IMAP-specific header data diff --git a/init.c b/init.c index ede2c24e4..cec49f7d5 100644 --- a/init.c +++ b/init.c @@ -35,6 +35,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "init.h" #include "alias.h" diff --git a/main.c b/main.c index 1e2a7987c..66f14b531 100644 --- a/main.c +++ b/main.c @@ -42,6 +42,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "alias.h" diff --git a/mbox.c b/mbox.c index 52c44e1c0..7eb08a770 100644 --- a/mbox.c +++ b/mbox.c @@ -33,6 +33,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "buffy.h" #include "context.h" diff --git a/menu.c b/menu.c index 8df9329ee..5082fcb79 100644 --- a/menu.c +++ b/menu.c @@ -28,6 +28,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "globals.h" diff --git a/mh.c b/mh.c index 98a71321b..b4400e2e3 100644 --- a/mh.c +++ b/mh.c @@ -39,6 +39,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "buffy.h" #include "context.h" diff --git a/mutt/hash.c b/mutt/hash.c index 2fc43b266..4179df3f9 100644 --- a/mutt/hash.c +++ b/mutt/hash.c @@ -28,8 +28,8 @@ */ #include "config.h" -#include #include +#include #include #include "hash.h" #include "memory.h" diff --git a/mutt/mutt.h b/mutt/mutt.h index 20361571d..d8ddfbbd3 100644 --- a/mutt/mutt.h +++ b/mutt/mutt.h @@ -27,19 +27,14 @@ * * | File | Description | * | :--------------- | :----------------- | - * | mutt/address.c | @subpage address | - * | mutt/attach.c | @subpage attach | * | 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 | - * | mutt/envelope.c | @subpage envelope | * | mutt/envlist.c | @subpage envlist | * | 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 | @@ -48,14 +43,11 @@ * | mutt/md5.c | @subpage md5 | * | mutt/memory.c | @subpage memory | * | mutt/mime.c | @subpage mime | - * | mutt/parameter.c | @subpage parameter | * | mutt/regex.c | @subpage regex | * | mutt/rfc2047.c | @subpage rfc2047 | * | mutt/sha1.c | @subpage sha1 | * | mutt/signal.c | @subpage signal | * | mutt/string.c | @subpage string | - * | mutt/tags.c | @subpage tags | - * | mutt/thread.c | @subpage thread | * * @note The library is self-contained -- some files may depend on others in * the library, but none depends on source from outside. @@ -64,20 +56,14 @@ #ifndef _MUTT_MUTT_H #define _MUTT_MUTT_H -#include "address.h" -#include "attach.h" #include "base64.h" -#include "body.h" #include "buffer.h" #include "charset.h" -#include "content.h" #include "date.h" -#include "envelope.h" #include "envlist.h" #include "exit.h" #include "file.h" #include "hash.h" -#include "header.h" #include "idna2.h" #include "list.h" #include "logging.h" @@ -87,14 +73,11 @@ #include "memory.h" #include "message.h" #include "mime.h" -#include "parameter.h" #include "queue.h" #include "regex3.h" #include "rfc2047.h" #include "sha1.h" #include "signal2.h" #include "string2.h" -#include "tags.h" -#include "thread.h" #endif /* _MUTT_MUTT_H */ diff --git a/mutt_attach.c b/mutt_attach.c index 57f8e36cc..40e47ca3c 100644 --- a/mutt_attach.c +++ b/mutt_attach.c @@ -32,6 +32,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "copy.h" diff --git a/mutt_body.c b/mutt_body.c index f3a5cd7b5..0ea066178 100644 --- a/mutt_body.c +++ b/mutt_body.c @@ -32,6 +32,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "protos.h" /** diff --git a/mutt_header.c b/mutt_header.c index 06b9bc989..3abbf0af3 100644 --- a/mutt_header.c +++ b/mutt_header.c @@ -28,6 +28,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "alias.h" #include "context.h" diff --git a/mutt_lua.c b/mutt_lua.c index a551145c6..aca54f251 100644 --- a/mutt_lua.c +++ b/mutt_lua.c @@ -29,6 +29,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "mutt_lua.h" #include "mailbox.h" diff --git a/mutt_notmuch.c b/mutt_notmuch.c index c3cd90dd8..2e31493fb 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -47,6 +47,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "mutt_notmuch.h" #include "buffy.h" diff --git a/mutt_thread.c b/mutt_thread.c index 8f0039300..756dc7293 100644 --- a/mutt_thread.c +++ b/mutt_thread.c @@ -28,6 +28,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "mutt_thread.h" #include "context.h" diff --git a/muttlib.c b/muttlib.c index 39cbcd167..d9f2b4e1d 100644 --- a/muttlib.c +++ b/muttlib.c @@ -36,6 +36,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "alias.h" diff --git a/mx.c b/mx.c index 8986fbc13..e3b45cf81 100644 --- a/mx.c +++ b/mx.c @@ -38,6 +38,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "mx.h" #include "buffy.h" diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index 5d18f727c..701cb00f8 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -39,6 +39,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "alias.h" #include "context.h" diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 29c107f55..9b03803a9 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -49,6 +49,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "alias.h" #include "crypt.h" diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index 9bf889e92..4e27bd077 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -42,6 +42,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "pgp.h" #include "crypt.h" diff --git a/ncrypt/pgpinvoke.c b/ncrypt/pgpinvoke.c index 23fbc02f0..8fb36d9fd 100644 --- a/ncrypt/pgpinvoke.c +++ b/ncrypt/pgpinvoke.c @@ -36,6 +36,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index 65445f002..046d2df5d 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -39,6 +39,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "pgpkey.h" #include "crypt.h" diff --git a/ncrypt/smime.c b/ncrypt/smime.c index f4fe7de2c..d199ed6a6 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -36,6 +36,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "smime.h" #include "alias.h" diff --git a/nntp.c b/nntp.c index d76bd1265..a377c9471 100644 --- a/nntp.c +++ b/nntp.c @@ -36,6 +36,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "nntp.h" diff --git a/nntp.h b/nntp.h index 6c4a0732b..f314bfdac 100644 --- a/nntp.h +++ b/nntp.h @@ -30,6 +30,7 @@ #include #include #include +#include "email/email.h" #include "format_flags.h" #include "mx.h" #ifdef USE_HCACHE diff --git a/pager.c b/pager.c index caea8024b..5847cd3ea 100644 --- a/pager.c +++ b/pager.c @@ -32,6 +32,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "pager.h" #include "alias.h" diff --git a/parse.c b/parse.c index 00f660d1b..e39a20fa0 100644 --- a/parse.c +++ b/parse.c @@ -29,6 +29,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "globals.h" #include "mailbox.h" diff --git a/pattern.c b/pattern.c index 08b5100d1..154fe34d3 100644 --- a/pattern.c +++ b/pattern.c @@ -32,6 +32,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "pattern.h" diff --git a/po/POTFILES.in b/po/POTFILES.in index ec271c323..a303a8eff 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -22,6 +22,14 @@ curs_lib.c curs_main.c edit.c editmsg.c +email/address.c +email/attach.c +email/body.c +email/envelope.c +email/header.c +email/parameter.c +email/tags.c +email/thread.c enriched.c enter.c filter.c @@ -59,19 +67,14 @@ main.c mbox.c menu.c mh.c -mutt/address.c -mutt/attach.c mutt/base64.c -mutt/body.c mutt/buffer.c mutt/charset.c mutt/date.c -mutt/envelope.c mutt/envlist.c mutt/exit.c mutt/file.c mutt/hash.c -mutt/header.c mutt/idna.c mutt/list.c mutt/logging.c @@ -80,14 +83,12 @@ mutt/mbyte.c mutt/md5.c mutt/memory.c mutt/mime.c -mutt/parameter.c mutt/regex.c mutt/rfc2047.c mutt/sha1.c mutt/signal.c mutt/string.c -mutt/tags.c -mutt/thread.c +muttlib.c mutt_account.c mutt_attach.c mutt_body.c @@ -99,16 +100,15 @@ mutt_signal.c mutt_socket.c mutt_thread.c mutt_window.c -muttlib.c mx.c ncrypt/crypt.c +ncrypt/cryptglue.c ncrypt/crypt_gpgme.c ncrypt/crypt_mod.c ncrypt/crypt_mod_pgp_classic.c ncrypt/crypt_mod_pgp_gpgme.c ncrypt/crypt_mod_smime_classic.c ncrypt/crypt_mod_smime_gpgme.c -ncrypt/cryptglue.c ncrypt/gnupgparse.c ncrypt/pgp.c ncrypt/pgpinvoke.c diff --git a/pop.c b/pop.c index 74d16f601..8ed92d851 100644 --- a/pop.c +++ b/pop.c @@ -36,6 +36,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "pop.h" diff --git a/pop_auth.c b/pop_auth.c index 7f79543e0..0f43fb519 100644 --- a/pop_auth.c +++ b/pop_auth.c @@ -31,6 +31,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "globals.h" #include "mutt_account.h" diff --git a/pop_lib.c b/pop_lib.c index 455b1edaa..bfa07fffc 100644 --- a/pop_lib.c +++ b/pop_lib.c @@ -29,6 +29,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "context.h" diff --git a/postpone.c b/postpone.c index 47c826a08..7e4d748a4 100644 --- a/postpone.c +++ b/postpone.c @@ -36,6 +36,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "context.h" diff --git a/query.c b/query.c index d874ff0fe..d4e19c63b 100644 --- a/query.c +++ b/query.c @@ -27,6 +27,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "alias.h" #include "filter.h" diff --git a/recvattach.c b/recvattach.c index 5e0087872..67c6f90d2 100644 --- a/recvattach.c +++ b/recvattach.c @@ -29,6 +29,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "filter.h" diff --git a/recvcmd.c b/recvcmd.c index f7d114853..5a079afc1 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -26,6 +26,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "alias.h" #include "copy.h" diff --git a/remailer.c b/remailer.c index a03d26b8b..5f6a17465 100644 --- a/remailer.c +++ b/remailer.c @@ -27,6 +27,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "remailer.h" #include "filter.h" diff --git a/rfc1524.c b/rfc1524.c index 20b977b76..7bd45de8b 100644 --- a/rfc1524.c +++ b/rfc1524.c @@ -38,6 +38,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "rfc1524.h" #include "globals.h" diff --git a/rfc2047.c b/rfc2047.c index 1cb2c7866..b20538da2 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -23,6 +23,7 @@ #include "config.h" #include "mutt/mutt.h" +#include "email/email.h" #include "globals.h" #include diff --git a/rfc2231.c b/rfc2231.c index b3411958d..4ed3f8889 100644 --- a/rfc2231.c +++ b/rfc2231.c @@ -34,6 +34,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "rfc2231.h" #include "globals.h" #include "options.h" diff --git a/rfc3676.c b/rfc3676.c index 36cad7371..365ed4a54 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -30,6 +30,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "globals.h" #include "mutt_window.h" #include "options.h" diff --git a/safe_asprintf.c b/safe_asprintf.c index ee5bcbb9b..b5acb8754 100644 --- a/safe_asprintf.c +++ b/safe_asprintf.c @@ -30,8 +30,8 @@ * version using it. */ -#include #include "config.h" +#include #include "mutt/mutt.h" #ifdef HAVE_VASPRINTF diff --git a/score.c b/score.c index 3072a1e2f..088575754 100644 --- a/score.c +++ b/score.c @@ -24,6 +24,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "context.h" #include "globals.h" diff --git a/send.c b/send.c index a7b0693aa..5c3e61a33 100644 --- a/send.c +++ b/send.c @@ -32,6 +32,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "alias.h" #include "context.h" diff --git a/sendlib.c b/sendlib.c index 97c39c8a1..23a3e5d57 100644 --- a/sendlib.c +++ b/sendlib.c @@ -36,6 +36,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "buffy.h" #include "context.h" diff --git a/smtp.c b/smtp.c index db484cd85..fc72ecaed 100644 --- a/smtp.c +++ b/smtp.c @@ -32,6 +32,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "conn/conn.h" #include "mutt.h" #include "globals.h" diff --git a/sort.c b/sort.c index 9e6c773f0..825d1823d 100644 --- a/sort.c +++ b/sort.c @@ -25,6 +25,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "sort.h" #include "context.h" #include "globals.h" diff --git a/sort.h b/sort.h index d2c4b9094..393a9eba0 100644 --- a/sort.h +++ b/sort.h @@ -23,8 +23,9 @@ #ifndef _MUTT_SORT_H #define _MUTT_SORT_H -#include "where.h" #include "mutt/mutt.h" +#include "email/email.h" +#include "where.h" struct Context; diff --git a/url.c b/url.c index 1b443da77..52a79a432 100644 --- a/url.c +++ b/url.c @@ -25,6 +25,7 @@ #include #include #include "mutt/mutt.h" +#include "email/email.h" #include "mutt.h" #include "url.h" #include "globals.h" diff --git a/url.h b/url.h index 3c43bcd5a..b3312270a 100644 --- a/url.h +++ b/url.h @@ -23,6 +23,7 @@ #include #include "mutt/mutt.h" +#include "email/email.h" /** * enum UrlScheme - All recognised Url types