Home | History | Annotate | Download | only in libiberty

Lines Matching defs:optind

128    Otherwise, `optind' communicates from one call to the next
132 int optind = 1;
134 /* Formerly, initialization of getopt depended on optind==0, which
187 `--' can cause `getopt' to return -1 with `optind' != ARGC. */
309 The other is elements [last_nonopt,optind), which contains all
324 int top = optind;
394 first_nonopt += (optind - last_nonopt);
395 last_nonopt = optind;
412 first_nonopt = last_nonopt = optind;
479 updating `optind' and `nextchar' so that the next call to `getopt' can
483 Then `optind' is the index in ARGV of the first ARGV-element
532 if (optind == 0 || !__getopt_initialized)
534 if (optind == 0)
535 optind = 1; /* Don't scan ARGV[0], the program name. */
540 /* Test whether ARGV[optind] points to a non-option argument.
545 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
546 || (optind < nonoption_flags_len \
547 && __getopt_nonoption_flags[optind] == '1'))
549 # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
556 /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
558 if (last_nonopt > optind)
559 last_nonopt = optind;
560 if (first_nonopt > optind)
561 first_nonopt = optind;
568 if (first_nonopt != last_nonopt && last_nonopt != optind)
570 else if (last_nonopt != optind)
571 first_nonopt = optind;
576 while (optind < argc && NONOPTION_P)
577 optind++;
578 last_nonopt = optind;
586 if (optind != argc && !strcmp (argv[optind], "--"))
588 optind++;
590 if (first_nonopt != last_nonopt && last_nonopt != optind)
593 first_nonopt = optind;
596 optind = argc;
602 if (optind == argc)
607 optind = first_nonopt;
618 optarg = argv[optind++];
625 nextchar = (argv[optind] + 1
626 + (longopts != NULL && argv[optind][1] == '-'));
645 && (argv[optind][1] == '-'
646 || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
688 argv[0], argv[optind]);
690 optind++;
698 optind++;
709 if (argv[optind - 1][1] == '-')
718 argv[0], argv[optind - 1][0], pfound->name);
729 if (optind < argc)
730 optarg = argv[optind++];
736 argv[0], argv[optind - 1]);
757 if (!long_only || argv[optind][1] == '-'
762 if (argv[optind][1] == '-')
769 argv[0], argv[optind][0], nextchar);
772 optind++;
784 /* Increment `optind' when we start to process its last character. */
786 ++optind;
820 optind++;
822 else if (optind == argc)
838 /* We already incremented `optind' once;
840 optarg = argv[optind++];
875 argv[0], argv[optind]);
877 optind++;
902 if (optind < argc)
903 optarg = argv[optind++];
909 argv[0], argv[optind - 1]);
935 optind++;
949 optind++;
951 else if (optind == argc)
967 /* We already incremented `optind' once;
969 optarg = argv[optind++];
1002 int this_option_optind = optind ? optind : 1;
1046 if (optind < argc)
1049 while (optind < argc)
1050 printf ("%s ", argv[optind++]);