Lines Matching refs:optind

79    Otherwise, `optind' communicates from one call to the next
83 int optind = 1;
140 The other is elements [last_nonopt,optind), which contains all
151 int top = d->optind;
221 d->__first_nonopt += (d->optind - d->__last_nonopt);
222 d->__last_nonopt = d->optind;
236 d->__first_nonopt = d->__last_nonopt = d->optind;
303 updating `optind' and `nextchar' so that the next call to `getopt' can
307 Then `optind' is the index in ARGV of the first ARGV-element
361 if (d->optind == 0 || !d->__initialized)
363 if (d->optind == 0)
364 d->optind = 1; /* Don't scan ARGV[0], the program name. */
374 /* Test whether ARGV[optind] points to a non-option argument.
379 # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
380 || (d->optind < d->__nonoption_flags_len \
381 && __getopt_nonoption_flags[d->optind] == '1'))
383 # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
392 if (d->__last_nonopt > d->optind)
393 d->__last_nonopt = d->optind;
394 if (d->__first_nonopt > d->optind)
395 d->__first_nonopt = d->optind;
403 && d->__last_nonopt != d->optind)
405 else if (d->__last_nonopt != d->optind)
406 d->__first_nonopt = d->optind;
411 while (d->optind < argc && NONOPTION_P)
412 d->optind++;
413 d->__last_nonopt = d->optind;
421 if (d->optind != argc && !strcmp (argv[d->optind], "--"))
423 d->optind++;
426 && d->__last_nonopt != d->optind)
429 d->__first_nonopt = d->optind;
432 d->optind = argc;
438 if (d->optind == argc)
443 d->optind = d->__first_nonopt;
454 d->optarg = argv[d->optind++];
461 d->__nextchar = (argv[d->optind] + 1
462 + (longopts != NULL && argv[d->optind][1] == '-'));
481 && (argv[d->optind][1] == '-'
482 || (long_only && (argv[d->optind][2]
483 || !strchr (optstring, argv[d->optind][1])))))
532 argv[0], argv[d->optind]) >= 0)
548 argv[0], argv[d->optind]);
552 d->optind++;
560 d->optind++;
576 if (argv[d->optind - 1][1] == '-')
595 argv[0], argv[d->optind - 1][0],
600 argv[0], argv[d->optind - 1][0],
632 if (d->optind < argc)
633 d->optarg = argv[d->optind++];
684 if (!long_only || argv[d->optind][1] == '-'
694 if (argv[d->optind][1] == '-')
710 argv[0], argv[d->optind][0], d->__nextchar);
713 argv[0], argv[d->optind][0], d->__nextchar);
735 d->optind++;
747 /* Increment `optind' when we start to process its last character. */
749 ++d->optind;
804 d->optind++;
806 else if (d->optind == argc)
843 /* We already incremented `d->optind' once;
845 d->optarg = argv[d->optind++];
908 d->optind++;
957 if (d->optind < argc)
958 d->optarg = argv[d->optind++];
1016 d->optind++;
1030 d->optind++;
1032 else if (d->optind == argc)
1068 /* We already incremented `optind' once;
1070 d->optarg = argv[d->optind++];
1085 getopt_data.optind = optind;
1092 optind = getopt_data.optind;
1142 int this_option_optind = optind ? optind : 1;
1186 if (optind < argc)
1189 while (optind < argc)
1190 printf ("%s ", argv[optind++]);