Skip to content

Commit

Permalink
tidy #includes
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Dec 2, 2019
1 parent ec01ad3 commit a6ecad0
Show file tree
Hide file tree
Showing 66 changed files with 129 additions and 43 deletions.
1 change: 1 addition & 0 deletions addrbook.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "address/lib.h"
#include "config/lib.h"
#include "mutt.h"
#include "addrbook.h"
#include "alias.h"
#include "curs_lib.h"
#include "format_flags.h"
Expand Down
6 changes: 4 additions & 2 deletions address/idna.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@
*/

#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "mutt/mutt.h"
#include "idna2.h"
#ifdef HAVE_LIBIDN
#include <stdbool.h>
#include <string.h>
#endif
#ifdef HAVE_STRINGPREP_H
#include <stringprep.h>
#elif defined(HAVE_IDN_STRINGPREP_H)
Expand Down
3 changes: 3 additions & 0 deletions autocrypt/autocrypt_gpgme.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <stddef.h>
#include <gpgme.h>
#include <stdbool.h>
#include "autocrypt_private.h" // IWYU pragma: keep
#include "mutt/mutt.h"
#include "address/lib.h"
#include "config/lib.h"
Expand Down Expand Up @@ -110,6 +111,7 @@ static int export_keydata(gpgme_ctx_t ctx, gpgme_key_t key, struct Buffer *keyda
return rc;
}

#if 0
/**
* mutt_autocrypt_gpgme_export_key - Export a GPGME key
* @param keyid GPGME Key id
Expand Down Expand Up @@ -138,6 +140,7 @@ int mutt_autocrypt_gpgme_export_key(const char *keyid, struct Buffer *keydata)
gpgme_release(ctx);
return rc;
}
#endif

/**
* mutt_autocrypt_gpgme_create_key - Create a GPGME key
Expand Down
1 change: 1 addition & 0 deletions commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "email/lib.h"
#include "core/lib.h"
#include "mutt.h"
#include "commands.h"
#include "alias.h"
#include "context.h"
#include "copy.h"
Expand Down
1 change: 1 addition & 0 deletions complete.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "globals.h"
#include "muttlib.h"
#include "options.h"
#include "protos.h" // IWYU pragma: keep
#ifdef USE_IMAP
#include "imap/imap.h"
#endif
Expand Down
1 change: 1 addition & 0 deletions config/bool.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "mutt/mutt.h"
#include "bool.h"
#include "set.h"
#include "types.h"

Expand Down
1 change: 1 addition & 0 deletions config/long.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <limits.h>
#include <stdint.h>
#include "mutt/mutt.h"
#include "long.h"
#include "set.h"
#include "types.h"

Expand Down
1 change: 1 addition & 0 deletions config/number.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <limits.h>
#include <stdint.h>
#include "mutt/mutt.h"
#include "number.h"
#include "set.h"
#include "types.h"

Expand Down
1 change: 1 addition & 0 deletions config/quad.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <limits.h>
#include <stdint.h>
#include "mutt/mutt.h"
#include "quad.h"
#include "set.h"
#include "types.h"

Expand Down
1 change: 1 addition & 0 deletions config/regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "mutt/mutt.h"
#include "regex2.h" // IWYU pragma: keep
#include "set.h"
#include "types.h"

Expand Down
1 change: 1 addition & 0 deletions config/slist.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <limits.h>
#include <stdint.h>
#include "mutt/mutt.h"
#include "slist.h"
#include "set.h"
#include "types.h"

Expand Down
1 change: 1 addition & 0 deletions config/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <stdint.h>
#include "mutt/mutt.h"
#include "set.h"
#include "string3.h" // IWYU pragma: keep
#include "types.h"

/**
Expand Down
4 changes: 3 additions & 1 deletion conn/conn_globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
*/

#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#ifdef USE_SSL
#include <stdbool.h>
#endif

short C_ConnectTimeout = 0; ///< Config: Timeout for making network connections (-1 to wait indefinitely)

Expand Down
11 changes: 8 additions & 3 deletions conn/conn_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <netdb.h>
#include <netinet/in.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <sys/select.h>
Expand All @@ -44,13 +43,19 @@
#include <time.h>
#include <unistd.h>
#include "mutt/mutt.h"
#include "address/lib.h"
#include "conn/connaccount.h"
#include "conn_globals.h"
#include "connaccount.h"
#include "connection.h"
#include "curs_lib.h"
#include "globals.h"
#include "options.h"
#include "socket.h" // IWYU pragma: keep
#ifdef HAVE_LIBIDN
#include "address/lib.h"
#endif
#ifdef HAVE_GETADDRINFO
#include <stdbool.h>
#endif

/* These Config Variables are only used in conn/conn_raw.c */
#ifdef HAVE_GETADDRINFO
Expand Down
1 change: 1 addition & 0 deletions conn/getdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <time.h>
#include <unistd.h>
#include "mutt/mutt.h"
#include "conn/conn.h" // IWYU pragma: keep

/**
* getdnsdomainname - Lookup the host's name using DNS
Expand Down
1 change: 1 addition & 0 deletions conn/sasl_plain.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "config.h"
#include <stdio.h>
#include "mutt/mutt.h"
#include "sasl_plain.h"

/**
* mutt_sasl_plain_msg - Construct a base64 encoded SASL PLAIN message
Expand Down
1 change: 1 addition & 0 deletions conn/ssl_gnutls.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include "options.h"
#include "protos.h"
#include "socket.h"
#include "ssl.h" // IWYU pragma: keep

/* certificate error bitmap values */
#define CERTERR_VALID 0
Expand Down
2 changes: 1 addition & 1 deletion copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
#include "handler.h"
#include "hdrline.h"
#include "mutt_window.h"
#include "muttlib.h"
#include "mx.h"
#include "ncrypt/ncrypt.h"
#include "sendlib.h"
#include "state.h"
#ifdef USE_NOTMUCH
#include "muttlib.h"
#include "notmuch/mutt_notmuch.h"
#endif
#ifdef ENABLE_NLS
Expand Down
1 change: 1 addition & 0 deletions edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "email/lib.h"
#include "core/lib.h"
#include "mutt.h"
#include "edit.h"
#include "alias.h"
#include "context.h"
#include "curs_lib.h"
Expand Down
1 change: 1 addition & 0 deletions email/from.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <string.h>
#include <time.h>
#include "mutt/mutt.h"
#include "from.h"

/**
* is_from - Is a string a 'From' header line?
Expand Down
4 changes: 3 additions & 1 deletion email/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@
#include "email_globals.h"
#include "envelope.h"
#include "from.h"
#include "globals.h"
#include "mime.h"
#include "parameter.h"
#include "rfc2047.h"
#include "rfc2231.h"
#include "url.h"
#ifdef USE_AUTOCRYPT
#include "globals.h"
#endif
#ifdef USE_AUTOCRYPT
#include "autocrypt/autocrypt.h"
#endif

Expand Down
1 change: 1 addition & 0 deletions enriched.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <wctype.h>
#include "mutt/mutt.h"
#include "email/lib.h"
#include "enriched.h"
#include "state.h"

#define INDENT_SIZE 4
Expand Down
2 changes: 1 addition & 1 deletion hcache/serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@

#include "config.h"
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "mutt/mutt.h"
#include "address/lib.h"
#include "email/lib.h"
#include "serialize.h"
#include "hcache.h"

/**
Expand Down
1 change: 1 addition & 0 deletions help.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "muttlib.h"
#include "opcodes.h"
#include "pager.h"
#include "protos.h" // IWYU pragma: keep

static const char *HelpStrings[] = {
#define DEFINE_HELP_MESSAGE(opcode, help_string) help_string,
Expand Down
1 change: 1 addition & 0 deletions imap/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "config.h"
#include <string.h>
#include "imap_private.h" // IWYU pragma: keep
#include "mutt/mutt.h"
#include "auth.h"

Expand Down
4 changes: 3 additions & 1 deletion imap/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "bcache.h"
#include "curs_lib.h"
#include "globals.h"
#include "hcache/hcache.h"
#include "imap/imap.h"
#include "mutt_account.h"
#include "mutt_curses.h"
Expand All @@ -59,6 +58,9 @@
#ifdef ENABLE_NLS
#include <libintl.h>
#endif
#ifdef USE_HCACHE
#include "hcache/hcache.h"
#endif

struct BodyCache;

Expand Down
1 change: 1 addition & 0 deletions imap/utf7.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "config.h"
#include <stdbool.h>
#include <string.h>
#include "imap_private.h" // IWYU pragma: keep
#include "mutt/mutt.h"

// clang-format off
Expand Down
6 changes: 4 additions & 2 deletions imap/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@
#include "bcache.h"
#include "curs_lib.h"
#include "globals.h"
#include "hcache/hcache.h"
#include "imap/imap.h"
#include "message.h"
#include "mutt_account.h"
#include "options.h"
#ifdef USE_HCACHE
#include "hcache/hcache.h"
#include "message.h"
#endif

/* These Config Variables are only used in imap/util.c */
char *C_ImapDelimChars; ///< Config: (imap) Characters that denote separators in IMAP folders
Expand Down
4 changes: 3 additions & 1 deletion init.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include "alias.h"
#include "context.h"
#include "filter.h"
#include "hcache/hcache.h"
#include "keymap.h"
#include "monitor.h"
#include "mutt_menu.h"
Expand All @@ -62,6 +61,9 @@
#include "protos.h"
#include "sidebar.h"
#include "version.h"
#ifdef USE_HCACHE
#include "hcache/hcache.h"
#endif
#ifdef USE_NOTMUCH
#include "notmuch/mutt_notmuch.h"
#endif
Expand Down
10 changes: 8 additions & 2 deletions init.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include "edit.h"
#include "globals.h"
#include "handler.h"
#include "hcache/hcache.h"
#include "hdrline.h"
#include "hook.h"
#include "imap/imap.h"
Expand All @@ -67,7 +66,6 @@
#include "mx.h"
#include "ncrypt/ncrypt.h"
#include "nntp/nntp.h"
#include "notmuch/mutt_notmuch.h"
#include "pager.h"
#include "pattern.h"
#include "pop/pop.h"
Expand All @@ -84,6 +82,12 @@
#include "smtp.h"
#include "sort.h"
#include "status.h"
#ifdef USE_NOTMUCH
#include "notmuch/mutt_notmuch.h"
#endif
#ifdef USE_HCACHE
#include "hcache/hcache.h"
#endif
#ifdef MIXMASTER
#include "remailer.h"
#endif
Expand Down Expand Up @@ -120,7 +124,9 @@ enum MuttSetCommand
bool C_IgnoreLinearWhiteSpace = false;

int charset_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
#ifdef USE_HCACHE
int hcache_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
#endif
int multipart_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
int pager_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
int reply_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
Expand Down
4 changes: 3 additions & 1 deletion maildir/maildir.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@
#include "email/lib.h"
#include "core/lib.h"
#include "globals.h"
#include "hcache/hcache.h"
#include "maildir/lib.h"
#include "monitor.h"
#include "muttlib.h"
#include "mx.h"
#ifdef USE_HCACHE
#include "hcache/hcache.h"
#endif

// Flags for maildir_mbox_check()
#define MMC_NO_DIRS 0 ///< No directories changed
Expand Down
3 changes: 2 additions & 1 deletion maildir/maildir_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
#include <stdio.h>
#include <sys/types.h>
#include <time.h>
#include "core/lib.h"

struct Account;
struct Buffer;
struct Email;
struct Mailbox;
struct Message;
struct Progress;

Expand Down
Loading

0 comments on commit a6ecad0

Please sign in to comment.