From b6f2fbbe62be72e7eb52fda9f5ca5a8838869ae4 Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Sun, 2 Dec 2012 21:25:54 +0000 Subject: [PATCH] Move all the includes one place to the left --- builtin.c | 1 + builtin.h | 11 ++++++++++- bytecode.h | 9 +-------- compile.c | 1 + compile.h | 5 ++++- execute.c | 1 - 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 #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 #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 -#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"