Skip to content

Commit

Permalink
iwyu: optimise headers
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Jun 4, 2020
1 parent 25a6632 commit 8e53202
Show file tree
Hide file tree
Showing 29 changed files with 19 additions and 20 deletions.
1 change: 1 addition & 0 deletions autocrypt/acct_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "autocrypt_private.h"
#include "mutt/lib.h"
Expand Down
1 change: 1 addition & 0 deletions command_parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "mutt_commands.h"

struct Buffer;
struct GroupList;

enum CommandResult parse_alternates (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
enum CommandResult parse_attachments (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
Expand Down
1 change: 0 additions & 1 deletion conn/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#define MUTT_CONN_LIB_H

#include "config.h"
#include <stdio.h>
// IWYU pragma: begin_exports
#include "conn_globals.h"
#include "connaccount.h"
Expand Down
1 change: 0 additions & 1 deletion conn/sasl.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <time.h>
#include "mutt/lib.h"
#include "gui/lib.h"
#include "mutt.h"
Expand Down
2 changes: 0 additions & 2 deletions conn/sasl.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
#ifndef MUTT_CONN_SASL_H
#define MUTT_CONN_SASL_H

#include <stddef.h>
#include <sasl/sasl.h>
#include <sys/types.h>

struct Connection;

Expand Down
1 change: 0 additions & 1 deletion conn/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*/

#include "config.h"
#include <stddef.h>
#include <errno.h>
#include <string.h>
#include <time.h>
Expand Down
1 change: 0 additions & 1 deletion conn/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#ifndef MUTT_CONN_SOCKET_H
#define MUTT_CONN_SOCKET_H

#include <stddef.h>
#include <time.h>

struct Connection;
Expand Down
1 change: 0 additions & 1 deletion conn/tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include "conn_globals.h"
#include "connaccount.h"
#include "connection.h"
#include "socket.h"

/**
* struct TunnelSockData - A network tunnel (pair of sockets)
Expand Down
1 change: 1 addition & 0 deletions core/neomutt.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#ifndef MUTT_CORE_NEOMUTT_H
#define MUTT_CORE_NEOMUTT_H

#include <stddef.h>
#include <stdbool.h>
#include "account.h"
#include "mailbox.h"
Expand Down
1 change: 0 additions & 1 deletion email/rfc2231.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <ctype.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "mutt/lib.h"
#include "rfc2231.h"
Expand Down
1 change: 1 addition & 0 deletions email/rfc2231.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#ifndef MUTT_EMAIL_RFC2231_H
#define MUTT_EMAIL_RFC2231_H

#include <stddef.h>
#include <stdbool.h>

struct ParameterList;
Expand Down
1 change: 1 addition & 0 deletions enter.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "muttlib.h"
#include "opcodes.h"
#include "protos.h"
#include "history/lib.h"

/**
* enum EnterRedrawFlags - redraw flags for mutt_enter_string_full()
Expand Down
1 change: 0 additions & 1 deletion hcache/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
#define MUTT_HCACHE_LIB_H

#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>

struct Buffer;
Expand Down
1 change: 1 addition & 0 deletions hdrline.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "config.h"
#include <locale.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions imap/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions imap/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
*/

#include "config.h"
#include <stdbool.h>
#include <string.h>
#include "imap_private.h"
#include "email/lib.h"
Expand Down
3 changes: 0 additions & 3 deletions mutt/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,15 @@
*/

#include "config.h"
#include <ctype.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include "date.h"
#include "logging.h"
#include "memory.h"
#include "message.h"
#include "prex.h"
#include "regex3.h"
#include "string2.h"
Expand Down
5 changes: 3 additions & 2 deletions mutt/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <stdbool.h>
#include <stdio.h>
#include <sys/types.h>
#include <time.h>

struct Buffer;
struct stat;
Expand All @@ -38,7 +37,9 @@ extern const char filename_safe_chars[];
#define MUTT_CONT (1 << 0) ///< \-continuation
#define MUTT_EOL (1 << 1) ///< don't strip `\n` / `\r\n`

#ifndef HAVE_STRUCT_TIMESPEC
#ifdef HAVE_STRUCT_TIMESPEC
struct timespec;
#else
/**
* struct timespec - Time value with nanosecond precision
*/
Expand Down
1 change: 0 additions & 1 deletion mutt/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include "config.h"
#include <stdbool.h>
#include <string.h>
#include "list.h"
#include "memory.h"
#include "queue.h"
Expand Down
1 change: 1 addition & 0 deletions mutt/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#ifndef MUTT_LIB_LIST_H
#define MUTT_LIB_LIST_H

#include <stddef.h>
#include <stdbool.h>
#include "queue.h"

Expand Down
1 change: 1 addition & 0 deletions mutt_history.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "config/lib.h"
Expand Down
1 change: 0 additions & 1 deletion mutt_lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <stdint.h>
#include "mutt_commands.h"
#include <stdint.h>

struct Buffer;

Expand Down
4 changes: 1 addition & 3 deletions mutt_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "mutt/regex3.h"
#include "mutt/lib.h"
#include "keymap.h"

struct NotifyCallback;

/* These Config Variables are only used in menu.c */
extern short C_MenuContext;
extern bool C_MenuMoveOff;
Expand Down
1 change: 1 addition & 0 deletions ncrypt/smime.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "config.h"
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
Expand Down
1 change: 1 addition & 0 deletions nntp/browse.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/

#include "config.h"
#include <stdint.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "email/lib.h"
Expand Down
1 change: 0 additions & 1 deletion pop/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "core/lib.h"
#include "mx.h"

struct Slist;
struct stat;

/* These Config Variables are only used in pop/pop.c */
Expand Down
1 change: 1 addition & 0 deletions recvattach.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#ifndef MUTT_RECVATTACH_H
#define MUTT_RECVATTACH_H

#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdio.h>
Expand Down
1 change: 1 addition & 0 deletions sidebar.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
1 change: 1 addition & 0 deletions status.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "config/lib.h"
Expand Down

0 comments on commit 8e53202

Please sign in to comment.