Lines Matching defs:optind
82 Otherwise, `optind' communicates from one call to the next
86 int optind = 1;
143 The other is elements [last_nonopt,optind), which contains all
154 int top = d->optind;
224 d->__first_nonopt += (d->optind - d->__last_nonopt);
225 d->__last_nonopt = d->optind;
238 d->__first_nonopt = d->__last_nonopt = d->optind;
305 updating `optind' and `nextchar' so that the next call to `getopt' can
309 Then `optind' is the index in ARGV of the first ARGV-element
364 if (d->optind == 0 || !d->__initialized)
366 if (d->optind == 0)
367 d->optind = 1; /* Don't scan ARGV[0], the program name. */
373 /* Test whether ARGV[optind] points to a non-option argument.
378 # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
379 || (d->optind < d->__nonoption_flags_len \
380 && __getopt_nonoption_flags[d->optind] == '1'))
382 # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
389 /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
391 if (d->__last_nonopt > d->optind)
392 d->__last_nonopt = d->optind;
393 if (d->__first_nonopt > d->optind)
394 d->__first_nonopt = d->optind;
402 && d->__last_nonopt != d->optind)
404 else if (d->__last_nonopt != d->optind)
405 d->__first_nonopt = d->optind;
410 while (d->optind < argc && NONOPTION_P)
411 d->optind++;
412 d->__last_nonopt = d->optind;
420 if (d->optind != argc && !strcmp (argv[d->optind], "--"))
422 d->optind++;
425 && d->__last_nonopt != d->optind)
428 d->__first_nonopt = d->optind;
431 d->optind = argc;
437 if (d->optind == argc)
442 d->optind = d->__first_nonopt;
453 d->optarg = argv[d->optind++];
460 d->__nextchar = (argv[d->optind] + 1
461 + (longopts != NULL && argv[d->optind][1] == '-'));
480 && (argv[d->optind][1] == '-'
481 || (long_only && (argv[d->optind][2]
482 || !strchr (optstring, argv[d->optind][1])))))
531 argv[0], argv[d->optind]) >= 0)
547 argv[0], argv[d->optind]);
551 d->optind++;
559 d->optind++;
575 if (argv[d->optind - 1][1] == '-')
594 argv[0], argv[d->optind - 1][0],
599 argv[0], argv[d->optind - 1][0],
631 if (d->optind < argc)
632 d->optarg = argv[d->optind++];
642 argv[0], argv[d->optind - 1]) >= 0)
660 argv[0], argv[d->optind - 1]);
683 if (!long_only || argv[d->optind][1] == '-'
693 if (argv[d->optind][1] == '-')
709 argv[0], argv[d->optind][0], d->__nextchar);
712 argv[0], argv[d->optind][0], d->__nextchar);
734 d->optind++;
746 /* Increment `optind' when we start to process its last character. */
748 ++d->optind;
816 d->optind++;
818 else if (d->optind == argc)
855 /* We already incremented `d->optind' once;
857 d->optarg = argv[d->optind++];
897 argv[0], argv[d->optind]) >= 0)
913 argv[0], argv[d->optind]);
917 d->optind++;
966 if (d->optind < argc)
967 d->optarg = argv[d->optind++];
977 argv[0], argv[d->optind - 1]) >= 0)
995 argv[0], argv[d->optind - 1]);
1023 d->optind++;
1037 d->optind++;
1039 else if (d->optind == argc)
1076 /* We already incremented `optind' once;
1078 d->optarg = argv[d->optind++];
1093 getopt_data.optind = optind;
1099 optind = getopt_data.optind;
1136 int this_option_optind = optind ? optind : 1;
1180 if (optind < argc)
1183 while (optind < argc)
1184 printf ("%s ", argv[optind++]);