mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[common] add getValues callback for options
This commit is contained in:
@@ -464,6 +464,15 @@ bool option_validate()
|
||||
if (error)
|
||||
printf("\n Error: %s\n", error);
|
||||
|
||||
if (o->getValues)
|
||||
{
|
||||
StringList values = o->getValues(o);
|
||||
printf("\nValid values are:\n\n");
|
||||
for(unsigned int v = 0; v < stringlist_count(values); ++v)
|
||||
printf(" * %s\n", stringlist_at(values, v));
|
||||
stringlist_free(&values);
|
||||
}
|
||||
|
||||
if (o->printHelp)
|
||||
{
|
||||
printf("\n");
|
||||
|
Reference in New Issue
Block a user