aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/README.md b/README.md
index 4dc9861..a00b364 100644
--- a/README.md
+++ b/README.md
@@ -83,32 +83,32 @@ int main(int argc, char **argv)
if (options[i].arg_is_stored) {
switch (options[i].type) {
case SIMPLE_OPT_BOOL:
- printf(", val: %s", options[i].val_bool ? "true" : "false");
+ printf(", val: %s", options[i].val.v_bool ? "true" : "false");
break;
case SIMPLE_OPT_INT:
- printf(", val: %ld", options[i].val_int);
+ printf(", val: %ld", options[i].val.v_int);
break;
case SIMPLE_OPT_UNSIGNED:
- printf(", val: %lu", options[i].val_unsigned);
+ printf(", val: %lu", options[i].val.v_unsigned);
break;
case SIMPLE_OPT_DOUBLE:
- printf(", val: %lf", options[i].val_double);
+ printf(", val: %lf", options[i].val.v_double);
break;
case SIMPLE_OPT_CHAR:
- printf(", val: %c", options[i].val_char);
+ printf(", val: %c", options[i].val.v_char);
break;
case SIMPLE_OPT_STRING:
- printf(", val: %s", options[i].val_string);
+ printf(", val: %s", options[i].val.v_string);
break;
case SIMPLE_OPT_STRING_SET:
printf(", val: %s",
- options[i].string_set[options[i].val_string_set_idx]);
+ options[i].string_set[options[i].val.v_string_set_idx]);
break;
default:
@@ -142,7 +142,7 @@ by `simple_opt_print_usage`. the end of the array must be indicated with an
option of type `SIMPLE_OPT_END`.
this array is passed to `simple_opt_parse` and, if the parsing is successful,
-relevant values (`was_seen`, `arg_is_stored`, `val_<type>`) are in-place stored
+relevant values (`was_seen`, `arg_is_stored`, `val.v_<type>`) are in-place stored
in the options. otherwise, the returned `struct simple_opt_result` will have a
type other than `SIMPLE_OPT_RESULT_SUCCESS`, in which case error reporting
occurs.