From 9805db320de71e6cb9943fb8d19f69be7a2c4807 Mon Sep 17 00:00:00 2001 From: c+1 Date: Sun, 29 Oct 2023 17:22:21 -0400 Subject: fixed #include recursion --- src/include/pp.h | 3 --- src/include/source.h | 4 +--- src/include/tree.h | 2 +- src/include/util.h | 3 +-- src/source.c | 2 -- src/token.c | 2 -- src/tree.c | 2 -- src/util.c | 1 - 8 files changed, 3 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/include/pp.h b/src/include/pp.h index d82907c..4ab4f94 100644 --- a/src/include/pp.h +++ b/src/include/pp.h @@ -1,9 +1,6 @@ #ifndef PP_H #define PP_H -#include -#include - #include "util.h" #include "syntax.h" diff --git a/src/include/source.h b/src/include/source.h index ff9f150..1fe9c41 100644 --- a/src/include/source.h +++ b/src/include/source.h @@ -1,9 +1,7 @@ #ifndef SOURCE_H #define SOURCE_H -#include -#include -#include +#include "util.h" char* source_get(char* arg); char* source_get_from_stdin(); diff --git a/src/include/tree.h b/src/include/tree.h index d19f1f7..d529bff 100644 --- a/src/include/tree.h +++ b/src/include/tree.h @@ -1,7 +1,7 @@ #ifndef TREE_H #define TREE_H -#include +#include "util.h" typedef struct TREE { enum TREE_TYPE { diff --git a/src/include/util.h b/src/include/util.h index cfc85c2..854d18d 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -1,12 +1,11 @@ #ifndef UTIL_H #define UTIL_H +#include #include #include -#include #include - /* log some debug information */ void log_dbg(const char*, ...); /* log some information */ diff --git a/src/source.c b/src/source.c index 4874d5a..d0c39b3 100644 --- a/src/source.c +++ b/src/source.c @@ -1,6 +1,4 @@ #include "include/source.h" -#include "include/util.h" -#include char* source_get(char* arg) { return arg? diff --git a/src/token.c b/src/token.c index 935f23e..33a2545 100644 --- a/src/token.c +++ b/src/token.c @@ -1,5 +1,3 @@ -#include - #include "include/token.h" token_t* token_init(int type, char val) { diff --git a/src/tree.c b/src/tree.c index dc0a9ad..1019e45 100644 --- a/src/tree.c +++ b/src/tree.c @@ -1,7 +1,5 @@ #include "include/tree.h" -#include "include/util.h" - tree_t* tree_init(int type) { tree_t* tree; diff --git a/src/util.c b/src/util.c index 3a236cd..80a452a 100644 --- a/src/util.c +++ b/src/util.c @@ -1,6 +1,5 @@ #include "include/util.h" - void log_dbg(const char* fmt, ...) { va_list ap; -- cgit v1.2.3