Lines Matching full:option
15 Free Software Foundation; either version 2, or (at your option) any
105 When `getopt' finds an option that takes an argument,
108 each non-option ARGV-element is returned here. */
119 non-option elements that the caller should itself scan.
133 /* The next char to be scanned in the option-element
134 in which the last option character we returned was found.
147 /* Set to an option character which was unrecognized.
153 /* Describe how to deal with options that follow non-option ARGV-elements.
160 stop option processing when the first non-option is seen.
164 of the list of option characters.
171 RETURN_IN_ORDER is an option available to programs that were written
173 the ordering of the two. We describe each non-option ARGV-element
174 as if it were the argument of an option with character code 1.
175 Using `-' as the first character of the list of option characters
178 The special argument `--' forces an end of option-scanning regardless
390 non-option ARGV-elements is empty. */
449 /* Scan elements of ARGV (whose length is ARGC) for option characters
453 then it is an option element. The characters of this element
454 (aside from the initial '-') are option characters. If `getopt'
455 is called repeatedly, it returns successively each of the option characters
456 from each of the option elements.
458 If `getopt' finds another option character, it returns that character,
460 resume the scan with the following option character or ARGV-element.
462 If there are no more option characters, `getopt' returns -1.
464 that is not an option. (The ARGV-elements have been permuted
467 OPTSTRING is a string containing the legitimate option characters.
468 If an option character is seen that is not listed in OPTSTRING,
474 ARGV-element, is returned in `optarg'. Two colons mean an option that
479 handling the non-option ARGV-elements.
484 or is an exact match for some defined option. If they have an
485 argument, it follows the option name in the same ARGV-element, separated
486 from the option name by a `=', or else the in next ARGV-element.
487 When `getopt' finds a long-named option, it returns 0 if that option's
488 `flag' field is nonzero, the value of the option's `val' field
495 LONGOPTS is a vector of `struct option' terminated by an
498 LONGIND returns the index in LONGOPT of the long-named option found.
499 It is only valid when a long-named option has been found by the most
507 const struct option *longopts, int *longind, int long_only)
519 /* Test whether ARGV[optind] points to a non-option argument.
520 Either it does not have option syntax, or there is an environment flag
521 from the shell indicating it is not an option. The later information
561 Skip it like a null option,
562 then exchange with previous non-options as if it were an option,
563 then skip everything else like a non-option. */
590 /* If we have come to a non-option and did not permute it,
601 /* We have found another option-ARGV-element.
608 /* Decode the current option-ARGV-element. */
610 /* Check whether the ARGV-element is a long option.
613 a valid short option, don't consider it an abbreviated form of
614 a long option that starts with f. Otherwise there would be no
615 way to give the -f short option.
617 On the other hand, if there's a long option "fubar" and
619 the long option, just like "--fu", and not "-f" with arg "u".
628 const struct option *p;
629 const struct option *pfound = NULL;
666 fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
688 /* --option */
690 _("%s: option `--%s' doesn't allow an argument\n"),
693 /* +option or -option */
695 _("%s: option `%c%s' doesn't allow an argument\n"),
712 _("%s: option `%s' requires an argument\n"),
730 /* Can't find it as a long option. If this is not getopt_long_only,
731 or the option starts with '--' or is not a valid short
732 option, then it's an error.
733 Otherwise interpret it as a short option. */
740 /* --option */
741 fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
744 /* +option or -option */
745 fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
755 /* Look at and handle the next short option-character. */
771 fprintf (stderr, _("%s: illegal option -- %c\n"),
774 fprintf (stderr, _("%s: invalid option -- %c\n"),
780 /* Convenience. Treat POSIX -W foo same as long option --foo */
784 const struct option *p;
785 const struct option *pfound = NULL;
791 /* This is an option that requires an argument. */
804 fprintf (stderr, _("%s: option requires an argument -- %c\n"),
851 fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
870 %s: option `-W %s' doesn't allow an argument\n"),
885 _("%s: option `%s' requires an argument\n"),
908 /* This is an option that accepts an argument optionally. */
920 /* This is an option that requires an argument. */
934 _("%s: option requires an argument -- %c\n"),
958 (const struct option *) 0,
1000 printf ("option %c\n", c);
1004 printf ("option a\n");
1008 printf ("option b\n");
1012 printf ("option c with value `%s'\n", optarg);
1025 printf ("non-option ARGV-elements: ");