Lines Matching defs: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')
390 /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
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 optind][1] == '-'));
481 && (argv[d->optind][1] == '-'
482 || (long_only && (argv[d->optind][2]
483 || !strchr (optstring, argv[d->optind][1])))))
552 argv[0], argv[d->optind]);
581 argv[0], argv[d->optind]);
593 d->optind++;
608 d->optind++;
624 if (argv[d->optind - 1][1] == '-')
643 argv[0], argv[d->optind - 1][0],
648 argv[0], argv[d->optind - 1][0],
680 if (d->optind < argc)
681 d->optarg = argv[d->optind++];
732 if (!long_only || argv[d->optind][1] == '-'
742 if (argv[d->optind][1] == '-')
758 argv[0], argv[d->optind][0], d->__nextchar);
761 argv[0], argv[d->optind][0], d->__nextchar);
783 d->optind++;
795 /* Increment 'optind' when we start to process its last character. */
797 ++d->optind;
855 d->optind++;
857 else if (d->optind == argc)
894 /* We already incremented 'd->optind' once;
896 d->optarg = argv[d->optind++];
959 d->optind++;
1008 if (d->optind < argc)
1009 d->optarg = argv[d->optind++];
1069 d->optind++;
1083 d->optind++;
1085 else if (d->optind == argc)
1121 /* We already incremented 'optind' once;
1123 d->optarg = argv[d->optind++];
1138 getopt_data.optind = optind;
1145 optind = getopt_data.optind;
1195 int this_option_optind = optind ? optind : 1;
1239 if (optind < argc)
1242 while (optind < argc)
1243 printf ("%s ", argv[optind++]);