Home | History | Annotate | Download | only in lib

Lines Matching full:option

12    (at your option) any later version.
66 When `getopt' finds an option that takes an argument,
69 each non-option ARGV-element is returned here. */
80 non-option elements that the caller should itself scan.
93 /* Set to an option character which was unrecognized.
236 non-option ARGV-elements is empty. */
295 /* Scan elements of ARGV (whose length is ARGC) for option characters
299 then it is an option element. The characters of this element
300 (aside from the initial '-') are option characters. If `getopt'
301 is called repeatedly, it returns successively each of the option characters
302 from each of the option elements.
304 If `getopt' finds another option character, it returns that character,
306 resume the scan with the following option character or ARGV-element.
308 If there are no more option characters, `getopt' returns -1.
310 that is not an option. (The ARGV-elements have been permuted
313 OPTSTRING is a string containing the legitimate option characters.
314 If an option character is seen that is not listed in OPTSTRING,
320 ARGV-element, is returned in `optarg'. Two colons mean an option that
325 handling the non-option ARGV-elements.
330 or is an exact match for some defined option. If they have an
331 argument, it follows the option name in the same ARGV-element, separated
332 from the option name by a `=', or else the in next ARGV-element.
333 When `getopt' finds a long-named option, it returns 0 if that option's
334 `flag' field is nonzero, the value of the option's `val' field
337 LONGOPTS is a vector of `struct option' terminated by an
340 LONGIND returns the index in LONGOPT of the long-named option found.
341 It is only valid when a long-named option has been found by the most
352 const struct option *longopts, int *longind,
373 /* Test whether ARGV[optind] points to a non-option argument.
374 Either it does not have option syntax, or there is an environment flag
375 from the shell indicating it is not an option. The later information
416 Skip it like a null option,
417 then exchange with previous non-options as if it were an option,
418 then skip everything else like a non-option. */
446 /* If we have come to a non-option and did not permute it,
457 /* We have found another option-ARGV-element.
464 /* Decode the current option-ARGV-element. */
466 /* Check whether the ARGV-element is a long option.
469 a valid short option, don't consider it an abbreviated form of
470 a long option that starts with f. Otherwise there would be no
471 way to give the -f short option.
473 On the other hand, if there's a long option "fubar" and
475 the long option, just like "--fu", and not "-f" with arg "u".
485 const struct option *p;
486 const struct option *pfound = NULL;
530 if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
546 fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
577 /* --option */
580 %s: option `--%s' doesn't allow an argument\n"),
584 %s: option `--%s' doesn't allow an argument\n"),
590 /* +option or -option */
593 %s: option `%c%s' doesn't allow an argument\n"),
598 %s: option `%c%s' doesn't allow an argument\n"),
641 %s: option `%s' requires an argument\n"),
659 _("%s: option `%s' requires an argument\n"),
679 /* Can't find it as a long option. If this is not getopt_long_only,
680 or the option starts with '--' or is not a valid short
681 option, then it's an error.
682 Otherwise interpret it as a short option. */
695 /* --option */
697 n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
700 fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
706 /* +option or -option */
708 n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
711 fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
740 /* Look at and handle the next short option-character. */
763 n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
766 fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
772 n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
775 fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
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. */
827 _("%s: option requires an argument -- %c\n"),
843 fprintf (stderr, _("%s: option requires an argument -- %c\n"),
896 if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
912 fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
937 %s: option `-W %s' doesn't allow an argument\n"),
955 %s: option `-W %s' doesn't allow an argument\n"),
976 %s: option `%s' requires an argument\n"),
994 _("%s: option `%s' requires an argument\n"),
1019 /* This is an option that accepts an argument optionally. */
1031 /* This is an option that requires an argument. */
1048 %s: option requires an argument -- %c\n"),
1065 _("%s: option requires an argument -- %c\n"),
1088 const struct option *longopts, int *longind,
1157 printf ("option %c\n", c);
1161 printf ("option a\n");
1165 printf ("option b\n");
1169 printf ("option c with value `%s'\n", optarg);
1182 printf ("non-option ARGV-elements: ");