aboutsummaryrefslogtreecommitdiff
path: root/src/io.h
diff options
context:
space:
mode:
authoramelia squires <[email protected]>2025-04-14 14:03:08 -0500
committeramelia squires <[email protected]>2025-04-14 14:03:08 -0500
commit98d81e701a3e6c75b932ac75c872ae0e3f4d84f4 (patch)
tree48c6107656e14cfbbcbb49424fc3454de850a5db /src/io.h
parent1e5025a1631bac15e69d3ef0feff78fc1f705354 (diff)
config change, local support, overall fixesnew-config
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},