Lines Matching refs:optind
82 int optind = 1; variable
148 int top = d->optind; in exchange()
218 d->__first_nonopt += (d->optind - d->__last_nonopt); in exchange()
219 d->__last_nonopt = d->optind; in exchange()
233 d->__first_nonopt = d->__last_nonopt = d->optind; in _getopt_initialize()
357 if (d->optind == 0 || !d->__initialized) in _getopt_internal_r()
359 if (d->optind == 0) in _getopt_internal_r()
360 d->optind = 1; /* Don't scan ARGV[0], the program name. */ in _getopt_internal_r()
375 # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ in _getopt_internal_r()
376 || (d->optind < d->__nonoption_flags_len \ in _getopt_internal_r()
377 && __getopt_nonoption_flags[d->optind] == '1')) in _getopt_internal_r()
379 # define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') in _getopt_internal_r()
388 if (d->__last_nonopt > d->optind) in _getopt_internal_r()
389 d->__last_nonopt = d->optind; in _getopt_internal_r()
390 if (d->__first_nonopt > d->optind) in _getopt_internal_r()
391 d->__first_nonopt = d->optind; in _getopt_internal_r()
399 && d->__last_nonopt != d->optind) in _getopt_internal_r()
401 else if (d->__last_nonopt != d->optind) in _getopt_internal_r()
402 d->__first_nonopt = d->optind; in _getopt_internal_r()
407 while (d->optind < argc && NONOPTION_P) in _getopt_internal_r()
408 d->optind++; in _getopt_internal_r()
409 d->__last_nonopt = d->optind; in _getopt_internal_r()
417 if (d->optind != argc && !strcmp (argv[d->optind], "--")) in _getopt_internal_r()
419 d->optind++; in _getopt_internal_r()
422 && d->__last_nonopt != d->optind) in _getopt_internal_r()
425 d->__first_nonopt = d->optind; in _getopt_internal_r()
428 d->optind = argc; in _getopt_internal_r()
434 if (d->optind == argc) in _getopt_internal_r()
439 d->optind = d->__first_nonopt; in _getopt_internal_r()
450 d->optarg = argv[d->optind++]; in _getopt_internal_r()
457 d->__nextchar = (argv[d->optind] + 1 in _getopt_internal_r()
458 + (longopts != NULL && argv[d->optind][1] == '-')); in _getopt_internal_r()
477 && (argv[d->optind][1] == '-' in _getopt_internal_r()
478 || (long_only && (argv[d->optind][2] in _getopt_internal_r()
479 || !strchr (optstring, argv[d->optind][1]))))) in _getopt_internal_r()
548 argv[0], argv[d->optind]); in _getopt_internal_r()
577 argv[0], argv[d->optind]); in _getopt_internal_r()
589 d->optind++; in _getopt_internal_r()
604 d->optind++; in _getopt_internal_r()
620 if (argv[d->optind - 1][1] == '-') in _getopt_internal_r()
639 argv[0], argv[d->optind - 1][0], in _getopt_internal_r()
644 argv[0], argv[d->optind - 1][0], in _getopt_internal_r()
676 if (d->optind < argc) in _getopt_internal_r()
677 d->optarg = argv[d->optind++]; in _getopt_internal_r()
728 if (!long_only || argv[d->optind][1] == '-' in _getopt_internal_r()
738 if (argv[d->optind][1] == '-') in _getopt_internal_r()
754 argv[0], argv[d->optind][0], d->__nextchar); in _getopt_internal_r()
757 argv[0], argv[d->optind][0], d->__nextchar); in _getopt_internal_r()
779 d->optind++; in _getopt_internal_r()
793 ++d->optind; in _getopt_internal_r()
851 d->optind++; in _getopt_internal_r()
853 else if (d->optind == argc) in _getopt_internal_r()
892 d->optarg = argv[d->optind++]; in _getopt_internal_r()
955 d->optind++; in _getopt_internal_r()
1004 if (d->optind < argc) in _getopt_internal_r()
1005 d->optarg = argv[d->optind++]; in _getopt_internal_r()
1065 d->optind++; in _getopt_internal_r()
1079 d->optind++; in _getopt_internal_r()
1081 else if (d->optind == argc) in _getopt_internal_r()
1119 d->optarg = argv[d->optind++]; in _getopt_internal_r()
1134 getopt_data.optind = optind; in _getopt_internal()
1141 optind = getopt_data.optind; in _getopt_internal()
1190 int this_option_optind = optind ? optind : 1; in main()
1234 if (optind < argc) in main()
1237 while (optind < argc) in main()
1238 printf ("%s ", argv[optind++]); in main()