mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[common] seperate validator and clean up output
This commit is contained in:
@@ -52,7 +52,7 @@ struct Option
|
||||
const char * description;
|
||||
struct OptionValue value;
|
||||
|
||||
bool (*validator)(struct OptionValue * value);
|
||||
bool (*validator)(struct OptionValue * value, const char ** error);
|
||||
void (*printHelp)();
|
||||
};
|
||||
|
||||
@@ -68,6 +68,9 @@ bool option_get_bool (const char * module, const char * name);
|
||||
// called by the main application to parse the command line arguments
|
||||
bool option_parse(int argc, char * argv[]);
|
||||
|
||||
// called by the main application to validate the option values
|
||||
bool option_validate();
|
||||
|
||||
// print out the options, help, and their current values
|
||||
void option_print();
|
||||
|
||||
|
Reference in New Issue
Block a user