From 98d81e701a3e6c75b932ac75c872ae0e3f4d84f4 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 14 Apr 2025 14:03:08 -0500 Subject: config change, local support, overall fixes --- src/io.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/io.h') 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}, -- cgit v1.2.3