From: Richard Russon Date: Tue, 3 Jul 2018 14:12:29 +0000 (+0100) Subject: move Envelope to library X-Git-Tag: 2019-10-25~762^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49c4bc486487b55daabe9927cd33b5e9a68392a2;p=neomutt move Envelope to library --- diff --git a/Makefile.autosetup b/Makefile.autosetup index 0a733a7f2..bd80b1467 100644 --- a/Makefile.autosetup +++ b/Makefile.autosetup @@ -64,7 +64,7 @@ NEOMUTT= neomutt$(EXEEXT) NEOMUTTOBJS= addrbook.o alias.o attach.o bcache.o body.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 envelope.o filter.o flags.o from.o group.o handler.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_logging.o mutt_signal.o mutt_socket.o mutt_window.o mx.o newsrc.o \ @@ -93,7 +93,7 @@ ALLOBJS+= $(NEOMUTTOBJS) # libmutt LIBMUTT= libmutt.a LIBMUTTOBJS= mutt/address.o 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/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 \ mutt/parameter.o mutt/regex.o mutt/rfc2047.o mutt/sha1.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)/body.h \ - $(SRCDIR)/envelope.h $(SRCDIR)/header.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 "envelope.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/alias.c b/alias.c index 6c884f5a4..d51ee4c40 100644 --- a/alias.c +++ b/alias.c @@ -32,7 +32,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "alias.h" -#include "envelope.h" #include "globals.h" #include "mutt_curses.h" #include "options.h" diff --git a/buffy.c b/buffy.c index ab89026f7..8eb209e2d 100644 --- a/buffy.c +++ b/buffy.c @@ -33,7 +33,6 @@ #include "conn/conn.h" #include "buffy.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/commands.c b/commands.c index bdb12a15c..47241ebd7 100644 --- a/commands.c +++ b/commands.c @@ -37,7 +37,6 @@ #include "buffy.h" #include "context.h" #include "copy.h" -#include "envelope.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/compose.c b/compose.c index d21106e89..960997150 100644 --- a/compose.c +++ b/compose.c @@ -37,7 +37,6 @@ #include "body.h" #include "content.h" #include "context.h" -#include "envelope.h" #include "format_flags.h" #include "globals.h" #include "header.h" diff --git a/copy.c b/copy.c index 54b5c3ad7..12d02570d 100644 --- a/copy.c +++ b/copy.c @@ -36,7 +36,6 @@ #include "copy.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "handler.h" #include "header.h" diff --git a/curs_main.c b/curs_main.c index e2fc119d8..00cc73b2d 100644 --- a/curs_main.c +++ b/curs_main.c @@ -35,7 +35,6 @@ #include "body.h" #include "buffy.h" #include "context.h" -#include "envelope.h" #include "format_flags.h" #include "globals.h" #include "header.h" diff --git a/edit.c b/edit.c index 8fe7b71d5..cd480e30d 100644 --- a/edit.c +++ b/edit.c @@ -34,7 +34,6 @@ #include "alias.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mutt_curses.h" diff --git a/hcache/hcache.c b/hcache/hcache.c index 27ddfa6e4..073e166cf 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -50,7 +50,6 @@ #include "mutt/mutt.h" #include "backend.h" #include "body.h" -#include "envelope.h" #include "globals.h" #include "hcache.h" #include "hcache/hcversion.h" diff --git a/hdrline.c b/hdrline.c index cb9cf845b..f5414cb85 100644 --- a/hdrline.c +++ b/hdrline.c @@ -33,7 +33,6 @@ #include "mutt.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "format_flags.h" #include "globals.h" #include "header.h" diff --git a/header.c b/header.c index 2af55222a..f838bfe1c 100644 --- a/header.c +++ b/header.c @@ -33,7 +33,6 @@ #include "alias.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "ncrypt/ncrypt.h" #include "options.h" diff --git a/hook.c b/hook.c index b329db8b0..9646cd217 100644 --- a/hook.c +++ b/hook.c @@ -35,7 +35,6 @@ #include #include "mutt/mutt.h" #include "mutt.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/imap/imap.c b/imap/imap.c index 09ef50cbc..e7fe8e66f 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -47,7 +47,6 @@ #include "body.h" #include "buffy.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/imap/message.c b/imap/message.c index 62bace9a7..a08092227 100644 --- a/imap/message.c +++ b/imap/message.c @@ -42,7 +42,6 @@ #include "bcache.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "imap/imap.h" diff --git a/init.c b/init.c index ac49cd4b0..3829bd19a 100644 --- a/init.c +++ b/init.c @@ -39,7 +39,6 @@ #include "init.h" #include "alias.h" #include "context.h" -#include "envelope.h" #include "filter.h" #include "group.h" #include "hcache/hcache.h" diff --git a/main.c b/main.c index f7cd9a493..081602b92 100644 --- a/main.c +++ b/main.c @@ -47,7 +47,6 @@ #include "alias.h" #include "body.h" #include "buffy.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "keymap.h" diff --git a/mbox.c b/mbox.c index f95fa3380..df94b10dc 100644 --- a/mbox.c +++ b/mbox.c @@ -38,7 +38,6 @@ #include "buffy.h" #include "context.h" #include "copy.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/mh.c b/mh.c index ca8faff46..68d2d5369 100644 --- a/mh.c +++ b/mh.c @@ -44,7 +44,6 @@ #include "buffy.h" #include "context.h" #include "copy.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/envelope.c b/mutt/envelope.c similarity index 98% rename from envelope.c rename to mutt/envelope.c index f2576c12b..db732d9e5 100644 --- a/envelope.c +++ b/mutt/envelope.c @@ -28,9 +28,14 @@ #include "config.h" #include -#include "mutt/mutt.h" +#include #include "envelope.h" -#include "protos.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/envelope.h b/mutt/envelope.h similarity index 99% rename from envelope.h rename to mutt/envelope.h index 07fde6999..8f998e7a3 100644 --- a/envelope.h +++ b/mutt/envelope.h @@ -24,7 +24,7 @@ #define _MUTT_ENVELOPE_H #include -#include "mutt/mutt.h" +#include "list.h" /** * struct Envelope - The header of an email diff --git a/mutt/mutt.h b/mutt/mutt.h index 98bfdaa10..76e91e8bc 100644 --- a/mutt/mutt.h +++ b/mutt/mutt.h @@ -32,6 +32,7 @@ * | 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 | @@ -63,8 +64,9 @@ #include "buffer.h" #include "charset.h" #include "date.h" -#include "exit.h" +#include "envelope.h" #include "envlist.h" +#include "exit.h" #include "file.h" #include "hash.h" #include "idna2.h" diff --git a/mutt_notmuch.c b/mutt_notmuch.c index d44bda43f..3c1276e52 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -53,7 +53,6 @@ #include "body.h" #include "buffy.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/muttlib.c b/muttlib.c index 264c5677a..0970e23cc 100644 --- a/muttlib.c +++ b/muttlib.c @@ -44,7 +44,6 @@ #include "mutt.h" #include "alias.h" #include "body.h" -#include "envelope.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/mx.c b/mx.c index 9bb7d0ee9..a5b846a2a 100644 --- a/mx.c +++ b/mx.c @@ -43,7 +43,6 @@ #include "buffy.h" #include "context.h" #include "copy.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "keymap.h" diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index a70cf0ee1..2dba1fdb6 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -46,7 +46,6 @@ #include "context.h" #include "copy.h" #include "cryptglue.h" -#include "envelope.h" #include "globals.h" #include "handler.h" #include "header.h" diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 83d9caa57..a1157f21a 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -53,7 +53,6 @@ #include "alias.h" #include "body.h" #include "crypt.h" -#include "envelope.h" #include "format_flags.h" #include "globals.h" #include "handler.h" diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 8f06ab652..e4ffe26de 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -43,7 +43,6 @@ #include "copy.h" #include "crypt.h" #include "cryptglue.h" -#include "envelope.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/nntp.c b/nntp.c index 71a810a76..36732787a 100644 --- a/nntp.c +++ b/nntp.c @@ -41,7 +41,6 @@ #include "bcache.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/pager.c b/pager.c index dd8dc6a0a..c21af6fe4 100644 --- a/pager.c +++ b/pager.c @@ -39,7 +39,6 @@ #include "attach.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "format_flags.h" #include "globals.h" #include "header.h" diff --git a/parse.c b/parse.c index c9a22f44e..6e6966a0c 100644 --- a/parse.c +++ b/parse.c @@ -31,7 +31,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "body.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/pattern.c b/pattern.c index a1ec27b54..ed7d2a756 100644 --- a/pattern.c +++ b/pattern.c @@ -40,7 +40,6 @@ #include "body.h" #include "context.h" #include "copy.h" -#include "envelope.h" #include "globals.h" #include "group.h" #include "handler.h" diff --git a/po/POTFILES.in b/po/POTFILES.in index f980168d7..55aba6b01 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -26,7 +26,6 @@ edit.c editmsg.c enriched.c enter.c -envelope.c filter.c flags.c from.c @@ -68,6 +67,7 @@ mutt/base64.c mutt/buffer.c mutt/charset.c mutt/date.c +mutt/envelope.c mutt/envlist.c mutt/exit.c mutt/file.c @@ -86,7 +86,6 @@ mutt/rfc2047.c mutt/sha1.c mutt/signal.c mutt/string.c -muttlib.c mutt_account.c mutt_logging.c mutt_lua.c @@ -94,15 +93,16 @@ mutt_notmuch.c mutt_signal.c mutt_socket.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 c52585abe..aef7d651e 100644 --- a/pop.c +++ b/pop.c @@ -41,7 +41,6 @@ #include "bcache.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "mailbox.h" diff --git a/postpone.c b/postpone.c index 125d40ef4..3c62a932a 100644 --- a/postpone.c +++ b/postpone.c @@ -40,7 +40,6 @@ #include "mutt.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "format_flags.h" #include "globals.h" #include "handler.h" diff --git a/query.c b/query.c index 2f4f2cd41..ffc90126c 100644 --- a/query.c +++ b/query.c @@ -30,7 +30,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "alias.h" -#include "envelope.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/recvattach.c b/recvattach.c index 8f8ec04f2..aa60d79b2 100644 --- a/recvattach.c +++ b/recvattach.c @@ -33,7 +33,6 @@ #include "attach.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/recvcmd.c b/recvcmd.c index 4558a1517..c9a16e540 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -31,7 +31,6 @@ #include "attach.h" #include "body.h" #include "copy.h" -#include "envelope.h" #include "globals.h" #include "handler.h" #include "header.h" diff --git a/remailer.c b/remailer.c index 0ec1f4340..daaddcdc6 100644 --- a/remailer.c +++ b/remailer.c @@ -30,7 +30,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "remailer.h" -#include "envelope.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/send.c b/send.c index 05706c285..fd80df9de 100644 --- a/send.c +++ b/send.c @@ -37,7 +37,6 @@ #include "body.h" #include "context.h" #include "copy.h" -#include "envelope.h" #include "filter.h" #include "globals.h" #include "header.h" diff --git a/sendlib.c b/sendlib.c index db2e234a3..b760703ea 100644 --- a/sendlib.c +++ b/sendlib.c @@ -42,7 +42,6 @@ #include "content.h" #include "context.h" #include "copy.h" -#include "envelope.h" #include "filter.h" #include "format_flags.h" #include "globals.h" diff --git a/sort.c b/sort.c index 1b4312cec..3384cd061 100644 --- a/sort.c +++ b/sort.c @@ -28,7 +28,6 @@ #include "sort.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "options.h" diff --git a/thread.c b/thread.c index d66ff685f..07b77ffd6 100644 --- a/thread.c +++ b/thread.c @@ -31,7 +31,6 @@ #include "thread.h" #include "body.h" #include "context.h" -#include "envelope.h" #include "globals.h" #include "header.h" #include "options.h" diff --git a/url.c b/url.c index 8a36a1a08..1b443da77 100644 --- a/url.c +++ b/url.c @@ -27,7 +27,6 @@ #include "mutt/mutt.h" #include "mutt.h" #include "url.h" -#include "envelope.h" #include "globals.h" #include "protos.h" #include "rfc2047.h"