summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2012-12-02 21:25:54 +0000
committerStephen Dolan <mu@netsoc.tcd.ie>2012-12-02 21:25:54 +0000
commitb6f2fbbe62be72e7eb52fda9f5ca5a8838869ae4 (patch)
tree51ed0a8f18a01f68e5979e435bbcb29d75a40193
parent125e2785025ed1a4363800d712bdf4e782a94cd4 (diff)
Move all the includes one place to the left
-rw-r--r--builtin.c1
-rw-r--r--builtin.h11
-rw-r--r--bytecode.h9
-rw-r--r--compile.c1
-rw-r--r--compile.h5
-rw-r--r--execute.c1
6 files changed, 17 insertions, 11 deletions
diff --git a/builtin.c b/builtin.c
index ae4df33b..4fca4a63 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1,5 +1,6 @@
#include <string.h>
#include "builtin.h"
+#include "bytecode.h"
#include "compile.h"
#include "parser.h"
#include "locfile.h"
diff --git a/builtin.h b/builtin.h
index fe2ac6ac..b6c26cda 100644
--- a/builtin.h
+++ b/builtin.h
@@ -1,9 +1,18 @@
#ifndef BUILTIN_H
#define BUILTIN_H
-#include "bytecode.h"
#include "compile.h"
block builtins_bind(block);
+
+typedef void (*cfunction_ptr)(jv input[], jv output[]);
+
+struct cfunction {
+ cfunction_ptr fptr;
+ const char* name;
+ int nargs;
+};
+
+
#endif
diff --git a/bytecode.h b/bytecode.h
index 011745c0..e84f1387 100644
--- a/bytecode.h
+++ b/bytecode.h
@@ -4,14 +4,7 @@
#include "jv.h"
#include "opcode.h"
-
-typedef void (*cfunction_ptr)(jv input[], jv output[]);
-
-struct cfunction {
- cfunction_ptr fptr;
- const char* name;
- int nargs;
-};
+#include "builtin.h"
#define MAX_CFUNCTION_ARGS 10
struct symbol_table {
diff --git a/compile.c b/compile.c
index d31e0c34..b7c202ac 100644
--- a/compile.c
+++ b/compile.c
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include "opcode.h"
#include "compile.h"
+#include "bytecode.h"
#include "locfile.h"
struct inst {
diff --git a/compile.h b/compile.h
index c8a326da..9a885159 100644
--- a/compile.h
+++ b/compile.h
@@ -1,10 +1,13 @@
#ifndef COMPILE_H
#define COMPILE_H
#include <stdint.h>
-#include "bytecode.h"
+#include "jv.h"
#include "opcode.h"
#include "locfile.h"
+struct bytecode;
+struct symbol_table;
+
struct inst;
typedef struct inst inst;
diff --git a/execute.c b/execute.c
index 8aeee779..8c56b67c 100644
--- a/execute.c
+++ b/execute.c
@@ -7,7 +7,6 @@
#include "opcode.h"
#include "bytecode.h"
-#include "compile.h"
#include "forkable_stack.h"
#include "frame_layout.h"