Lines Matching refs:optind

122    Otherwise, `optind' communicates from one call to the next
126 int optind = 0;
175 `--' can cause `getopt' to return EOF with `optind' != ARGC. */
247 The other is elements [last_nonopt,optind), which contains all
263 int top = optind;
309 first_nonopt += (optind - last_nonopt);
310 last_nonopt = optind;
326 first_nonopt = last_nonopt = optind = 1;
378 updating `optind' and `nextchar' so that the next call to `getopt' can
382 Then `optind' is the index in ARGV of the first ARGV-element
435 if (optind == 0)
438 optind = 1; /* Don't scan ARGV[0], the program name. */
441 /* Test whether ARGV[optind] points to a non-option argument.
444 #define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
445 || (optind < nonoption_flags_len \
446 && nonoption_flags[optind] == '1'))
454 if (last_nonopt > optind)
455 last_nonopt = optind;
456 if (first_nonopt > optind)
457 first_nonopt = optind;
464 if (first_nonopt != last_nonopt && last_nonopt != optind)
466 else if (last_nonopt != optind)
467 first_nonopt = optind;
472 while (optind < argc && NONOPTION_P)
473 optind++;
474 last_nonopt = optind;
482 if (optind != argc && !strcmp (argv[optind], "--"))
484 optind++;
486 if (first_nonopt != last_nonopt && last_nonopt != optind)
489 first_nonopt = optind;
492 optind = argc;
498 if (optind == argc)
503 optind = first_nonopt;
514 optarg = argv[optind++];
521 nextchar = (argv[optind] + 1
522 + (longopts != NULL && argv[optind][1] == '-'));
541 && (argv[optind][1] == '-'
542 || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
583 argv[0], argv[optind]);
585 optind++;
593 optind++;
603 if (argv[optind - 1][1] == '-')
612 argv[0], argv[optind - 1][0], pfound->name);
622 if (optind < argc)
623 optarg = argv[optind++];
629 argv[0], argv[optind - 1]);
650 if (!long_only || argv[optind][1] == '-'
655 if (argv[optind][1] == '-')
662 argv[0], argv[optind][0], nextchar);
665 optind++;
677 /* Increment `optind' when we start to process its last character. */
679 ++optind;
704 optind++;
718 optind++;
720 else if (optind == argc)
736 /* We already incremented `optind' once;
738 optarg = argv[optind++];
776 int this_option_optind = optind ? optind : 1;
820 if (optind < argc)
823 while (optind < argc)
824 printf ("%s ", argv[optind++]);