|
@@ -168,6 +168,14 @@ int main_ctx_init(int argc, char** argv) {
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void main_ctx_finish() {
|
|
|
|
|
+ SAFE_FREE( g_main_ctx.save_argv[ 0 ] );
|
|
|
|
|
+ SAFE_FREE( g_main_ctx.save_argv );
|
|
|
|
|
+ SAFE_FREE( g_main_ctx.cmdline );
|
|
|
|
|
+ SAFE_FREE( g_main_ctx.save_envp[ 0 ] );
|
|
|
|
|
+ SAFE_FREE( g_main_ctx.save_envp );
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#define UNDEFINED_OPTION -1
|
|
#define UNDEFINED_OPTION -1
|
|
|
static int get_arg_type(int short_opt, const char* options) {
|
|
static int get_arg_type(int short_opt, const char* options) {
|
|
|
if (options == NULL) return UNDEFINED_OPTION;
|
|
if (options == NULL) return UNDEFINED_OPTION;
|