aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/pp.h3
-rw-r--r--src/include/source.h4
-rw-r--r--src/include/tree.h2
-rw-r--r--src/include/util.h3
-rw-r--r--src/source.c2
-rw-r--r--src/token.c2
-rw-r--r--src/tree.c2
-rw-r--r--src/util.c1
8 files changed, 3 insertions, 16 deletions
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 <stdlib.h>
-#include <string.h>
-
#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 <stdlib.h>
-#include <string.h>
-#include <stdio.h>
+#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 <stdlib.h>
+#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 <stdlib.h>
#include <stdarg.h>
#include <string.h>
-#include <stdlib.h>
#include <stdio.h>
-
/* 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 <stdio.h>
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 <stdlib.h>
-
#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;