Lines Matching refs:optind
55 …nt argc, char* const *argv, const opt_struct opts[], char **optarg, int *optind, int show_err, int… in php_getopt() argument
70 if (*optind >= argc) { in php_getopt()
74 if ((argv[*optind][0] != '-')) { in php_getopt()
77 if (!argv[*optind][1]) in php_getopt()
87 if ((argv[*optind][0] == '-') && (argv[*optind][1] == '-')) { in php_getopt()
89 size_t arg_end = strlen(argv[*optind])-1; in php_getopt()
92 if (argv[*optind][2] == '\0') { in php_getopt()
93 (*optind)++; in php_getopt()
100 if ((pos = php_memnstr(&argv[*optind][arg_start], "=", 1, argv[*optind]+arg_end)) != NULL) { in php_getopt()
101 arg_end = pos-&argv[*optind][arg_start]; in php_getopt()
110 (*optind)++; in php_getopt()
111 return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); in php_getopt()
112 …} else if (opts[php_optidx].opt_name && !strncmp(&argv[*optind][2], opts[php_optidx].opt_name, arg… in php_getopt()
126 if (argv[*optind][optchr] == ':') { in php_getopt()
128 (*optind)++; in php_getopt()
129 return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err)); in php_getopt()
137 int errind = *optind; in php_getopt()
140 if (!argv[*optind][optchr+1]) { in php_getopt()
142 (*optind)++; in php_getopt()
148 } else if (argv[*optind][optchr] == opts[php_optidx].opt_char) { in php_getopt()
157 if (!argv[*optind][arg_start]) { in php_getopt()
158 (*optind)++; in php_getopt()
159 if (*optind == argc) { in php_getopt()
162 return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); in php_getopt()
166 *optarg = argv[(*optind)++]; in php_getopt()
168 } else if (argv[*optind][arg_start] == '=') { in php_getopt()
170 *optarg = &argv[*optind][arg_start]; in php_getopt()
171 (*optind)++; in php_getopt()
173 *optarg = &argv[*optind][arg_start]; in php_getopt()
174 (*optind)++; in php_getopt()
179 if (arg_start >= 2 && !((argv[*optind][0] == '-') && (argv[*optind][1] == '-'))) { in php_getopt()
180 if (!argv[*optind][optchr+1]) in php_getopt()
183 (*optind)++; in php_getopt()
188 (*optind)++; in php_getopt()