This is to get the option value by name.
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
return false;
}
+
+void *argconfig_get_value(struct argconfig_commandline_options *s, const char *option)
+{
+ for (; s && s->option; s++) {
+ if (!strcmp(s->option, option)) {
+ if (s->seen)
+ return s->default_value;
+ break;
+ }
+ }
+
+ return NULL;
+}
void print_word_wrapped(const char *s, int indent, int start, FILE *stream);
bool argconfig_parse_seen(struct argconfig_commandline_options *options,
const char *option);
+void *argconfig_get_value(struct argconfig_commandline_options *s, const char *option);
#endif