Lines Matching refs:optind
18 The external variable optind is the index of the next array element of argv
72 getopt() and friends to return EOF with optind != argc.
106 int optind = 0;
164 if (optind >= argc || argv[optind] == NULL)
166 if (strcmp (argv[optind], "--") == 0)
168 optind++;
172 if (optind == 0)
173 optind = optwhere = 1;
193 permute_from = optind;
195 while (!is_option (argv[optind], only))
197 optind++;
200 if (argv[optind] == NULL)
203 optind = permute_from;
206 else if (strcmp (argv[optind], "--") == 0)
210 optind = permute_from + 1;
215 if (!is_option (argv[optind], only))
217 optarg = argv[optind++];
222 if (!is_option (argv[optind], only))
231 && (memcmp (argv[optind], "--", 2) == 0
232 || (only && argv[optind][0] == '+')) && optwhere == 1)
235 if (memcmp (argv[optind], "--", 2) == 0)
238 possible_arg = strchr (argv[optind] + optwhere, '=');
242 match_chars = strlen (argv[optind]);
243 possible_arg = argv[optind] + match_chars;
247 match_chars = (possible_arg - argv[optind]) - optwhere;
250 if (memcmp (argv[optind] + optwhere,
271 argv[optind],
285 cp = strchr (shortopts, argv[optind][optwhere]);
292 argv[0], argv[optind][optwhere]);
294 if (argv[optind][optwhere] == '\0')
296 optind++;
303 possible_arg = argv[optind] + optwhere + 1;
329 else if (optind + 1 >= argc)
339 optind++;
344 optarg = argv[optind + 1];
353 if (argv[optind][optwhere] == '\0')
362 /* do we have to permute or otherwise modify optind? */
366 optind = permute_from + 1 + arg_next;
369 optind = optind + 1 + arg_next;