Modify library to distinguish between long and short flags.
for example flag_int should have the following signature:
long *flag_long(flag_Parser *p, char *long_name, char *short_name, long default_val, char *usage);
Where long_name and short_name can be NULL or empty (\0) to have the short or long flag undefined)
When the flag is a short flag, the parser should allow using multiple short flags together so -f and -a could be used together like this: -fa (this matches the behavior of getopts)
Modify library to distinguish between long and short flags.
for example
flag_intshould have the following signature:Where
long_nameandshort_namecan be NULL or empty (\0) to have the short or long flag undefined)When the flag is a short flag, the parser should allow using multiple short flags together so
-fand-acould be used together like this:-fa(this matches the behavior of getopts)