| 374 | } |
| 375 | |
| 376 | static char *optnamearg(const struct option *opt, const char *arg, |
| 377 | enum opt_parsed flags) |
| 378 | { |
| 379 | if (flags & OPT_SHORT) |
| 380 | return xstrfmt("-%c%s", opt->short_name, arg ? arg : ""); |
| 381 | return xstrfmt("--%s%s%s%s", flags & OPT_UNSET ? "no-" : "", |
| 382 | opt->long_name, arg ? "=" : "", arg ? arg : ""); |
| 383 | } |
| 384 | |
| 385 | static enum parse_opt_result get_value(struct parse_opt_ctx_t *p, |
| 386 | const struct option *opt, |