#ifndef UTILS_ARGS_H #define UTILS_ARGS_H #include struct option { char short_name[16]; char name[32]; bool has_param; // first: args struct; second: param; void (*handle)(void *, const char *); }; // ALR stands for Args Load Result enum alr { ALR_OK, ALR_INVALID_OPTION }; /* * opt_length: options length * args: args struct */ enum alr process_args(int argc, char **argv, struct option *options, int opt_length, void *args); #endif