cleanup: Remove unnecessary #include.
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 25 Dec 2012 15:42:30 +0000 (16:42 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 27 Dec 2012 11:58:44 +0000 (12:58 +0100)
29 files changed:
ast.c
ast2firm.c
ast_t.h
attribute.c
attribute_t.h
builtins.c
builtins.h
diagnostic.c
entity_t.h
format_check.c
help.c
lang_features.h
main.c
mangle.c
parser.c
preprocessor.c
printer.h
string_rep.c
string_rep.h
symbol_t.h
token.c
token_t.h
type.c
type.h
type_hash.c
type_t.h
types.c
wrappergen/write_fluffy.c
wrappergen/write_jna.c

diff --git a/ast.c b/ast.c
index 1aabec7..e3ce659 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -9,14 +9,10 @@
 #include "type_t.h"
 #include "parser.h"
 #include "lang_features.h"
-#include "entity_t.h"
 #include "printer.h"
 #include "separator_t.h"
 #include "types.h"
 
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <ctype.h>
 
 #include "adt/error.h"
index 384450c..28b5f31 100644 (file)
@@ -8,7 +8,6 @@
 #include <string.h>
 #include <stdbool.h>
 #include <unistd.h>
-#include <limits.h>
 
 #include <libfirm/firm.h>
 #include <libfirm/adt/obst.h>
@@ -22,6 +21,7 @@
 #include "adt/util.h"
 #include "jump_target.h"
 #include "symbol_t.h"
+#include "symbol_table.h"
 #include "token_t.h"
 #include "type_t.h"
 #include "ast_t.h"
@@ -30,8 +30,8 @@
 #include "diagnostic.h"
 #include "lang_features.h"
 #include "types.h"
-#include "type_hash.h"
 #include "mangle.h"
+#include "unicode.h"
 #include "walk.h"
 #include "warning.h"
 #include "printer.h"
diff --git a/ast_t.h b/ast_t.h
index ca796a8..8a16c2f 100644 (file)
--- a/ast_t.h
+++ b/ast_t.h
@@ -10,7 +10,6 @@
 
 #include "ast.h"
 #include "symbol.h"
-#include "token_t.h"
 #include "type.h"
 #include "entity_t.h"
 #include "adt/obst.h"
index 84869de..78ecc02 100644 (file)
@@ -6,11 +6,14 @@
 
 #include <assert.h>
 #include "adt/strutil.h"
+#include "ast_t.h"
 #include "diagnostic.h"
 #include "warning.h"
 #include "attribute_t.h"
 #include "symbol_t.h"
 #include "adt/error.h"
+#include "entity_t.h"
+#include "symbol_table.h"
 #include "type_t.h"
 
 static const char *const attribute_names[ATTRIBUTE_LAST+1] = {
index 08d28b9..6fab179 100644 (file)
@@ -8,7 +8,6 @@
 #include "attribute.h"
 #include "ast.h"
 #include "symbol.h"
-#include "type.h"
 
 /**
  * GNU attributes.
index 235e293..2898ec0 100644 (file)
@@ -8,11 +8,11 @@
 #include "type_t.h"
 #include "types.h"
 #include "entity_t.h"
-#include "ast_t.h"
 #include "symbol_t.h"
 #include "parser.h"
 #include "builtins.h"
 #include "lang_features.h"
+#include "symbol_table.h"
 
 static entity_t *create_builtin_function(builtin_kind_t kind, symbol_t *symbol,
                                          type_t *function_type)
index 6b2a63b..cc94643 100644 (file)
@@ -5,8 +5,6 @@
 #ifndef BUILTINS_H
 #define BUILTINS_H
 
-#include <stdbool.h>
-
 typedef enum {
        BUILTIN_NONE,
        BUILTIN_ALLOCA,
index 6c9739c..3ff3d61 100644 (file)
 #include "entity_t.h"
 #include "separator_t.h"
 #include "symbol_t.h"
-#include "token_t.h"
 #include "ast.h"
 #include "type.h"
-#include "warning.h"
+#include "unicode.h"
 
 /** Number of occurred errors. */
 unsigned error_count             = 0;
index cb58a04..f2ee603 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef ENTITY_T_H
 #define ENTITY_T_H
 
+#include "ast.h"
 #include "symbol.h"
 #include "entity.h"
 #include "attribute.h"
index 359a716..d4beefa 100644 (file)
@@ -81,7 +81,7 @@ static const char* get_length_modifier_name(const format_length_modifier_t mod)
 
 static void warn_invalid_length_modifier(const position_t *pos,
                                          const format_length_modifier_t mod,
-                                         const utf32 conversion)
+                                         const char conversion)
 {
        char const *const lmod = get_length_modifier_name(mod);
        warningf(WARN_FORMAT, pos, "invalid length modifier '%s' for conversion specifier '%%%c'", lmod, conversion);
diff --git a/help.c b/help.c
index 7e617a8..e561a64 100644 (file)
--- a/help.c
+++ b/help.c
@@ -3,7 +3,7 @@
  * Copyright (C) 2012 Matthias Braun <matze@braunis.de>
  */
 #include <stdio.h>
-#include <string.h>
+
 #include "help.h"
 
 void put_help(const char *option, const char *explanation)
index f230b2d..6419e82 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef LANG_FEATURES_H
 #define LANG_FEATURES_H
 
-#include "type.h"
+#include <stdbool.h>
 
 #define BITS_PER_BYTE    8
 
diff --git a/main.c b/main.c
index 06d99a8..47e8547 100644 (file)
--- a/main.c
+++ b/main.c
@@ -46,6 +46,7 @@
 #include <libfirm/be.h>
 #include <libfirm/statev.h>
 
+#include "ast_t.h"
 #include "preprocessor.h"
 #include "token_t.h"
 #include "types.h"
@@ -61,6 +62,7 @@
 #include "adt/error.h"
 #include "adt/strutil.h"
 #include "adt/array.h"
+#include "symbol_table.h"
 #include "wrappergen/write_fluffy.h"
 #include "wrappergen/write_jna.h"
 #include "wrappergen/write_compoundsizes.h"
index e79d08a..fb02128 100644 (file)
--- a/mangle.c
+++ b/mangle.c
@@ -7,11 +7,11 @@
 #include <libfirm/firm.h>
 #include <string.h>
 
+#include "adt/obst.h"
 #include "entity_t.h"
 #include "type_t.h"
 #include "symbol_t.h"
 #include "mangle.h"
-#include "diagnostic.h"
 #include "lang_features.h"
 #include "adt/error.h"
 
index d49ec8d..adff126 100644 (file)
--- a/parser.c
+++ b/parser.c
 #include <stdbool.h>
 
 #include "adt/strutil.h"
+#include "adt/util.h"
 #include "parser.h"
 #include "diagnostic.h"
 #include "format_check.h"
 #include "preprocessor.h"
 #include "symbol_t.h"
+#include "symbol_table.h"
 #include "token_t.h"
 #include "types.h"
 #include "type_t.h"
 #include "type_hash.h"
 #include "ast_t.h"
-#include "entity_t.h"
 #include "attribute_t.h"
 #include "lang_features.h"
 #include "walk.h"
 #include "warning.h"
 #include "printer.h"
 #include "ast2firm.h"
-#include "adt/bitfiddle.h"
 #include "adt/error.h"
 #include "adt/array.h"
 
index 5d4213b..aec9f1c 100644 (file)
@@ -11,7 +11,6 @@
 #include <ctype.h>
 
 #include "preprocessor.h"
-#include "token_t.h"
 #include "symbol_t.h"
 #include "adt/util.h"
 #include "adt/error.h"
@@ -21,6 +20,7 @@
 #include "diagnostic.h"
 #include "string_rep.h"
 #include "input.h"
+#include "symbol_table.h"
 
 #define MAX_PUTBACK 3
 #define INCLUDE_LIMIT 199  /* 199 is for gcc "compatibility" */
index db4da5d..b6ded88 100644 (file)
--- a/printer.h
+++ b/printer.h
 #define PRINTER_H
 
 #include <stdio.h>
-#include <stdlib.h>
 #include <stdarg.h>
+
 #include "adt/obst.h"
-#include "string_rep.h"
 
 /** print a string into current output */
 extern void (*print_string)(const char *str);
index 86076cc..6a94b3e 100644 (file)
@@ -4,6 +4,7 @@
  */
 #include "adt/error.h"
 #include "string_rep.h"
+#include "unicode.h"
 
 static inline size_t wstrlen(const string_t *string)
 {
index b7d8eb4..3b69deb 100644 (file)
@@ -5,8 +5,7 @@
 #ifndef STRING_REP_H
 #define STRING_REP_H
 
-#include <stdlib.h>
-#include "unicode.h"
+#include <stddef.h>
 
 enum string_encoding_t {
        STRING_ENCODING_CHAR,
index 09ec40e..36ea30b 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef SYMBOL_T_H
 #define SYMBOL_T_H
 
-#include <stdbool.h>
 #include "symbol.h"
 #include "entity.h"
 #include "token_t.h"
diff --git a/token.c b/token.c
index f278a6f..a0bcb94 100644 (file)
--- a/token.c
+++ b/token.c
@@ -8,14 +8,12 @@
 #include "symbol_t.h"
 
 #include <assert.h>
-#include <stdio.h>
-#include <stdbool.h>
 
-#include "symbol.h"
 #include "lang_features.h"
 #include "adt/array.h"
 #include "adt/error.h"
 #include "adt/util.h"
+#include "symbol_table.h"
 
 symbol_t *token_symbols[T_LAST_TOKEN];
 
index ddca6dc..fefcafe 100644 (file)
--- a/token_t.h
+++ b/token_t.h
@@ -5,11 +5,11 @@
 #ifndef TOKEN_T_H
 #define TOKEN_T_H
 
+#include <stdbool.h>
 #include <stdio.h>
+
 #include "string_rep.h"
 #include "symbol.h"
-#include "symbol_table.h"
-#include "type.h"
 
 typedef enum token_kind_tag_t {
        T_NULL  =  0,
diff --git a/type.c b/type.c
index 5a71c31..794c2e3 100644 (file)
--- a/type.c
+++ b/type.c
@@ -5,7 +5,6 @@
 #include <config.h>
 
 #include <stdio.h>
-#include <assert.h>
 
 #include "type_t.h"
 #include "types.h"
diff --git a/type.h b/type.h
index 65dc386..54018fe 100644 (file)
--- a/type.h
+++ b/type.h
@@ -7,7 +7,8 @@
 
 #include <stdio.h>
 #include <stdbool.h>
-#include "ast.h"
+
+#include "entity.h"
 #include "symbol.h"
 
 /** Type used to express sizes. */
index d170bb6..315e2c5 100644 (file)
@@ -7,8 +7,6 @@
 #include <stdbool.h>
 
 #include "type_hash.h"
-
-#include "adt/error.h"
 #include "type_t.h"
 
 #include <assert.h>
index 8e948cf..262fb63 100644 (file)
--- a/type_t.h
+++ b/type_t.h
 
 #include <libfirm/firm_types.h>
 
+#include "ast.h"
 #include "type.h"
-#include "symbol.h"
-#include "token_t.h"
-#include "ast_t.h"
-#include "adt/obst.h"
 
 typedef enum type_kind_t {
        TYPE_ERROR = 1,
diff --git a/types.c b/types.c
index 3cd6332..b8dd7f6 100644 (file)
--- a/types.c
+++ b/types.c
@@ -5,7 +5,6 @@
 #include "type_t.h"
 #include "types.h"
 #include "lang_features.h"
-#include "entity_t.h"
 
 /** The error type. */
 type_t *type_error_type;
index b310fa5..8dbe880 100644 (file)
@@ -4,9 +4,6 @@
  */
 #include <config.h>
 
-#include <errno.h>
-#include <string.h>
-
 #include "write_fluffy.h"
 #include "separator_t.h"
 #include "symbol_t.h"
index 52a1ab7..e48fa05 100644 (file)
@@ -4,7 +4,6 @@
  */
 #include <config.h>
 
-#include <errno.h>
 #include <string.h>
 
 #include "adt/strutil.h"
@@ -19,6 +18,7 @@
 #include "adt/xmalloc.h"
 #include "adt/pset_new.h"
 #include "separator_t.h"
+#include "symbol_table.h"
 
 typedef struct output_limit {
        const char          *filename;