Lines Matching refs:optind

57 …nt argc, char* const *argv, const opt_struct opts[], char **optarg, int *optind, int show_err, int…  in php_getopt()  argument
72 if (*optind >= argc) { in php_getopt()
76 if ((argv[*optind][0] != '-')) { in php_getopt()
79 if (!argv[*optind][1]) in php_getopt()
89 if ((argv[*optind][0] == '-') && (argv[*optind][1] == '-')) { in php_getopt()
91 size_t arg_end = strlen(argv[*optind])-1; in php_getopt()
94 if (argv[*optind][2] == '\0') { in php_getopt()
95 (*optind)++; in php_getopt()
102 if ((pos = php_memnstr(&argv[*optind][arg_start], "=", 1, argv[*optind]+arg_end)) != NULL) { in php_getopt()
103 arg_end = pos-&argv[*optind][arg_start]; in php_getopt()
112 (*optind)++; in php_getopt()
113 return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); in php_getopt()
114 …} else if (opts[php_optidx].opt_name && !strncmp(&argv[*optind][2], opts[php_optidx].opt_name, arg… in php_getopt()
128 if (argv[*optind][optchr] == ':') { in php_getopt()
130 (*optind)++; in php_getopt()
131 return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err)); in php_getopt()
139 int errind = *optind; in php_getopt()
142 if (!argv[*optind][optchr+1]) { in php_getopt()
144 (*optind)++; in php_getopt()
150 } else if (argv[*optind][optchr] == opts[php_optidx].opt_char) { in php_getopt()
159 if (!argv[*optind][arg_start]) { in php_getopt()
160 (*optind)++; in php_getopt()
161 if (*optind == argc) { in php_getopt()
164 return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); in php_getopt()
168 *optarg = argv[(*optind)++]; in php_getopt()
170 } else if (argv[*optind][arg_start] == '=') { in php_getopt()
172 *optarg = &argv[*optind][arg_start]; in php_getopt()
173 (*optind)++; in php_getopt()
175 *optarg = &argv[*optind][arg_start]; in php_getopt()
176 (*optind)++; in php_getopt()
181 if (arg_start >= 2 && !((argv[*optind][0] == '-') && (argv[*optind][1] == '-'))) { in php_getopt()
182 if (!argv[*optind][optchr+1]) in php_getopt()
185 (*optind)++; in php_getopt()
190 (*optind)++; in php_getopt()