diff --git a/alias/dlgalias.c b/alias/dlgalias.c index 6b16e8a6f4e..3b7838358dc 100644 --- a/alias/dlgalias.c +++ b/alias/dlgalias.c @@ -45,7 +45,6 @@ #include "format_flags.h" #include "gui.h" #include "keymap.h" -#include "mutt_globals.h" #include "mutt_menu.h" #include "muttlib.h" #include "opcodes.h" diff --git a/alternates.c b/alternates.c index aa942b1802c..dbf44ae3b92 100644 --- a/alternates.c +++ b/alternates.c @@ -30,21 +30,16 @@ #include #include #include -#include #include "mutt/lib.h" -#include "config/lib.h" +#include "address/lib.h" #include "email/lib.h" #include "core/lib.h" -#include "gui/lib.h" #include "mutt.h" #include "alternates.h" -#include "ncrypt/lib.h" #include "attachments.h" #include "command_parse.h" #include "init.h" #include "mutt_commands.h" -#include "mutt_globals.h" -#include "mx.h" struct RegexList Alternates = STAILQ_HEAD_INITIALIZER(Alternates); ///< List of regexes to match the user's alternate email addresses struct RegexList UnAlternates = STAILQ_HEAD_INITIALIZER(UnAlternates); ///< List of regexes to blacklist false matches in Alternates diff --git a/alternates.h b/alternates.h index a53a24ccd5a..7ac0361f702 100644 --- a/alternates.h +++ b/alternates.h @@ -27,6 +27,9 @@ #include #include "mutt_commands.h" +struct Buffer; +struct Mailbox; + /** * enum NotifyAlternates - Alternates command notification types */ diff --git a/attachments.c b/attachments.c index b959319d477..8799b1fee48 100644 --- a/attachments.c +++ b/attachments.c @@ -41,7 +41,6 @@ #include "ncrypt/lib.h" #include "init.h" #include "mutt_commands.h" -#include "mutt_globals.h" #include "mx.h" /** diff --git a/commands.c b/commands.c index a5776eee052..144fe17b683 100644 --- a/commands.c +++ b/commands.c @@ -62,7 +62,6 @@ #include "mutt_globals.h" #include "mutt_logging.h" #include "mutt_mailbox.h" -#include "mutt_menu.h" #include "muttlib.h" #include "mx.h" #include "options.h" diff --git a/commands.h b/commands.h index 901e1ea0ce8..d91fb5ad460 100644 --- a/commands.h +++ b/commands.h @@ -25,7 +25,6 @@ #include #include -#include "mutt_menu.h" struct Body; struct Email; diff --git a/gui/curs_lib.h b/gui/curs_lib.h index ae3fdf6c66b..7ef0dc5724f 100644 --- a/gui/curs_lib.h +++ b/gui/curs_lib.h @@ -29,10 +29,10 @@ #include "mutt.h" #include "browser.h" #include "keymap.h" -#include "pager/lib.h" struct Buffer; struct Mailbox; +struct PagerView; extern int MuttGetchTimeout; ///< Timeout in ms for mutt_getch() diff --git a/gui/dialog.c b/gui/dialog.c index 575a2fc7409..ee63a2058d4 100644 --- a/gui/dialog.c +++ b/gui/dialog.c @@ -34,6 +34,7 @@ #include "core/lib.h" #include "debug/lib.h" #include "lib.h" +#include "keymap.h" #include "mutt_menu.h" /** diff --git a/init.c b/init.c index a6b55662644..4d552ea0fe6 100644 --- a/init.c +++ b/init.c @@ -29,7 +29,6 @@ #include "config.h" #include -#include #include #include #include @@ -59,7 +58,6 @@ #ifdef USE_LUA #include "mutt_lua.h" #endif -#include "attachments.h" #include "mutt_menu.h" #include "muttlib.h" #include "myvar.h" diff --git a/main.c b/main.c index 7037c645c03..61ed961e456 100644 --- a/main.c +++ b/main.c @@ -71,7 +71,6 @@ #include "mutt_history.h" #include "mutt_logging.h" #include "mutt_mailbox.h" -#include "mutt_menu.h" #include "muttlib.h" #include "mx.h" #include "myvar.h" diff --git a/mutt_attach.c b/mutt_attach.c index aa553183cea..3193b1a61e1 100644 --- a/mutt_attach.c +++ b/mutt_attach.c @@ -45,7 +45,6 @@ #include "ncrypt/lib.h" #include "pager/lib.h" #include "send/lib.h" -#include "context.h" #include "copy.h" #include "handler.h" #include "mailcap.h" diff --git a/mx.c b/mx.c index c1f9932f765..80f03147d0b 100644 --- a/mx.c +++ b/mx.c @@ -60,7 +60,6 @@ #include "opcodes.h" #include "options.h" #include "protos.h" -#include "sort.h" #ifdef USE_COMP_MBOX #include "compmbox/lib.h" #endif diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index 25e076cee42..6914eeeac01 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -49,11 +49,9 @@ #include "lib.h" #include "send/lib.h" #include "attachments.h" -#include "context.h" #include "copy.h" #include "cryptglue.h" #include "handler.h" -#include "mutt_globals.h" #include "muttlib.h" #include "options.h" #ifdef USE_AUTOCRYPT diff --git a/ncrypt/cryptglue.c b/ncrypt/cryptglue.c index 201592656c2..0b9d71048a7 100644 --- a/ncrypt/cryptglue.c +++ b/ncrypt/cryptglue.c @@ -62,7 +62,6 @@ struct Envelope; struct Address; struct AddressList; -struct State; #ifdef CRYPT_BACKEND_CLASSIC_PGP extern struct CryptModuleSpecs CryptModPgpClassic; diff --git a/ncrypt/pgp.h b/ncrypt/pgp.h index 86fba429a4c..e49e6c88b54 100644 --- a/ncrypt/pgp.h +++ b/ncrypt/pgp.h @@ -33,6 +33,7 @@ struct AddressList; struct Body; struct Email; +struct Mailbox; struct PgpKeyInfo; struct State; diff --git a/notmuch/config.c b/notmuch/config.c index e0c89cf7d60..3a74c8c3534 100644 --- a/notmuch/config.c +++ b/notmuch/config.c @@ -36,7 +36,7 @@ /** * is_valid_notmuch_url - Checks that a URL is in required form. - * @retval true url in form notmuch:// + * @retval true url in form notmuch://[absolute path] * @retval false url is not in required form. */ static bool is_valid_notmuch_url(const char *url) @@ -45,14 +45,16 @@ static bool is_valid_notmuch_url(const char *url) } /** - * nm_default_url_validator - Ensure nm_default_url is of the form notmuch:// - Implements ConfigDef::validator() + * nm_default_url_validator - Ensure nm_default_url is of the form notmuch://[absolute path] - Implements ConfigDef::validator() */ -static int nm_default_url_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) +static int nm_default_url_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, + intptr_t value, struct Buffer *err) { const char *url = (const char *) value; if (!is_valid_notmuch_url(url)) { - mutt_buffer_printf(err, _("nm_default_url must be: notmuch:// . Current: %s"), url); + mutt_buffer_printf( + err, _("nm_default_url must be: notmuch:// . Current: %s"), url); return CSR_ERR_INVALID; } diff --git a/protos.h b/protos.h index 7eb960fee60..c33586c549a 100644 --- a/protos.h +++ b/protos.h @@ -33,7 +33,6 @@ #include "ncrypt/lib.h" #include "keymap.h" -struct Context; struct Email; struct EmailList; struct EnterState; diff --git a/recvattach.c b/recvattach.c index ec4925aefb3..a4612b5e4fa 100644 --- a/recvattach.c +++ b/recvattach.c @@ -52,7 +52,6 @@ #include "keymap.h" #include "mailcap.h" #include "mutt_attach.h" -#include "mutt_globals.h" #include "mutt_menu.h" #include "mutt_thread.h" #include "muttlib.h" diff --git a/recvattach.h b/recvattach.h index 440b19d73a1..961a93dad23 100644 --- a/recvattach.h +++ b/recvattach.h @@ -33,6 +33,7 @@ struct AttachCtx; struct Body; struct Email; +struct Mailbox; void mutt_attach_init(struct AttachCtx *actx); void mutt_update_tree(struct AttachCtx *actx); diff --git a/send/send.h b/send/send.h index 67d41a10bc2..675d7b2c5ba 100644 --- a/send/send.h +++ b/send/send.h @@ -30,7 +30,6 @@ struct AddressList; struct Body; struct ConfigSubset; -struct Context; struct Email; struct EmailList; struct Envelope; diff --git a/send/sendlib.c b/send/sendlib.c index 888d19dc088..626ecd43322 100644 --- a/send/sendlib.c +++ b/send/sendlib.c @@ -49,7 +49,6 @@ #include "lib.h" #include "ncrypt/lib.h" #include "attachments.h" -#include "context.h" #include "copy.h" #include "handler.h" #include "mutt_globals.h" diff --git a/sort.c b/sort.c index 9375812cab4..570aa883fde 100644 --- a/sort.c +++ b/sort.c @@ -38,7 +38,6 @@ #include "core/lib.h" #include "alias/lib.h" #include "sort.h" -#include "mutt_globals.h" #include "mutt_logging.h" #include "mutt_thread.h" #include "mx.h" diff --git a/sort.h b/sort.h index 21baab2b9f2..ecc2e0a4f92 100644 --- a/sort.h +++ b/sort.h @@ -31,7 +31,6 @@ #include "options.h" // IWYU pragma: keep struct Address; -struct Mailbox; struct ThreadsContext; /** diff --git a/subjectrx.c b/subjectrx.c index 7391f81d526..67a0f3b3179 100644 --- a/subjectrx.c +++ b/subjectrx.c @@ -27,10 +27,12 @@ */ #include "config.h" +#include #include #include "mutt/lib.h" #include "email/lib.h" #include "core/lib.h" +#include "mutt.h" #include "subjectrx.h" #include "init.h" #include "mutt_commands.h" diff --git a/subjectrx.h b/subjectrx.h index b3eea63f77b..520d89261a0 100644 --- a/subjectrx.h +++ b/subjectrx.h @@ -28,6 +28,7 @@ #include "mutt_commands.h" struct Buffer; +struct Envelope; struct Mailbox; /**