Lines Matching full:opts
438 const struct option *opts, int full)
453 if (opts->type != OPTION_GROUP)
456 for (; opts->type != OPTION_END; opts++) {
460 if (opts->type == OPTION_GROUP) {
462 if (*opts->help)
463 fprintf(stderr, "%s\n", opts->help);
466 if (!full && (opts->flags & PARSE_OPT_HIDDEN))
470 if (opts->short_name)
471 pos += fprintf(stderr, "-%c", opts->short_name);
475 if (opts->long_name && opts->short_name)
477 if (opts->long_name)
478 pos += fprintf(stderr, "--%s", opts->long_name);
480 switch (opts->type) {
487 if (opts->flags & PARSE_OPT_OPTARG)
488 if (opts->long_name)
496 if (opts->flags & PARSE_OPT_NOARG)
500 if (opts->argh) {
501 if (opts->flags & PARSE_OPT_OPTARG)
502 if (opts->long_name)
503 pos += fprintf(stderr, "[=<%s>]", opts->argh);
505 pos += fprintf(stderr, "[<%s>]", opts->argh);
507 pos += fprintf(stderr, " <%s>", opts->argh);
509 if (opts->flags & PARSE_OPT_OPTARG)
510 if (opts->long_name)
535 fprintf(stderr, "%*s%s\n", pad + USAGE_GAP, "", opts->help);
543 const struct option *opts)
546 usage_with_options_internal(usagestr, opts, 0);
551 const struct option *opts)
553 return usage_with_options_internal(usagestr, opts, 0);