Skip to content

Commit

Permalink
iwyu: tidy #includes
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Apr 12, 2021
1 parent a89521f commit bd81c60
Show file tree
Hide file tree
Showing 25 changed files with 17 additions and 29 deletions.
1 change: 0 additions & 1 deletion alias/dlgalias.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 1 addition & 6 deletions alternates.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,16 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#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
Expand Down
3 changes: 3 additions & 0 deletions alternates.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#include <stdint.h>
#include "mutt_commands.h"

struct Buffer;
struct Mailbox;

/**
* enum NotifyAlternates - Alternates command notification types
*/
Expand Down
1 change: 0 additions & 1 deletion attachments.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "ncrypt/lib.h"
#include "init.h"
#include "mutt_commands.h"
#include "mutt_globals.h"
#include "mx.h"

/**
Expand Down
1 change: 0 additions & 1 deletion commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <stdbool.h>
#include <stdio.h>
#include "mutt_menu.h"

struct Body;
struct Email;
Expand Down
2 changes: 1 addition & 1 deletion gui/curs_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
1 change: 1 addition & 0 deletions gui/dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "core/lib.h"
#include "debug/lib.h"
#include "lib.h"
#include "keymap.h"
#include "mutt_menu.h"

/**
Expand Down
2 changes: 0 additions & 2 deletions init.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include "config.h"
#include <ctype.h>
#include <inttypes.h>
#include <pwd.h>
#include <stdbool.h>
#include <stdio.h>
Expand Down Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion mutt_attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion mx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions ncrypt/crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion ncrypt/cryptglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ struct Envelope;

struct Address;
struct AddressList;
struct State;

#ifdef CRYPT_BACKEND_CLASSIC_PGP
extern struct CryptModuleSpecs CryptModPgpClassic;
Expand Down
1 change: 1 addition & 0 deletions ncrypt/pgp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
struct AddressList;
struct Body;
struct Email;
struct Mailbox;
struct PgpKeyInfo;
struct State;

Expand Down
10 changes: 6 additions & 4 deletions notmuch/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

/**
* is_valid_notmuch_url - Checks that a URL is in required form.
* @retval true url in form notmuch://<absolute path>
* @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)
Expand All @@ -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://<absolute path> - 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://<absolute path> . Current: %s"), url);
mutt_buffer_printf(
err, _("nm_default_url must be: notmuch://<absolute path> . Current: %s"), url);
return CSR_ERR_INVALID;
}

Expand Down
1 change: 0 additions & 1 deletion protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "ncrypt/lib.h"
#include "keymap.h"

struct Context;
struct Email;
struct EmailList;
struct EnterState;
Expand Down
1 change: 0 additions & 1 deletion recvattach.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions recvattach.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion send/send.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
struct AddressList;
struct Body;
struct ConfigSubset;
struct Context;
struct Email;
struct EmailList;
struct Envelope;
Expand Down
1 change: 0 additions & 1 deletion send/sendlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "options.h" // IWYU pragma: keep

struct Address;
struct Mailbox;
struct ThreadsContext;

/**
Expand Down
2 changes: 2 additions & 0 deletions subjectrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
*/

#include "config.h"
#include <stddef.h>
#include <stdint.h>
#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"
Expand Down
1 change: 1 addition & 0 deletions subjectrx.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "mutt_commands.h"

struct Buffer;
struct Envelope;
struct Mailbox;

/**
Expand Down

0 comments on commit bd81c60

Please sign in to comment.