aboutsummaryrefslogtreecommitdiff
path: root/source/kpl.c
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-09-20 17:10:21 -0400
committernodist <kevin.comas.git@gmail.com>2026-09-20 17:10:21 -0400
commit260e50d627aea535abcd9d9902c1b4ae56da4c54 (patch)
tree91a5ec00e02e67c78437040a798f2fa3140e57a0 /source/kpl.c
parent4e19e6ab1bd24466d9dcb0d8eea54a7e3d84d576 (diff)
add config for io and thread
Diffstat (limited to 'source/kpl.c')
-rw-r--r--source/kpl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/kpl.c b/source/kpl.c
index aacbd5c..cc98b4b 100644
--- a/source/kpl.c
+++ b/source/kpl.c
@@ -4,11 +4,17 @@
#ifdef KPL_MAIN
int32_t main(const int32_t argc, const char *argv[]) {
int32_t exit_status = KPL_EXIT_CODE_SUCCESS;
- kpl_config config;
- kpl_config_init(&config);
- if ((exit_status = kpl_config_parse_args(&config, argc, argv)))
+ kpl_env env;
+ kpl_config_init(&env.config);
+ if ((exit_status = kpl_config_parse_args(&env.config, argc, argv)))
return exit_status;
- KPL_PRINT_TODO("MAIN PROGRAM");
+ KPL_PRINT_TODO("INIT KPL");
+ if (env.config.flags & KPL_CONFIG_FLAG_EVAL)
+ KPL_PRINT_TODO("RUN EVAL");
+ else if (env.config.flags & KPL_CONFIG_FLAG_REPL)
+ KPL_PRINT_TODO("RUN REPL");
+ else
+ KPL_PRINT_TODO("RUN MODULE");
return exit_status;
}
#endif