Lines Matching refs:option

11    Free Software Foundation; either version 2, or (at your option) any
87 When `getopt' finds an option that takes an argument,
90 each non-option ARGV-element is returned here. */
101 non-option elements that the caller should itself scan.
109 /* The next char to be scanned in the option-element
110 in which the last option character we returned was found.
123 /* Set to an option character which was unrecognized.
129 /* Describe how to deal with options that follow non-option ARGV-elements.
136 stop option processing when the first non-option is seen.
140 of the list of option characters.
147 RETURN_IN_ORDER is an option available to programs that were written
149 the ordering of the two. We describe each non-option ARGV-element
150 as if it were the argument of an option with character code 1.
151 Using `-' as the first character of the list of option characters
154 The special argument `--' forces an end of option-scanning regardless
292 non-option ARGV-elements is empty. */
321 /* Scan elements of ARGV (whose length is ARGC) for option characters
325 then it is an option element. The characters of this element
326 (aside from the initial '-') are option characters. If `getopt'
327 is called repeatedly, it returns successively each of the option characters
328 from each of the option elements.
330 If `getopt' finds another option character, it returns that character,
332 resume the scan with the following option character or ARGV-element.
334 If there are no more option characters, `getopt' returns `EOF'.
336 that is not an option. (The ARGV-elements have been permuted
339 OPTSTRING is a string containing the legitimate option characters.
340 If an option character is seen that is not listed in OPTSTRING,
346 ARGV-element, is returned in `optarg'. Two colons mean an option that
351 handling the non-option ARGV-elements.
356 or is an exact match for some defined option. If they have an
357 argument, it follows the option name in the same ARGV-element, separated
358 from the option name by a `=', or else the in next ARGV-element.
359 When `getopt' finds a long-named option, it returns 0 if that option's
360 `flag' field is nonzero, the value of the option's `val' field
367 LONGOPTS is a vector of `struct option' terminated by an
370 LONGIND returns the index in LONGOPT of the long-named option found.
371 It is only valid when a long-named option has been found by the most
382 const struct option *longopts;
415 Skip it like a null option,
416 then exchange with previous non-options as if it were an option,
417 then skip everything else like a non-option. */
444 /* If we have come to a non-option and did not permute it,
455 /* We have found another option-ARGV-element.
462 /* Decode the current option-ARGV-element. */
464 /* Check whether the ARGV-element is a long option.
467 a valid short option, don't consider it an abbreviated form of
468 a long option that starts with f. Otherwise there would be no
469 way to give the -f short option.
471 On the other hand, if there's a long option "fubar" and
473 the long option, just like "--fu", and not "-f" with arg "u".
482 const struct option *p;
483 const struct option *pfound = NULL;
519 fprintf (stderr, "%s: option `%s' is ambiguous\n",
541 /* --option */
543 "%s: option `--%s' doesn't allow an argument\n",
546 /* +option or -option */
548 "%s: option `%c%s' doesn't allow an argument\n",
562 fprintf (stderr, "%s: option `%s' requires an argument\n",
579 /* Can't find it as a long option. If this is not getopt_long_only,
580 or the option starts with '--' or is not a valid short
581 option, then it's an error.
582 Otherwise interpret it as a short option. */
589 /* --option */
590 fprintf (stderr, "%s: unrecognized option `--%s'\n",
593 /* +option or -option */
594 fprintf (stderr, "%s: unrecognized option `%c%s'\n",
603 /* Look at and handle the next short option-character. */
619 fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
621 fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c);
630 /* This is an option that accepts an argument optionally. */
642 /* This is an option that requires an argument. */
655 fprintf (stderr, "%s: option requires an argument -- %c\n",
682 (const struct option *) 0,
726 printf ("option %c\n", c);
730 printf ("option a\n");
734 printf ("option b\n");
738 printf ("option c with value `%s'\n", optarg);
751 printf ("non-option ARGV-elements: ");