diff --git a/.clang-format b/.clang-format index fe560036608..bc02e7d69af 100644 --- a/.clang-format +++ b/.clang-format @@ -54,11 +54,11 @@ IncludeCategories: # All backend library headers - Regex: '".*/lib\.h"' - Priority: 10 + Priority: 5 # All other NeoMutt headers - Regex: '".*"' - Priority: 5 + Priority: 10 AlignAfterOpenBracket: true AlignEscapedNewlinesLeft: false diff --git a/alias/alias.c b/alias/alias.c index 3afbc57189a..d6b54378214 100644 --- a/alias/alias.c +++ b/alias/alias.c @@ -46,11 +46,11 @@ #include "mutt.h" #include "alias.h" #include "lib.h" +#include "send/lib.h" #include "maillist.h" #include "mutt_globals.h" #include "muttlib.h" #include "reverse.h" -#include "send/lib.h" struct AliasList Aliases = TAILQ_HEAD_INITIALIZER(Aliases); ///< List of all the user's email aliases diff --git a/alias/dlgquery.c b/alias/dlgquery.c index a8832a9343d..230669406c2 100644 --- a/alias/dlgquery.c +++ b/alias/dlgquery.c @@ -40,6 +40,7 @@ #include "gui/lib.h" #include "mutt.h" #include "lib.h" +#include "send/lib.h" #include "alias.h" #include "format_flags.h" #include "gui.h" @@ -49,7 +50,6 @@ #include "mutt_menu.h" #include "muttlib.h" #include "opcodes.h" -#include "send/lib.h" /* These Config Variables are only used in dlgquery.c */ char *C_QueryCommand; ///< Config: External command to query and external address book diff --git a/alias/lib.h b/alias/lib.h index 917a7926b82..9d9f2f9abdb 100644 --- a/alias/lib.h +++ b/alias/lib.h @@ -38,8 +38,8 @@ #ifndef MUTT_ALIAS_LIB_H #define MUTT_ALIAS_LIB_H -#include #include +#include #include #include "mutt_commands.h" diff --git a/autocrypt/autocrypt.c b/autocrypt/autocrypt.c index 4844210585c..eab1d12fcd3 100644 --- a/autocrypt/autocrypt.c +++ b/autocrypt/autocrypt.c @@ -38,14 +38,14 @@ #include "config/lib.h" #include "email/lib.h" #include "gui/lib.h" -#include "mutt_globals.h" -#include "muttlib.h" -#include "mx.h" -#include "options.h" #include "autocrypt/lib.h" #include "hcache/lib.h" #include "ncrypt/lib.h" #include "send/lib.h" +#include "mutt_globals.h" +#include "muttlib.h" +#include "mx.h" +#include "options.h" /** * autocrypt_dir_init - Initialise an Autocrypt directory diff --git a/autocrypt/dlgautocrypt.c b/autocrypt/dlgautocrypt.c index 13f4aec685b..3a30b2f4601 100644 --- a/autocrypt/dlgautocrypt.c +++ b/autocrypt/dlgautocrypt.c @@ -36,13 +36,13 @@ #include "config/lib.h" #include "gui/lib.h" #include "mutt.h" +#include "autocrypt/lib.h" #include "format_flags.h" #include "keymap.h" #include "mutt_globals.h" #include "mutt_menu.h" #include "muttlib.h" #include "opcodes.h" -#include "autocrypt/lib.h" /** * struct AccountEntry - An entry in the Autocrypt account Menu diff --git a/autocrypt/gpgme.c b/autocrypt/gpgme.c index 204d0d9147f..ea56901493c 100644 --- a/autocrypt/gpgme.c +++ b/autocrypt/gpgme.c @@ -36,8 +36,8 @@ #include "config/lib.h" #include "gui/lib.h" #include "lib.h" -#include "options.h" #include "ncrypt/lib.h" +#include "options.h" /** * create_gpgme_context - Create a GPGME context diff --git a/bcache/bcache.c b/bcache/bcache.c index 72e0290afe4..ed49475ad74 100644 --- a/bcache/bcache.c +++ b/bcache/bcache.c @@ -37,9 +37,9 @@ #include #include "mutt/lib.h" #include "email/lib.h" +#include "bcache/lib.h" #include "mutt_account.h" #include "muttlib.h" -#include "bcache/lib.h" struct ConnAccount; diff --git a/browser.c b/browser.c index 86f80d4b5af..774827fe75f 100644 --- a/browser.c +++ b/browser.c @@ -46,6 +46,7 @@ #include "gui/lib.h" #include "mutt.h" #include "browser.h" +#include "send/lib.h" #include "context.h" #include "format_flags.h" #include "keymap.h" @@ -57,7 +58,6 @@ #include "mx.h" #include "opcodes.h" #include "options.h" -#include "send/lib.h" #ifdef USE_IMAP #include "imap/lib.h" #endif diff --git a/command_parse.c b/command_parse.c index 57869c0e5ac..d0f4ad07b7b 100644 --- a/command_parse.c +++ b/command_parse.c @@ -43,6 +43,7 @@ #include "gui/lib.h" #include "mutt.h" #include "command_parse.h" +#include "imap/lib.h" #include "context.h" #include "init.h" #include "keymap.h" @@ -57,7 +58,6 @@ #include "myvar.h" #include "options.h" #include "version.h" -#include "imap/lib.h" #ifdef USE_SIDEBAR #include "sidebar/lib.h" #endif diff --git a/commands.c b/commands.c index 50f7c1ebcf9..1c40aae16e9 100644 --- a/commands.c +++ b/commands.c @@ -45,6 +45,8 @@ #include "gui/lib.h" #include "mutt.h" #include "commands.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "context.h" #include "copy.h" #include "format_flags.h" @@ -66,8 +68,6 @@ #include "progress.h" #include "protos.h" #include "sort.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef USE_IMAP #include "imap/lib.h" #endif diff --git a/compose.c b/compose.c index da8e54528b9..13d4cfc739b 100644 --- a/compose.c +++ b/compose.c @@ -47,6 +47,8 @@ #include "gui/lib.h" #include "mutt.h" #include "compose.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "browser.h" #include "commands.h" #include "context.h" @@ -68,8 +70,6 @@ #include "recvattach.h" #include "rfc3676.h" #include "sort.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/context.c b/context.c index f555c3c942c..52ff6b937cc 100644 --- a/context.c +++ b/context.c @@ -32,16 +32,16 @@ #include "email/lib.h" #include "core/lib.h" #include "context.h" +#include "imap/lib.h" +#include "maildir/lib.h" +#include "ncrypt/lib.h" +#include "pattern/lib.h" #include "mutt_globals.h" #include "mutt_header.h" #include "mutt_thread.h" #include "mx.h" #include "score.h" #include "sort.h" -#include "imap/lib.h" -#include "maildir/lib.h" -#include "ncrypt/lib.h" -#include "pattern/lib.h" /** * ctx_free - Free a Context diff --git a/copy.c b/copy.c index 99e70bba875..3b39a5c3df8 100644 --- a/copy.c +++ b/copy.c @@ -39,17 +39,17 @@ #include "gui/lib.h" #include "mutt.h" #include "copy.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "context.h" #include "handler.h" #include "hdrline.h" #include "mutt_globals.h" #include "mx.h" #include "state.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef USE_NOTMUCH -#include "muttlib.h" #include "notmuch/lib.h" +#include "muttlib.h" #endif #ifdef ENABLE_NLS #include diff --git a/debug/graphviz.c b/debug/graphviz.c index fc56eda2257..ae4b38353c7 100644 --- a/debug/graphviz.c +++ b/debug/graphviz.c @@ -36,17 +36,17 @@ #include "core/lib.h" #include "conn/lib.h" #include "lib.h" +#include "compmbox/lib.h" +#include "maildir/lib.h" +#include "mbox/lib.h" +#include "nntp/lib.h" +#include "notmuch/lib.h" #include "context.h" #include "imap/private.h" #include "maildir/private.h" #include "mutt_globals.h" #include "notmuch/private.h" #include "pop/private.h" -#include "compmbox/lib.h" -#include "maildir/lib.h" -#include "mbox/lib.h" -#include "nntp/lib.h" -#include "notmuch/lib.h" // #define GV_HIDE_CONTEXT #define GV_HIDE_CONTEXT_CONTENTS diff --git a/email/email.h b/email/email.h index d1a4a427844..23e79fab72c 100644 --- a/email/email.h +++ b/email/email.h @@ -28,8 +28,8 @@ #include #include #include "mutt/lib.h" -#include "tags.h" #include "ncrypt/lib.h" +#include "tags.h" /** * struct Email - The envelope/body of an email diff --git a/enter.c b/enter.c index 9f6ff6682e5..c46d8354b10 100644 --- a/enter.c +++ b/enter.c @@ -37,6 +37,8 @@ #include "alias/lib.h" #include "gui/lib.h" #include "mutt.h" +#include "history/lib.h" +#include "pattern/lib.h" #include "browser.h" #include "context.h" #include "enter_state.h" @@ -48,8 +50,6 @@ #include "muttlib.h" #include "opcodes.h" #include "protos.h" -#include "history/lib.h" -#include "pattern/lib.h" /** * enum EnterRedrawFlags - redraw flags for mutt_enter_string_full() diff --git a/gui/color.c b/gui/color.c index cb3c22cba8e..092830f74f0 100644 --- a/gui/color.c +++ b/gui/color.c @@ -36,13 +36,13 @@ #include "core/lib.h" #include "mutt.h" #include "color.h" +#include "pattern/lib.h" #include "context.h" #include "init.h" #include "mutt_commands.h" #include "mutt_curses.h" #include "mutt_globals.h" #include "options.h" -#include "pattern/lib.h" #ifdef USE_SLANG_CURSES #include #endif diff --git a/gui/mutt_window.c b/gui/mutt_window.c index a5f80b57830..e09d8c17c55 100644 --- a/gui/mutt_window.c +++ b/gui/mutt_window.c @@ -34,13 +34,13 @@ #include "core/lib.h" #include "debug/lib.h" #include "mutt_window.h" +#include "helpbar/lib.h" #include "mutt_curses.h" #include "mutt_globals.h" #include "mutt_menu.h" #include "opcodes.h" #include "options.h" #include "reflow.h" -#include "helpbar/lib.h" struct MuttWindow *RootWindow = NULL; ///< Parent of all Windows struct MuttWindow *AllDialogsWindow = NULL; ///< Parent of all Dialogs diff --git a/handler.c b/handler.c index bd1da4fa948..50d5c5ef105 100644 --- a/handler.c +++ b/handler.c @@ -43,6 +43,7 @@ #include "core/lib.h" #include "mutt.h" #include "handler.h" +#include "ncrypt/lib.h" #include "copy.h" #include "enriched.h" #include "keymap.h" @@ -56,7 +57,6 @@ #include "pager.h" #include "rfc3676.h" #include "state.h" -#include "ncrypt/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/hcache/hcache.c b/hcache/hcache.c index 578389e3047..c0d442f6864 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -46,11 +46,11 @@ #include "mutt/lib.h" #include "email/lib.h" #include "lib.h" +#include "compress/lib.h" +#include "store/lib.h" #include "hcache/hcversion.h" #include "muttlib.h" #include "serialize.h" -#include "compress/lib.h" -#include "store/lib.h" #if !(defined(HAVE_BDB) || defined(HAVE_GDBM) || defined(HAVE_KC) || \ defined(HAVE_LMDB) || defined(HAVE_QDBM) || defined(HAVE_ROCKSDB) || \ diff --git a/hdrline.c b/hdrline.c index e7d5609ff47..329a1584123 100644 --- a/hdrline.c +++ b/hdrline.c @@ -45,6 +45,7 @@ #include "alias/lib.h" #include "gui/lib.h" #include "hdrline.h" +#include "ncrypt/lib.h" #include "context.h" #include "format_flags.h" #include "hook.h" @@ -55,7 +56,6 @@ #include "mutt_thread.h" #include "muttlib.h" #include "sort.h" -#include "ncrypt/lib.h" /* These Config Variables are only used in hdrline.c */ struct MbTable *C_CryptChars; ///< Config: User-configurable crypto flags: signed, encrypted etc. diff --git a/history/dlghistory.c b/history/dlghistory.c index 0e992f6848d..2dc1752a507 100644 --- a/history/dlghistory.c +++ b/history/dlghistory.c @@ -33,12 +33,12 @@ #include "mutt/lib.h" #include "gui/lib.h" #include "mutt.h" +#include "history/lib.h" #include "format_flags.h" #include "keymap.h" #include "mutt_menu.h" #include "muttlib.h" #include "opcodes.h" -#include "history/lib.h" /// Help Bar for the History Selection dialog static const struct Mapping HistoryHelp[] = { diff --git a/hook.c b/hook.c index 8d2421a4a44..538fbe43002 100644 --- a/hook.c +++ b/hook.c @@ -39,6 +39,8 @@ #include "alias/lib.h" #include "mutt.h" #include "hook.h" +#include "ncrypt/lib.h" +#include "pattern/lib.h" #include "context.h" #include "format_flags.h" #include "hdrline.h" @@ -48,8 +50,6 @@ #include "mutt_globals.h" #include "muttlib.h" #include "mx.h" -#include "ncrypt/lib.h" -#include "pattern/lib.h" #ifdef USE_COMP_MBOX #include "compmbox/lib.h" #endif diff --git a/imap/browse.c b/imap/browse.c index 1b37be9e143..d4f837747f9 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -39,11 +39,11 @@ #include "conn/lib.h" #include "gui/lib.h" #include "mutt.h" +#include "imap/lib.h" #include "browser.h" #include "mutt_globals.h" #include "mutt_logging.h" #include "muttlib.h" -#include "imap/lib.h" /** * add_folder - Format and add an IMAP folder to the browser diff --git a/imap/imap.c b/imap/imap.c index d34ed621879..389a2fc8b6c 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -44,6 +44,8 @@ #include "gui/lib.h" #include "mutt.h" #include "lib.h" +#include "bcache/lib.h" +#include "pattern/lib.h" #include "auth.h" #include "commands.h" #include "hook.h" @@ -56,8 +58,6 @@ #include "mx.h" #include "progress.h" #include "sort.h" -#include "bcache/lib.h" -#include "pattern/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/imap/message.c b/imap/message.c index 812ab01387c..ad448e8cd76 100644 --- a/imap/message.c +++ b/imap/message.c @@ -45,6 +45,8 @@ #include "gui/lib.h" #include "mutt.h" #include "message.h" +#include "bcache/lib.h" +#include "imap/lib.h" #include "mutt_globals.h" #include "mutt_logging.h" #include "mutt_socket.h" @@ -52,8 +54,6 @@ #include "mx.h" #include "progress.h" #include "protos.h" -#include "bcache/lib.h" -#include "imap/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/imap/util.c b/imap/util.c index 81554162622..7ab5148e556 100644 --- a/imap/util.c +++ b/imap/util.c @@ -49,14 +49,14 @@ #include "core/lib.h" #include "conn/lib.h" #include "gui/lib.h" +#include "bcache/lib.h" +#include "imap/lib.h" #include "mutt_account.h" #include "mutt_globals.h" #include "options.h" -#include "bcache/lib.h" -#include "imap/lib.h" #ifdef USE_HCACHE -#include "message.h" #include "hcache/lib.h" +#include "message.h" #endif /** diff --git a/index.c b/index.c index 4866e7934e6..d69e119ccf2 100644 --- a/index.c +++ b/index.c @@ -45,6 +45,9 @@ #include "mutt.h" #include "debug/lib.h" #include "index.h" +#include "ncrypt/lib.h" +#include "pattern/lib.h" +#include "send/lib.h" #include "browser.h" #include "commands.h" #include "context.h" @@ -69,9 +72,6 @@ #include "score.h" #include "sort.h" #include "status.h" -#include "ncrypt/lib.h" -#include "pattern/lib.h" -#include "send/lib.h" #ifdef USE_SIDEBAR #include "sidebar/lib.h" #endif diff --git a/init.c b/init.c index f5e2ca15f96..a28bcb43aa9 100644 --- a/init.c +++ b/init.c @@ -48,6 +48,11 @@ #include "gui/lib.h" #include "mutt.h" #include "init.h" +#include "compress/lib.h" +#include "hcache/lib.h" +#include "history/lib.h" +#include "notmuch/lib.h" +#include "store/lib.h" #include "command_parse.h" #include "context.h" #include "functions.h" @@ -61,11 +66,6 @@ #include "options.h" #include "protos.h" #include "sort.h" -#include "compress/lib.h" -#include "hcache/lib.h" -#include "history/lib.h" -#include "notmuch/lib.h" -#include "store/lib.h" #ifdef USE_SIDEBAR #include "sidebar/lib.h" #endif diff --git a/keymap.c b/keymap.c index ac219bdd319..80d8dbd0724 100644 --- a/keymap.c +++ b/keymap.c @@ -37,6 +37,7 @@ #include "gui/lib.h" #include "mutt.h" #include "keymap.h" +#include "ncrypt/lib.h" #include "functions.h" #include "init.h" #include "mutt_commands.h" @@ -44,7 +45,6 @@ #include "mutt_logging.h" #include "opcodes.h" #include "options.h" -#include "ncrypt/lib.h" #ifndef USE_SLANG_CURSES #include #endif diff --git a/maildir/lib.h b/maildir/lib.h index f98ed748258..4305e5aa593 100644 --- a/maildir/lib.h +++ b/maildir/lib.h @@ -39,8 +39,8 @@ #include #include #include "core/lib.h" -#include "mx.h" #include "hcache/lib.h" +#include "mx.h" struct ConfigSet; struct Email; diff --git a/maildir/maildir.c b/maildir/maildir.c index d6d15cf5453..06f35b5277e 100644 --- a/maildir/maildir.c +++ b/maildir/maildir.c @@ -45,11 +45,11 @@ #include "mutt/lib.h" #include "email/lib.h" #include "core/lib.h" +#include "maildir/lib.h" #include "monitor.h" #include "mutt_globals.h" #include "muttlib.h" #include "mx.h" -#include "maildir/lib.h" #ifdef USE_HCACHE #include "hcache/lib.h" #endif diff --git a/maildir/shared.c b/maildir/shared.c index 3438afe881b..8fd15e165ea 100644 --- a/maildir/shared.c +++ b/maildir/shared.c @@ -48,6 +48,8 @@ #include "email/lib.h" #include "core/lib.h" #include "mutt.h" +#include "hcache/lib.h" +#include "maildir/lib.h" #include "copy.h" #include "mutt_globals.h" #include "muttlib.h" @@ -55,8 +57,6 @@ #include "progress.h" #include "protos.h" #include "sort.h" -#include "hcache/lib.h" -#include "maildir/lib.h" #ifdef USE_NOTMUCH #include "notmuch/lib.h" #endif diff --git a/main.c b/main.c index 39e670327fe..c083a14ff6e 100644 --- a/main.c +++ b/main.c @@ -54,6 +54,8 @@ #include "conn/lib.h" #include "gui/lib.h" #include "debug/lib.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "browser.h" #include "commands.h" #include "context.h" @@ -73,8 +75,6 @@ #include "options.h" #include "protos.h" #include "version.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/menu.c b/menu.c index 4462585cac5..97f35198764 100644 --- a/menu.c +++ b/menu.c @@ -37,6 +37,7 @@ #include "core/lib.h" #include "gui/lib.h" #include "mutt.h" +#include "pattern/lib.h" #include "commands.h" #include "context.h" #include "keymap.h" @@ -47,7 +48,6 @@ #include "opcodes.h" #include "options.h" #include "protos.h" -#include "pattern/lib.h" #ifdef USE_SIDEBAR #include "sidebar/lib.h" #endif diff --git a/mutt_attach.c b/mutt_attach.c index 539ddee7d17..9a6aa7a0c1b 100644 --- a/mutt_attach.c +++ b/mutt_attach.c @@ -42,6 +42,8 @@ #include "core/lib.h" #include "gui/lib.h" #include "mutt_attach.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "context.h" #include "copy.h" #include "handler.h" @@ -54,8 +56,6 @@ #include "protos.h" #include "rfc3676.h" #include "state.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef USE_IMAP #include "imap/lib.h" #endif diff --git a/mutt_body.c b/mutt_body.c index fb6a506a017..1e271f695e2 100644 --- a/mutt_body.c +++ b/mutt_body.c @@ -33,9 +33,9 @@ #include "mutt/lib.h" #include "email/lib.h" #include "mutt_body.h" +#include "send/lib.h" #include "mutt_attach.h" #include "muttlib.h" -#include "send/lib.h" /** * mutt_body_copy - Create a send-mode duplicate from a receive-mode body diff --git a/mutt_config.c b/mutt_config.c index 66337648d4f..bb8f5ea02b5 100644 --- a/mutt_config.c +++ b/mutt_config.c @@ -37,6 +37,7 @@ #include "core/lib.h" #include "alias/lib.h" #include "gui/lib.h" +#include "bcache/lib.h" #include "browser.h" #include "commands.h" #include "compose.h" @@ -63,7 +64,6 @@ #include "score.h" #include "sort.h" #include "status.h" -#include "bcache/lib.h" #ifndef ISPELL #define ISPELL "ispell" diff --git a/mutt_header.c b/mutt_header.c index 0a47e87b8d9..9f189e65408 100644 --- a/mutt_header.c +++ b/mutt_header.c @@ -40,12 +40,12 @@ #include "gui/lib.h" #include "mutt.h" #include "mutt_header.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "index.h" #include "muttlib.h" #include "options.h" #include "protos.h" -#include "ncrypt/lib.h" -#include "send/lib.h" /** * label_ref_dec - Decrease the refcount of a label diff --git a/mutt_mailbox.c b/mutt_mailbox.c index a7f5526915e..b65821aebe0 100644 --- a/mutt_mailbox.c +++ b/mutt_mailbox.c @@ -35,12 +35,12 @@ #include "core/lib.h" #include "gui/lib.h" #include "mutt_mailbox.h" +#include "mbox/lib.h" #include "mutt_globals.h" #include "mutt_menu.h" #include "muttlib.h" #include "mx.h" #include "protos.h" -#include "mbox/lib.h" static time_t MailboxTime = 0; ///< last time we started checking for mail static time_t MailboxStatsTime = 0; ///< last time we check performed mail_check_stats diff --git a/mutt_parse.c b/mutt_parse.c index a67e5194e57..3cedd631f3b 100644 --- a/mutt_parse.c +++ b/mutt_parse.c @@ -32,8 +32,8 @@ #include "mutt/lib.h" #include "email/lib.h" #include "mutt_parse.h" -#include "mx.h" #include "ncrypt/lib.h" +#include "mx.h" struct ListHead AttachAllow = STAILQ_HEAD_INITIALIZER(AttachAllow); ///< List of attachment types to be counted struct ListHead AttachExclude = STAILQ_HEAD_INITIALIZER(AttachExclude); ///< List of attachment types to be ignored diff --git a/muttlib.c b/muttlib.c index 8a6470c153d..55d74b9460e 100644 --- a/muttlib.c +++ b/muttlib.c @@ -50,13 +50,13 @@ #include "gui/lib.h" #include "mutt.h" #include "muttlib.h" +#include "ncrypt/lib.h" #include "format_flags.h" #include "hook.h" #include "init.h" #include "mutt_globals.h" #include "mx.h" #include "protos.h" -#include "ncrypt/lib.h" #if defined(HAVE_SYSCALL_H) #include #elif defined(HAVE_SYS_SYSCALL_H) diff --git a/mx.c b/mx.c index 0016cb73a88..c2e0d2bbc44 100644 --- a/mx.c +++ b/mx.c @@ -45,6 +45,8 @@ #include "gui/lib.h" #include "mutt.h" #include "mx.h" +#include "maildir/lib.h" +#include "mbox/lib.h" #include "context.h" #include "copy.h" #include "hook.h" @@ -58,8 +60,6 @@ #include "options.h" #include "protos.h" #include "sort.h" -#include "maildir/lib.h" -#include "mbox/lib.h" #ifdef USE_COMP_MBOX #include "compmbox/lib.h" #endif diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index 4a76025044d..6a1b831026e 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -47,6 +47,8 @@ #include "gui/lib.h" #include "mutt.h" #include "crypt.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "copy.h" #include "cryptglue.h" #include "handler.h" @@ -55,8 +57,6 @@ #include "muttlib.h" #include "options.h" #include "state.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef USE_AUTOCRYPT #include "autocrypt/lib.h" #endif diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index ad1bf02bf1b..ac9f12817b3 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -56,6 +56,8 @@ #include "gui/lib.h" #include "mutt.h" #include "crypt_gpgme.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "crypt.h" #include "handler.h" #include "hook.h" @@ -64,8 +66,6 @@ #include "muttlib.h" #include "options.h" #include "state.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef USE_AUTOCRYPT #include "autocrypt/lib.h" #endif diff --git a/ncrypt/crypt_gpgme.h b/ncrypt/crypt_gpgme.h index 5aed253c2ce..c84260fdf91 100644 --- a/ncrypt/crypt_gpgme.h +++ b/ncrypt/crypt_gpgme.h @@ -24,9 +24,9 @@ #ifndef MUTT_NCRYPT_CRYPT_GPGME_H #define MUTT_NCRYPT_CRYPT_GPGME_H +#include #include #include -#include #include "lib.h" struct AddressList; diff --git a/ncrypt/cryptglue.c b/ncrypt/cryptglue.c index aa94402d050..6d5af41255b 100644 --- a/ncrypt/cryptglue.c +++ b/ncrypt/cryptglue.c @@ -41,16 +41,16 @@ #include "private.h" #include "mutt/lib.h" #include "cryptglue.h" -#include "crypt_mod.h" #include "ncrypt/lib.h" +#include "crypt_mod.h" #ifndef CRYPT_BACKEND_GPGME #include "gui/lib.h" #endif #ifdef USE_AUTOCRYPT #include "email/lib.h" +#include "autocrypt/lib.h" #include "crypt_gpgme.h" #include "options.h" -#include "autocrypt/lib.h" #else struct Envelope; #endif diff --git a/ncrypt/dlggpgme.c b/ncrypt/dlggpgme.c index cd216f944ea..04980ac7bab 100644 --- a/ncrypt/dlggpgme.c +++ b/ncrypt/dlggpgme.c @@ -43,6 +43,7 @@ #include "address/lib.h" #include "config/lib.h" #include "gui/lib.h" +#include "ncrypt/lib.h" #include "crypt_gpgme.h" #include "format_flags.h" #include "keymap.h" @@ -53,7 +54,6 @@ #include "options.h" #include "pager.h" #include "protos.h" -#include "ncrypt/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/ncrypt/dlgsmime.c b/ncrypt/dlgsmime.c index b78daf50dcf..716c3cdee1e 100644 --- a/ncrypt/dlgsmime.c +++ b/ncrypt/dlgsmime.c @@ -33,13 +33,13 @@ #include "mutt/lib.h" #include "config/lib.h" #include "gui/lib.h" +#include "ncrypt/lib.h" #include "keymap.h" #include "mutt_logging.h" #include "mutt_menu.h" #include "opcodes.h" #include "protos.h" #include "smime.h" -#include "ncrypt/lib.h" /// Help Bar for the Smime key selection dialog static const struct Mapping SmimeHelp[] = { diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index 315f3aa9277..78c3b94ce0c 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -49,6 +49,7 @@ #include "gui/lib.h" #include "mutt.h" #include "lib.h" +#include "send/lib.h" #include "crypt.h" #include "cryptglue.h" #include "handler.h" @@ -60,7 +61,6 @@ #include "pgpkey.h" #include "pgpmicalg.h" #include "state.h" -#include "send/lib.h" #ifdef CRYPT_BACKEND_CLASSIC_PGP #include "pgp.h" #include "pgplib.h" diff --git a/ncrypt/pgpinvoke.h b/ncrypt/pgpinvoke.h index 5cb1775f83c..5bfec0e3ee3 100644 --- a/ncrypt/pgpinvoke.h +++ b/ncrypt/pgpinvoke.h @@ -26,8 +26,8 @@ #include #include #include -#include "pgpkey.h" #include "ncrypt/lib.h" +#include "pgpkey.h" struct Address; struct ListHead; diff --git a/ncrypt/pgpkey.c b/ncrypt/pgpkey.c index 3417a757e39..ede5e481c29 100644 --- a/ncrypt/pgpkey.c +++ b/ncrypt/pgpkey.c @@ -48,6 +48,7 @@ #include "mutt.h" #include "pgpkey.h" #include "lib.h" +#include "send/lib.h" #include "crypt.h" #include "format_flags.h" #include "gnupgparse.h" @@ -61,7 +62,6 @@ #include "pager.h" #include "pgpinvoke.h" #include "protos.h" -#include "send/lib.h" #ifdef CRYPT_BACKEND_CLASSIC_PGP #include "pgp.h" #include "pgplib.h" diff --git a/ncrypt/smime.c b/ncrypt/smime.c index af2cc44a774..7fdbae2eea4 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -46,6 +46,8 @@ #include "alias/lib.h" #include "gui/lib.h" #include "mutt.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "copy.h" #include "crypt.h" #include "cryptglue.h" @@ -54,8 +56,6 @@ #include "mutt_logging.h" #include "muttlib.h" #include "state.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef CRYPT_BACKEND_CLASSIC_SMIME #include "smime.h" #endif diff --git a/nntp/newsrc.c b/nntp/newsrc.c index 8feb324a20c..ea296cc08b7 100644 --- a/nntp/newsrc.c +++ b/nntp/newsrc.c @@ -46,6 +46,7 @@ #include "conn/lib.h" #include "mutt.h" #include "lib.h" +#include "bcache/lib.h" #include "format_flags.h" #include "mutt_account.h" #include "mutt_globals.h" @@ -54,7 +55,6 @@ #include "muttlib.h" #include "protos.h" #include "sort.h" -#include "bcache/lib.h" #ifdef USE_HCACHE #include "hcache/lib.h" #endif diff --git a/nntp/nntp.c b/nntp/nntp.c index f3525a92f58..5a1e919ebf2 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -47,6 +47,9 @@ #include "conn/lib.h" #include "gui/lib.h" #include "lib.h" +#include "bcache/lib.h" +#include "hcache/lib.h" +#include "ncrypt/lib.h" #include "hook.h" #include "init.h" #include "mutt_globals.h" @@ -57,9 +60,6 @@ #include "mx.h" #include "progress.h" #include "sort.h" -#include "bcache/lib.h" -#include "hcache/lib.h" -#include "ncrypt/lib.h" #ifdef USE_HCACHE #include "protos.h" #endif diff --git a/notmuch/notmuch.c b/notmuch/notmuch.c index d9f8eb73ae9..c58d698d7ed 100644 --- a/notmuch/notmuch.c +++ b/notmuch/notmuch.c @@ -59,14 +59,14 @@ #include "gui/lib.h" #include "mutt.h" #include "lib.h" +#include "hcache/lib.h" +#include "maildir/lib.h" #include "index.h" #include "mutt_globals.h" #include "mutt_thread.h" #include "mx.h" #include "progress.h" #include "protos.h" -#include "hcache/lib.h" -#include "maildir/lib.h" struct stat; diff --git a/pager.c b/pager.c index 1681bfe62f6..6ffa73ce432 100644 --- a/pager.c +++ b/pager.c @@ -45,6 +45,8 @@ #include "gui/lib.h" #include "mutt.h" #include "pager.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "commands.h" #include "context.h" #include "format_flags.h" @@ -67,8 +69,6 @@ #include "recvattach.h" #include "recvcmd.h" #include "status.h" -#include "ncrypt/lib.h" -#include "send/lib.h" #ifdef USE_SIDEBAR #include "sidebar/lib.h" #endif diff --git a/pattern/exec.c b/pattern/exec.c index a8c08a96329..f2696005c7d 100644 --- a/pattern/exec.c +++ b/pattern/exec.c @@ -43,6 +43,8 @@ #include "alias/lib.h" #include "mutt.h" #include "lib.h" +#include "ncrypt/lib.h" +#include "send/lib.h" #include "copy.h" #include "handler.h" #include "maillist.h" @@ -50,8 +52,6 @@ #include "muttlib.h" #include "mx.h" #include "state.h" -#include "ncrypt/lib.h" -#include "send/lib.h" /** * patmatch - Compare a string to a Pattern diff --git a/pop/pop.c b/pop/pop.c index 8d59fa944c6..1f78f119e9a 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -44,6 +44,8 @@ #include "conn/lib.h" #include "gui/lib.h" #include "lib.h" +#include "bcache/lib.h" +#include "ncrypt/lib.h" #include "context.h" #include "hook.h" #include "mutt_account.h" @@ -54,8 +56,6 @@ #include "muttlib.h" #include "mx.h" #include "progress.h" -#include "bcache/lib.h" -#include "ncrypt/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/postpone.c b/postpone.c index 78b5a8d5123..5bf95e6bc9a 100644 --- a/postpone.c +++ b/postpone.c @@ -40,6 +40,9 @@ #include "core/lib.h" #include "gui/lib.h" #include "mutt.h" +#include "ncrypt/lib.h" +#include "pattern/lib.h" +#include "send/lib.h" #include "context.h" #include "format_flags.h" #include "handler.h" @@ -57,9 +60,6 @@ #include "rfc3676.h" #include "sort.h" #include "state.h" -#include "ncrypt/lib.h" -#include "pattern/lib.h" -#include "send/lib.h" #ifdef USE_IMAP #include "imap/lib.h" #endif diff --git a/protos.h b/protos.h index 17d10169881..c406c47b52f 100644 --- a/protos.h +++ b/protos.h @@ -30,8 +30,8 @@ #include #include "mutt/lib.h" #include "mutt.h" -#include "keymap.h" #include "ncrypt/lib.h" +#include "keymap.h" struct Context; struct Email; diff --git a/recvattach.c b/recvattach.c index 9fde87d4abb..5f5e50223e8 100644 --- a/recvattach.c +++ b/recvattach.c @@ -41,6 +41,9 @@ #include "gui/lib.h" #include "mutt.h" #include "recvattach.h" +#include "ncrypt/lib.h" +#include "nntp/lib.h" +#include "send/lib.h" #include "commands.h" #include "context.h" #include "format_flags.h" @@ -60,9 +63,6 @@ #include "recvcmd.h" #include "rfc3676.h" #include "state.h" -#include "ncrypt/lib.h" -#include "nntp/lib.h" -#include "send/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/recvattach.h b/recvattach.h index 20a3fcf2025..e53929b502e 100644 --- a/recvattach.h +++ b/recvattach.h @@ -24,9 +24,9 @@ #ifndef MUTT_RECVATTACH_H #define MUTT_RECVATTACH_H -#include #include #include +#include #include #include "format_flags.h" diff --git a/recvcmd.c b/recvcmd.c index 9d9caa3dfcc..22930e45792 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -40,6 +40,7 @@ #include "gui/lib.h" #include "mutt.h" #include "recvcmd.h" +#include "send/lib.h" #include "context.h" #include "copy.h" #include "handler.h" @@ -52,7 +53,6 @@ #include "options.h" #include "protos.h" #include "state.h" -#include "send/lib.h" #ifdef ENABLE_NLS #include #endif diff --git a/remailer.c b/remailer.c index 22d3cdf46f8..f2d51ac60ab 100644 --- a/remailer.c +++ b/remailer.c @@ -40,6 +40,7 @@ #include "core/lib.h" #include "gui/lib.h" #include "mutt.h" +#include "send/lib.h" #include "format_flags.h" #include "keymap.h" #include "mutt_globals.h" @@ -49,7 +50,6 @@ #include "options.h" #include "protos.h" #include "recvattach.h" -#include "send/lib.h" #ifdef MIXMASTER #include "remailer.h" #endif diff --git a/score.c b/score.c index efc04ef62e7..3ba20456d47 100644 --- a/score.c +++ b/score.c @@ -35,6 +35,7 @@ #include "core/lib.h" #include "mutt.h" #include "score.h" +#include "pattern/lib.h" #include "init.h" #include "keymap.h" #include "mutt_commands.h" @@ -43,7 +44,6 @@ #include "options.h" #include "protos.h" #include "sort.h" -#include "pattern/lib.h" /* These Config Variables are only used in score.c */ short C_ScoreThresholdDelete; ///< Config: Messages with a lower score will be automatically deleted diff --git a/score.h b/score.h index ecdbc214124..06e1ca7fd6b 100644 --- a/score.h +++ b/score.h @@ -24,8 +24,8 @@ #define MUTT_SCORE_H #include -#include "mutt_commands.h" #include +#include "mutt_commands.h" struct Buffer; struct Email; diff --git a/send/body.c b/send/body.c index 3f1543ba756..5f91292777f 100644 --- a/send/body.c +++ b/send/body.c @@ -33,9 +33,9 @@ #include "email/lib.h" #include "body.h" #include "lib.h" +#include "ncrypt/lib.h" #include "mutt_globals.h" #include "muttlib.h" -#include "ncrypt/lib.h" /** * struct B64Context - Cursor for the Base64 conversion diff --git a/send/header.h b/send/header.h index a1a156b2c13..30907ceff66 100644 --- a/send/header.h +++ b/send/header.h @@ -23,9 +23,9 @@ #ifndef MUTT_SEND_HEADER_H #define MUTT_SEND_HEADER_H -#include "copy.h" #include #include +#include "copy.h" struct Body; struct ConfigSubset; diff --git a/send/send.c b/send/send.c index 405aee3df20..7481e47fe2f 100644 --- a/send/send.c +++ b/send/send.c @@ -46,6 +46,8 @@ #include "mutt.h" #include "send.h" #include "lib.h" +#include "ncrypt/lib.h" +#include "pattern/lib.h" #include "compose.h" #include "context.h" #include "copy.h" @@ -65,11 +67,9 @@ #include "recvattach.h" #include "rfc3676.h" #include "sort.h" -#include "ncrypt/lib.h" -#include "pattern/lib.h" #ifdef USE_NNTP -#include "mx.h" #include "nntp/lib.h" +#include "mx.h" #endif #ifdef MIXMASTER #include "remailer.h" diff --git a/send/sendlib.c b/send/sendlib.c index 0d370e19aee..5dc265d7366 100644 --- a/send/sendlib.c +++ b/send/sendlib.c @@ -46,6 +46,7 @@ #include "mutt.h" #include "sendlib.h" #include "lib.h" +#include "ncrypt/lib.h" #include "context.h" #include "copy.h" #include "handler.h" @@ -56,7 +57,6 @@ #include "mx.h" #include "options.h" #include "state.h" -#include "ncrypt/lib.h" /** * struct ContentState - Info about the body of an email diff --git a/send/smtp.c b/send/smtp.c index 0a08f95ea76..f4ef4242367 100644 --- a/send/smtp.c +++ b/send/smtp.c @@ -46,11 +46,11 @@ #include "conn/lib.h" #include "gui/lib.h" #include "smtp.h" +#include "send/lib.h" #include "mutt_account.h" #include "mutt_globals.h" #include "mutt_socket.h" #include "progress.h" -#include "send/lib.h" #ifdef USE_SASL #include #include diff --git a/test/address/mutt_addrlist_parse.c b/test/address/mutt_addrlist_parse.c index 8704d178a8d..f1c3d64e7d0 100644 --- a/test/address/mutt_addrlist_parse.c +++ b/test/address/mutt_addrlist_parse.c @@ -110,13 +110,13 @@ void test_mutt_addrlist_parse(void) int parsed = mutt_addrlist_parse(&alist, "\\"); TEST_CHECK(parsed == 0); } - + { struct AddressList alist = TAILQ_HEAD_INITIALIZER(alist); int parsed = mutt_addrlist_parse(&alist, "empty-group:; (some comment)"); TEST_CHECK(parsed == 0); const struct Address *a = TAILQ_FIRST(&alist); - TEST_CHECK(a->personal== NULL); + TEST_CHECK(a->personal == NULL); TEST_CHECK_STR_EQ("empty-group", a->mailbox); TEST_CHECK(a->group == true); a = TAILQ_NEXT(a, entries); diff --git a/test/compress/lz4.c b/test/compress/lz4.c index 4c16b2baebf..82c0c960b00 100644 --- a/test/compress/lz4.c +++ b/test/compress/lz4.c @@ -24,8 +24,8 @@ #include "config.h" #include "acutest.h" #include "mutt/lib.h" -#include "common.h" #include "compress/lib.h" +#include "common.h" #define MIN_COMP_LEVEL 1 ///< Minimum compression level for lz4 #define MAX_COMP_LEVEL 12 ///< Maximum compression level for lz4 diff --git a/test/compress/zlib.c b/test/compress/zlib.c index f74a7f7fd01..0546a791c5f 100644 --- a/test/compress/zlib.c +++ b/test/compress/zlib.c @@ -24,8 +24,8 @@ #include "config.h" #include "acutest.h" #include "mutt/lib.h" -#include "common.h" #include "compress/lib.h" +#include "common.h" #define MIN_COMP_LEVEL 1 ///< Minimum compression level for zlib #define MAX_COMP_LEVEL 9 ///< Maximum compression level for zlib diff --git a/test/compress/zstd.c b/test/compress/zstd.c index 5686e41b36e..5f1d24ee48e 100644 --- a/test/compress/zstd.c +++ b/test/compress/zstd.c @@ -24,8 +24,8 @@ #include "config.h" #include "acutest.h" #include "mutt/lib.h" -#include "common.h" #include "compress/lib.h" +#include "common.h" #define MIN_COMP_LEVEL 1 ///< Minimum compression level for zstd #define MAX_COMP_LEVEL 22 ///< Maximum compression level for zstd diff --git a/test/pattern/comp.c b/test/pattern/comp.c index 9ff7ce23610..30a447840f3 100644 --- a/test/pattern/comp.c +++ b/test/pattern/comp.c @@ -29,8 +29,8 @@ #include "mutt/buffer.h" #include "mutt/memory.h" #include "alias/lib.h" -#include "mutt_globals.h" #include "pattern/lib.h" +#include "mutt_globals.h" bool ResumeEditedDraftFiles; diff --git a/test/store/bdb.c b/test/store/bdb.c index 4ee5cffad67..89fd9284a32 100644 --- a/test/store/bdb.c +++ b/test/store/bdb.c @@ -26,8 +26,8 @@ #include #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" #define DB_NAME "bdb" diff --git a/test/store/common.c b/test/store/common.c index b2ec76eb6ea..c221987a6d0 100644 --- a/test/store/common.c +++ b/test/store/common.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "test_common.h" #include "store/lib.h" +#include "test_common.h" bool test_store_setup(char *buf, size_t buflen) { diff --git a/test/store/gdbm.c b/test/store/gdbm.c index 3c22f83dce0..161ff2e6f43 100644 --- a/test/store/gdbm.c +++ b/test/store/gdbm.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" #define DB_NAME "gdbm" diff --git a/test/store/kc.c b/test/store/kc.c index 44d0c6bddb4..ee7f0146346 100644 --- a/test/store/kc.c +++ b/test/store/kc.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" #define DB_NAME "kyotocabinet" diff --git a/test/store/lmdb.c b/test/store/lmdb.c index b829f978968..7aea571fdc2 100644 --- a/test/store/lmdb.c +++ b/test/store/lmdb.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" #define DB_NAME "lmdb" diff --git a/test/store/qdbm.c b/test/store/qdbm.c index 0dec83b2e64..fe81dd17f0e 100644 --- a/test/store/qdbm.c +++ b/test/store/qdbm.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" #define DB_NAME "qdbm" diff --git a/test/store/rocksdb.c b/test/store/rocksdb.c index a8cebda4b7a..ce29727e9d0 100644 --- a/test/store/rocksdb.c +++ b/test/store/rocksdb.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" #define DB_NAME "rocksdb" diff --git a/test/store/store.c b/test/store/store.c index 3be54ea691d..54fc2d26237 100644 --- a/test/store/store.c +++ b/test/store/store.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" void test_store_store(void) { diff --git a/test/store/tc.c b/test/store/tc.c index b43de354028..14f48611b1d 100644 --- a/test/store/tc.c +++ b/test/store/tc.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" #define DB_NAME "tokyocabinet" diff --git a/test/store/tdb.c b/test/store/tdb.c index f37343443b3..37c7707124d 100644 --- a/test/store/tdb.c +++ b/test/store/tdb.c @@ -25,8 +25,8 @@ #include "acutest.h" #include #include "mutt/lib.h" -#include "common.h" #include "store/lib.h" +#include "common.h" #define DB_NAME "tdb"