33 #include "optparser.h" |
33 #include "optparser.h" |
34 |
34 |
35 void cmd_args_free(CmdArgs *args) { |
35 void cmd_args_free(CmdArgs *args) { |
36 ucx_map_free(args->options); |
36 ucx_map_free(args->options); |
37 free(args->argv); |
37 free(args->argv); |
|
38 free(args); |
38 } |
39 } |
39 |
40 |
40 CmdArgs* cmd_parse_args(int argc, char **argv) { |
41 CmdArgs* cmd_parse_args(int argc, char **argv) { |
41 CmdArgs *a = malloc(sizeof(CmdArgs)); |
42 CmdArgs *a = malloc(sizeof(CmdArgs)); |
42 a->options = ucx_map_new(16); |
43 a->options = ucx_map_new(16); |