Lines Matching refs:option

14    Free Software Foundation; either version 2, or (at your option) any
111 When `getopt' finds an option that takes an argument,
114 each non-option ARGV-element is returned here. */
125 non-option elements that the caller should itself scan.
139 /* The next char to be scanned in the option-element
140 in which the last option character we returned was found.
153 /* Set to an option character which was unrecognized.
159 /* Describe how to deal with options that follow non-option ARGV-elements.
166 stop option processing when the first non-option is seen.
170 of the list of option characters.
177 RETURN_IN_ORDER is an option available to programs that were written
179 the ordering of the two. We describe each non-option ARGV-element
180 as if it were the argument of an option with character code 1.
181 Using `-' as the first character of the list of option characters
184 The special argument `--' forces an end of option-scanning regardless
403 non-option ARGV-elements is empty. */
462 /* Scan elements of ARGV (whose length is ARGC) for option characters
466 then it is an option element. The characters of this element
467 (aside from the initial '-') are option characters. If `getopt'
468 is called repeatedly, it returns successively each of the option characters
469 from each of the option elements.
471 If `getopt' finds another option character, it returns that character,
473 resume the scan with the following option character or ARGV-element.
475 If there are no more option characters, `getopt' returns -1.
477 that is not an option. (The ARGV-elements have been permuted
480 OPTSTRING is a string containing the legitimate option characters.
481 If an option character is seen that is not listed in OPTSTRING,
487 ARGV-element, is returned in `optarg'. Two colons mean an option that
492 handling the non-option ARGV-elements.
497 or is an exact match for some defined option. If they have an
498 argument, it follows the option name in the same ARGV-element, separated
499 from the option name by a `=', or else the in next ARGV-element.
500 When `getopt' finds a long-named option, it returns 0 if that option's
501 `flag' field is nonzero, the value of the option's `val' field
508 LONGOPTS is a vector of `struct option' terminated by an
511 LONGIND returns the index in LONGOPT of the long-named option found.
512 It is only valid when a long-named option has been found by the most
523 const struct option *longopts;
537 /* Test whether ARGV[optind] points to a non-option argument.
538 Either it does not have option syntax, or there is an environment flag
539 from the shell indicating it is not an option. The later information
579 Skip it like a null option,
580 then exchange with previous non-options as if it were an option,
581 then skip everything else like a non-option. */
608 /* If we have come to a non-option and did not permute it,
619 /* We have found another option-ARGV-element.
626 /* Decode the current option-ARGV-element. */
628 /* Check whether the ARGV-element is a long option.
631 a valid short option, don't consider it an abbreviated form of
632 a long option that starts with f. Otherwise there would be no
633 way to give the -f short option.
635 On the other hand, if there's a long option "fubar" and
637 the long option, just like "--fu", and not "-f" with arg "u".
646 const struct option *p;
647 const struct option *pfound = NULL;
684 fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
707 /* --option */
709 _("%s: option `--%s' doesn't allow an argument\n"),
712 /* +option or -option */
714 _("%s: option `%c%s' doesn't allow an argument\n"),
731 _("%s: option `%s' requires an argument\n"),
749 /* Can't find it as a long option. If this is not getopt_long_only,
750 or the option starts with '--' or is not a valid short
751 option, then it's an error.
752 Otherwise interpret it as a short option. */
759 /* --option */
760 fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
763 /* +option or -option */
764 fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
774 /* Look at and handle the next short option-character. */
790 fprintf (stderr, _("%s: illegal option -- %c\n"),
793 fprintf (stderr, _("%s: invalid option -- %c\n"),
799 /* Convenience. Treat POSIX -W foo same as long option --foo */
803 const struct option *p;
804 const struct option *pfound = NULL;
810 /* This is an option that requires an argument. */
823 fprintf (stderr, _("%s: option requires an argument -- %c\n"),
870 fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
889 %s: option `-W %s' doesn't allow an argument\n"),
904 _("%s: option `%s' requires an argument\n"),
927 /* This is an option that accepts an argument optionally. */
939 /* This is an option that requires an argument. */
953 _("%s: option requires an argument -- %c\n"),
980 (const struct option *) 0,
1024 printf ("option %c\n", c);
1028 printf ("option a\n");
1032 printf ("option b\n");
1036 printf ("option c with value `%s'\n", optarg);
1049 printf ("non-option ARGV-elements: ");