Home | History | Annotate | Download | only in make-3.81

Lines Matching full:argv

92    As `getopt' works, it permutes the elements of ARGV so that,
108 each non-option ARGV-element is returned here. */
112 /* Index in ARGV of the next element to be scanned.
122 how much of ARGV has been scanned so far. */
138 by advancing to the next ARGV-element. */
153 /* Describe how to deal with options that follow non-option ARGV-elements.
166 PERMUTE is the default. We permute the contents of ARGV as we scan,
172 to expect options and other ARGV-elements in any order and that care about
173 the ordering of the two. We describe each non-option ARGV-element
242 /* Describe the part of ARGV that contains non-options that have
243 been skipped. `first_nonopt' is the index in ARGV of the first of them;
251 indicating ARGV elements that should not be considered arguments. */
263 is valid for the getopt call we must make sure that the ARGV passed
266 store_args_and_env (int argc, char *const *argv)
271 original_argv = argv;
288 /* Exchange two adjacent subsequences of ARGV.
295 the new indices of the non-options in ARGV after they are moved. */
302 exchange (char **argv)
347 tem = argv[bottom + i];
348 argv[bottom + i] = argv[top - (middle - bottom) + i];
349 argv[top - (middle - bottom) + i] = tem;
364 tem = argv[bottom + i];
365 argv[bottom + i] = argv[middle + i];
366 argv[middle + i] = tem;
386 _getopt_initialize (int argc, char *const *argv, const char *optstring)
388 /* Start processing options with ARGV-element 1 (since ARGV-element 0
390 non-option ARGV-elements is empty. */
417 && argc == original_argc && argv == original_argv)
449 /* Scan elements of ARGV (whose length is ARGC) for option characters
452 If an element of ARGV starts with '-', and is not exactly "-" or "--",
460 resume the scan with the following option character or ARGV-element.
463 Then `optind' is the index in ARGV of the first ARGV-element
464 that is not an option. (The ARGV-elements have been permuted
473 so the following text in the same ARGV-element, or the text of the following
474 ARGV-element, is returned in `optarg'. Two colons mean an option that
475 wants an optional arg; if there is text in the current ARGV-element,
479 handling the non-option ARGV-elements.
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.
491 The elements of ARGV
506 _getopt_internal (int argc, char *const *argv, const char *optstring,
514 optind = 1; /* Don't scan ARGV[0], the program name. */
515 optstring = _getopt_initialize (argc, argv, optstring);
519 /* Test whether ARGV[optind] points to a non-option argument.
524 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
528 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
533 /* Advance to the next ARGV-element. */
548 exchange ((char **) argv);
560 /* The special ARGV-element `--' means premature end of options.
565 if (optind != argc && !strcmp (argv[optind], "--"))
570 exchange ((char **) argv);
578 /* If we have done all the ARGV-elements, stop the scan
597 optarg = argv[optind++];
601 /* We have found another option-ARGV-element.
604 nextchar = (argv[optind] + 1
605 + (longopts != NULL && argv[optind][1] == '-'));
608 /* Decode the current option-ARGV-element. */
610 /* Check whether the ARGV-element is a long option.
612 If long_only and the ARGV-element has the form "-f", where f is
618 the ARGV-element is "-fu", do consider that an abbreviation of
624 && (argv[optind][1] == '-'
625 || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
667 argv[0], argv[optind]);
687 if (argv[optind - 1][1] == '-')
691 argv[0], pfound->name);
696 argv[0], argv[optind - 1][0], pfound->name);
707 optarg = argv[optind++];
713 argv[0], argv[optind - 1]);
734 if (!long_only || argv[optind][1] == '-'
739 if (argv[optind][1] == '-')
742 argv[0], nextchar);
746 argv[0], argv[optind][0], nextchar);
772 argv[0], c);
775 argv[0], c);
795 /* If we end this ARGV-element by taking the rest as an arg,
805 argv[0], c);
816 increment it again when taking next ARGV-elt as argument. */
817 optarg = argv[optind++];
852 argv[0], argv[optind]);
871 argv[0], pfound->name);
880 optarg = argv[optind++];
886 argv[0], argv[optind - 1]);
924 /* If we end this ARGV-element by taking the rest as an arg,
935 argv[0], c);
945 increment it again when taking next ARGV-elt as argument. */
946 optarg = argv[optind++];
955 getopt (int argc, char *const *argv, const char *optstring)
957 return _getopt_internal (argc, argv, optstring,
972 main (int argc, char **argv)
981 c = getopt (argc, argv, "abc:d:0123456789");
998 printf ("digits occur in two different argv-elements.\n");
1025 printf ("non-option ARGV-elements: ");
1027 printf ("%s ", argv[optind++]);