From 595fd25a80c569d104bc53cbfb9e46654134b4e1 Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 18 Dec 2023 13:55:13 -0600 Subject: config and io functions --- src/config.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/config.h (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h new file mode 100644 index 0000000..1d45cad --- /dev/null +++ b/src/config.h @@ -0,0 +1,25 @@ +#include "lua.h" + + +extern int _print_type; +extern int _max_depth; +extern int _start_nl_at; + +struct str_to_int { + const char* key; + int* value; +}; + +static struct str_to_int config_map[] = { + {"print_type", &_print_type}, + {"max_depth", &_max_depth}, + {"start_nl_at", &_start_nl_at}, + {NULL,NULL} +}; + +int l_set(lua_State*); + +static const luaL_Reg config_function_list [] = { + {"set",l_set}, + {NULL,NULL} +}; -- cgit v1.2.3