[common] track if option set failed and print help if so

This commit is contained in:
Geoffrey McRae committed 2019-05-12 16:51:37 +10:00
1 parent b662128708
commit 2fe9dc7ca1
3 files changed
+41 -27

No files matched your search

+5 -1
View File
@@ -51,7 +51,11 @@ struct Option
bool (*validator)(struct Option * opt, const char ** error);
char * (*toString )(struct Option * opt);
StringList (*getValues)(struct Option * opt);
void (*printHelp)();
void (*printHelp)();
// internal use only
bool failed_set;
};
// register an NULL terminated array of options