diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ast.c | 2 | ||||
| -rw-r--r-- | src/ast.h | 2 | ||||
| -rw-r--r-- | src/codegen.h | 1 | ||||
| -rw-r--r-- | src/common.h | 2 | ||||
| -rw-r--r-- | src/ducc.h | 11 | ||||
| -rw-r--r-- | src/main.c | 2 | ||||
| -rw-r--r-- | src/parse.c | 3 | ||||
| -rw-r--r-- | src/preprocess.c | 4 | ||||
| -rw-r--r-- | src/preprocess.h | 1 | ||||
| -rw-r--r-- | src/sys.c | 2 | ||||
| -rw-r--r-- | src/token.c | 3 | ||||
| -rw-r--r-- | src/token.h | 3 | ||||
| -rw-r--r-- | src/tokenize.c | 2 |
13 files changed, 15 insertions, 23 deletions
@@ -1,6 +1,4 @@ #include "ast.h" -#include <stdlib.h> -#include <string.h> #include "common.h" #include "preprocess.h" @@ -1,7 +1,7 @@ #ifndef DUCC_AST_H #define DUCC_AST_H -#include <stddef.h> +#include "ducc.h" typedef enum { StorageClass_unspecified, diff --git a/src/codegen.h b/src/codegen.h index 6a75179..95ec069 100644 --- a/src/codegen.h +++ b/src/codegen.h @@ -1,7 +1,6 @@ #ifndef DUCC_CODEGEN_H #define DUCC_CODEGEN_H -#include <stdio.h> #include "ast.h" void codegen(Program* prog, FILE* out); diff --git a/src/common.h b/src/common.h index 94f75b1..b6fc238 100644 --- a/src/common.h +++ b/src/common.h @@ -1,7 +1,7 @@ #ifndef DUCC_COMMON_H #define DUCC_COMMON_H -#include <stddef.h> +#include "ducc.h" _Noreturn void fatal_error(const char* msg, ...); diff --git a/src/ducc.h b/src/ducc.h new file mode 100644 index 0000000..31ee977 --- /dev/null +++ b/src/ducc.h @@ -0,0 +1,11 @@ +#ifndef DUCC_DUCC_H +#define DUCC_DUCC_H + +#include <assert.h> +#include <stdarg.h> +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#endif @@ -1,5 +1,3 @@ -#include <stdlib.h> -#include <string.h> #include "ast.h" #include "cli.h" #include "codegen.h" diff --git a/src/parse.c b/src/parse.c index 21d399b..da1345d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -1,7 +1,4 @@ #include "parse.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include "common.h" #include "tokenize.h" diff --git a/src/preprocess.c b/src/preprocess.c index f9fbcb4..d3c662b 100644 --- a/src/preprocess.c +++ b/src/preprocess.c @@ -1,9 +1,5 @@ #include "preprocess.h" -#include <assert.h> #include <libgen.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <unistd.h> #include "common.h" #include "parse.h" diff --git a/src/preprocess.h b/src/preprocess.h index e78776f..a39f01c 100644 --- a/src/preprocess.h +++ b/src/preprocess.h @@ -1,7 +1,6 @@ #ifndef DUCC_PREPROCESS_H #define DUCC_PREPROCESS_H -#include <stdio.h> #include "common.h" #include "io.h" #include "token.h" @@ -1,8 +1,8 @@ #include "sys.h" #include <libgen.h> #include <linux/limits.h> -#include <stdlib.h> #include <unistd.h> +#include "ducc.h" static char* get_self_path() { char* buf = calloc(PATH_MAX, sizeof(char)); diff --git a/src/token.c b/src/token.c index 554d783..0790e95 100644 --- a/src/token.c +++ b/src/token.c @@ -1,7 +1,4 @@ #include "token.h" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include "common.h" #include "json.h" diff --git a/src/token.h b/src/token.h index ced3de3..9dc89e8 100644 --- a/src/token.h +++ b/src/token.h @@ -1,9 +1,8 @@ #ifndef DUCC_TOKEN_H #define DUCC_TOKEN_H -#include <stddef.h> +#include "ducc.h" #include "io.h" -#include "json.h" typedef enum { TokenKind_eof, diff --git a/src/tokenize.c b/src/tokenize.c index fbbc92a..57a5c61 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -1,7 +1,5 @@ #include "tokenize.h" #include <ctype.h> -#include <stdlib.h> -#include <string.h> #include "common.h" typedef struct { |
