aboutsummaryrefslogtreecommitdiff
path: root/src/io.h
diff options
context:
space:
mode:
authoramy <[email protected]>2025-04-14 14:09:22 -0500
committerGitHub <[email protected]>2025-04-14 14:09:22 -0500
commitdd7a8af4050454c3901987bff24a77334f892cc4 (patch)
tree48c6107656e14cfbbcbb49424fc3454de850a5db /src/io.h
parent44c68aa7d51ea6b50c442bfbfa4ce11c530d2f7d (diff)
parentdc7e4527e88ed0c59e17c0ff04c01e1c92136e42 (diff)
Merge pull request #1 from ameliasquires/new-config
updates how config values are updated, support for local values when copying states, and annotations
Diffstat (limited to 'src/io.h')
-rw-r--r--src/io.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/io.h b/src/io.h
index 21e14d0..36702f9 100644
--- a/src/io.h
+++ b/src/io.h
@@ -1,4 +1,5 @@
#include "lua.h"
+#include "config.h"
#define color_black "\e[30m"
#define color_red "\e[31m"
@@ -28,6 +29,25 @@ int l_arg_handle(lua_State*);
int l_json_parse(lua_State*);
+extern int _file_malloc_chunk;
+extern int _print_type;
+extern int _max_depth;
+extern int _start_nl_at;
+extern int _collapse_all;
+extern int _collapse_to_memory;
+extern int _print_meta;
+
+static struct config io_config[] = {
+ {.name = "filechunksize", .type = c_int, .value = {.c_int = &_file_malloc_chunk}},
+ {.name = "print_type", .type = c_int, .value = {.c_int = &_print_type}},
+ {.name = "max_depth", .type = c_int, .value = {.c_int = &_max_depth}},
+ {.name = "start_nl_at", .type = c_int, .value = {.c_int = &_start_nl_at}},
+ {.name = "collapse_all", .type = c_int, .value = {.c_int = &_collapse_all}},
+ {.name = "collapse_to_memory", .type = c_int, .value = {.c_int = &_collapse_to_memory}},
+ {.name = "print_meta", .type = c_int, .value = {.c_int = &_print_meta}},
+ {.type = c_none}
+};
+
static const luaL_Reg io_function_list [] = {
{"readfile",l_readfile},
{"debug",l_debug},