diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-07-10 14:03:22 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2021-07-11 15:49:14 +0200 |
commit | e5e7e6277cc757475ad192f70a4b200778e1d8ee (patch) | |
tree | a6bcafa791b3cfc98a0be2f550a09bff079b61a4 | |
parent | ff6168a8901adcf84fbeda86f3f25fae7dff609b (diff) |
treewide: move header files into dedicated directory
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | chunk.c | 6 | ||||
-rw-r--r-- | compiler.c | 10 | ||||
-rw-r--r-- | include/ucode/chunk.h (renamed from chunk.h) | 0 | ||||
-rw-r--r-- | include/ucode/compiler.h (renamed from compiler.h) | 0 | ||||
-rw-r--r-- | include/ucode/lexer.h (renamed from lexer.h) | 0 | ||||
-rw-r--r-- | include/ucode/lib.h (renamed from lib.h) | 0 | ||||
-rw-r--r-- | include/ucode/module.h (renamed from module.h) | 0 | ||||
-rw-r--r-- | include/ucode/source.h (renamed from source.h) | 0 | ||||
-rw-r--r-- | include/ucode/types.h (renamed from types.h) | 0 | ||||
-rw-r--r-- | include/ucode/util.h (renamed from util.h) | 0 | ||||
-rw-r--r-- | include/ucode/value.h (renamed from value.h) | 0 | ||||
-rw-r--r-- | include/ucode/vm.h (renamed from vm.h) | 0 | ||||
-rw-r--r-- | lexer.c | 6 | ||||
-rw-r--r-- | lib.c | 10 | ||||
-rw-r--r-- | lib/fs.c | 2 | ||||
-rw-r--r-- | lib/math.c | 2 | ||||
-rw-r--r-- | lib/ubus.c | 2 | ||||
-rw-r--r-- | lib/uci.c | 2 | ||||
-rw-r--r-- | main.c | 10 | ||||
-rw-r--r-- | source.c | 2 | ||||
-rw-r--r-- | types.c | 6 | ||||
-rw-r--r-- | value.c | 8 | ||||
-rw-r--r-- | vm.c | 6 |
24 files changed, 39 insertions, 37 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a93b80..83b029e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,8 @@ IF(CMAKE_C_COMPILER_VERSION VERSION_GREATER 6) ENDIF() ADD_DEFINITIONS(-Wmissing-declarations -Wno-error=unused-variable -Wno-unused-parameter) +INCLUDE_DIRECTORIES(include) + OPTION(FS_SUPPORT "Filesystem plugin support" ON) OPTION(MATH_SUPPORT "Math plugin support" ON) OPTION(UBUS_SUPPORT "Ubus plugin support" ON) @@ -131,5 +133,5 @@ INSTALL(TARGETS ucode RUNTIME DESTINATION bin) INSTALL(TARGETS libucode LIBRARY DESTINATION lib) INSTALL(TARGETS ${LIBRARIES} LIBRARY DESTINATION lib/ucode) -SET(UCODE_HEADERS chunk.h compiler.h lexer.h lib.h module.h source.h types.h util.h value.h vm.h) +FILE(GLOB UCODE_HEADERS "include/ucode/*.h") INSTALL(FILES ${UCODE_HEADERS} DESTINATION include/ucode) @@ -16,9 +16,9 @@ #include <assert.h> -#include "chunk.h" -#include "types.h" -#include "util.h" +#include "ucode/chunk.h" +#include "ucode/types.h" +#include "ucode/util.h" #define OFFSETINFO_BITS (sizeof(((uc_offsetinfo_t *)NULL)->entries[0]) * 8) #define OFFSETINFO_BYTE_BITS 3 @@ -16,11 +16,11 @@ #include <assert.h> -#include "compiler.h" -#include "chunk.h" -#include "vm.h" /* I_* */ -#include "source.h" -#include "lib.h" /* format_error_context() */ +#include "ucode/compiler.h" +#include "ucode/chunk.h" +#include "ucode/vm.h" /* I_* */ +#include "ucode/source.h" +#include "ucode/lib.h" /* format_error_context() */ static void uc_compiler_compile_unary(uc_compiler_t *compiler, bool assignable); static void uc_compiler_compile_binary(uc_compiler_t *compiler, bool assignable); diff --git a/chunk.h b/include/ucode/chunk.h index 458af1f..458af1f 100644 --- a/chunk.h +++ b/include/ucode/chunk.h diff --git a/compiler.h b/include/ucode/compiler.h index 19fcf37..19fcf37 100644 --- a/compiler.h +++ b/include/ucode/compiler.h diff --git a/lexer.h b/include/ucode/lexer.h index 1b19b60..1b19b60 100644 --- a/lexer.h +++ b/include/ucode/lexer.h diff --git a/lib.h b/include/ucode/lib.h index 7eeae9f..7eeae9f 100644 --- a/lib.h +++ b/include/ucode/lib.h diff --git a/module.h b/include/ucode/module.h index 43d9d51..43d9d51 100644 --- a/module.h +++ b/include/ucode/module.h diff --git a/source.h b/include/ucode/source.h index 3de7c93..3de7c93 100644 --- a/source.h +++ b/include/ucode/source.h diff --git a/types.h b/include/ucode/types.h index e2cb15d..e2cb15d 100644 --- a/types.h +++ b/include/ucode/types.h diff --git a/util.h b/include/ucode/util.h index 858a3fd..858a3fd 100644 --- a/util.h +++ b/include/ucode/util.h diff --git a/value.h b/include/ucode/value.h index 04d37a9..04d37a9 100644 --- a/value.h +++ b/include/ucode/value.h diff --git a/vm.h b/include/ucode/vm.h index 553cf61..553cf61 100644 --- a/vm.h +++ b/include/ucode/vm.h @@ -25,9 +25,9 @@ #include <errno.h> #include <endian.h> -#include "vm.h" -#include "lib.h" -#include "lexer.h" +#include "ucode/vm.h" +#include "ucode/lib.h" +#include "ucode/lexer.h" #define UC_LEX_CONTINUE_PARSING (void *)1 @@ -32,11 +32,11 @@ #include <sys/wait.h> #include <fnmatch.h> -#include "lexer.h" -#include "compiler.h" -#include "vm.h" -#include "lib.h" -#include "source.h" +#include "ucode/lexer.h" +#include "ucode/compiler.h" +#include "ucode/vm.h" +#include "ucode/lib.h" +#include "ucode/source.h" static void format_context_line(uc_stringbuf_t *buf, const char *line, size_t off, bool compact) @@ -26,7 +26,7 @@ #include <pwd.h> #include <glob.h> -#include "../module.h" +#include "ucode/module.h" #define err_return(err) do { last_error = err; return NULL; } while(0) @@ -17,7 +17,7 @@ #include <math.h> #include <sys/time.h> -#include "../module.h" +#include "ucode/module.h" static bool srand_called = false; @@ -19,7 +19,7 @@ #include <libubox/blobmsg.h> #include <libubox/blobmsg_json.h> -#include "../module.h" +#include "ucode/module.h" #define err_return(err) do { last_error = err; return NULL; } while(0) @@ -17,7 +17,7 @@ #include <string.h> #include <uci.h> -#include "../module.h" +#include "ucode/module.h" #define err_return(err) do { last_error = err; return NULL; } while(0) @@ -28,11 +28,11 @@ #include <json-c/json.h> #endif -#include "compiler.h" -#include "lexer.h" -#include "lib.h" -#include "vm.h" -#include "source.h" +#include "ucode/compiler.h" +#include "ucode/lexer.h" +#include "ucode/lib.h" +#include "ucode/vm.h" +#include "ucode/source.h" static void @@ -16,7 +16,7 @@ #include <string.h> -#include "source.h" +#include "ucode/source.h" uc_source_t * @@ -21,9 +21,9 @@ #include <errno.h> #include <math.h> -#include "types.h" -#include "util.h" -#include "vm.h" +#include "ucode/types.h" +#include "ucode/util.h" +#include "ucode/vm.h" uc_type_t ucv_type(uc_value_t *uv) @@ -20,10 +20,10 @@ #include <ctype.h> /* isspace(), isdigit(), isxdigit() */ #include <errno.h> -#include "util.h" -#include "chunk.h" -#include "value.h" -#include "vm.h" +#include "ucode/util.h" +#include "ucode/chunk.h" +#include "ucode/value.h" +#include "ucode/vm.h" #define TAG_TYPE uint64_t #define TAG_BITS 3 @@ -20,9 +20,9 @@ #include <ctype.h> #include <math.h> -#include "vm.h" -#include "compiler.h" -#include "lib.h" /* format_error_context() */ +#include "ucode/vm.h" +#include "ucode/compiler.h" +#include "ucode/lib.h" /* format_error_context() */ #undef __insn #define __insn(_name) #_name, |