diff options
| author | dacctal <donotcontactmevia@email.invalid> | 2026-07-21 21:32:27 +0000 |
|---|---|---|
| committer | dacctal <donotcontactmevia@email.invalid> | 2026-07-21 21:32:27 +0000 |
| commit | 184bd50e2ea12b4bf40f4ae1b0d685f0bfa1c995 (patch) | |
| tree | bfe4f0a8fb39def302bdc807308c30b60dd18a92 /src/main.c | |
| parent | c251d37c98efba534766e914f7392cc7a0470351 (diff) | |
started 2.0 refactor. Co-authored-by: ezntek <eason@ezntek.com>
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -18,12 +18,28 @@ */ -#include "parse_args.h" -#include "globs.h" +#include "cli.h" +#include "lua_state.h" int main(int argc, char **argv) { - init_vars(); - parse_args(argc, argv); - free_vars(); - return 0; + // if (!init_vars()) + // return 1; + + int retval = 0; + cli_result_t result = cli(argc, argv); + if (!result) { + retval = 1; + goto done; + } + + if (result != CLI_HELP_CALLED) { + init_lua_state(); + // if (!init_vars()) + // return 1; + } + +done: + free_lua_state(); + // free_vars(); + return retval; } |
