Lines Matching refs:optind

100    Otherwise, `optind' communicates from one call to the next
104 int optind = 0;
153 `--' can cause `getopt' to return EOF with `optind' != ARGC. */
219 The other is elements [last_nonopt,optind), which contains all
231 int top = optind;
277 first_nonopt += (optind - last_nonopt);
278 last_nonopt = optind;
291 first_nonopt = last_nonopt = optind = 1;
328 updating `optind' and `nextchar' so that the next call to `getopt' can
332 Then `optind' is the index in ARGV of the first ARGV-element
385 if (optind == 0)
397 if (first_nonopt != last_nonopt && last_nonopt != optind)
399 else if (last_nonopt != optind)
400 first_nonopt = optind;
405 while (optind < argc
406 && (argv[optind][0] != '-' || argv[optind][1] == '\0'))
407 optind++;
408 last_nonopt = optind;
416 if (optind != argc && !strcmp (argv[optind], "--"))
418 optind++;
420 if (first_nonopt != last_nonopt && last_nonopt != optind)
423 first_nonopt = optind;
426 optind = argc;
432 if (optind == argc)
437 optind = first_nonopt;
444 if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
448 optarg = argv[optind++];
455 nextchar = (argv[optind] + 1
456 + (longopts != NULL && argv[optind][1] == '-'));
475 && (argv[optind][1] == '-'
476 || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
517 argv[0], argv[optind]);
519 optind++;
526 optind++;
537 if (argv[optind - 1][1] == '-')
546 argv[0], argv[optind - 1][0], pfound->name);
554 if (optind < argc)
555 optarg = argv[optind++];
560 argv[0], argv[optind - 1]);
580 if (!long_only || argv[optind][1] == '-'
585 if (argv[optind][1] == '-')
592 argv[0], argv[optind][0], nextchar);
595 optind++;
606 /* Increment `optind' when we start to process its last character. */
608 ++optind;
631 optind++;
645 optind++;
647 else if (optind == argc)
662 /* We already incremented `optind' once;
664 optarg = argv[optind++];
702 int this_option_optind = optind ? optind : 1;
746 if (optind < argc)
749 while (optind < argc)
750 printf ("%s ", argv[optind++]);