Lines Matching refs:optind

58 …nt argc, char* const *argv, const opt_struct opts[], char **optarg, int *optind, int show_err, int…  in php_getopt()  argument
73 if (*optind >= argc) { in php_getopt()
77 if ((argv[*optind][0] != '-')) { in php_getopt()
80 if (!argv[*optind][1]) in php_getopt()
90 if ((argv[*optind][0] == '-') && (argv[*optind][1] == '-')) { in php_getopt()
92 int arg_end = strlen(argv[*optind])-1; in php_getopt()
95 if (argv[*optind][2] == '\0') { in php_getopt()
96 (*optind)++; in php_getopt()
103 if ((pos = php_memnstr(&argv[*optind][arg_start], "=", 1, argv[*optind]+arg_end)) != NULL) { in php_getopt()
104 arg_end = pos-&argv[*optind][arg_start]; in php_getopt()
113 (*optind)++; in php_getopt()
114 return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); in php_getopt()
115 …} else if (opts[php_optidx].opt_name && !strncmp(&argv[*optind][2], opts[php_optidx].opt_name, arg… in php_getopt()
129 if (argv[*optind][optchr] == ':') { in php_getopt()
131 (*optind)++; in php_getopt()
132 return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err)); in php_getopt()
140 int errind = *optind; in php_getopt()
143 if (!argv[*optind][optchr+1]) { in php_getopt()
145 (*optind)++; in php_getopt()
151 } else if (argv[*optind][optchr] == opts[php_optidx].opt_char) { in php_getopt()
160 if (!argv[*optind][arg_start]) { in php_getopt()
161 (*optind)++; in php_getopt()
162 if (*optind == argc) { in php_getopt()
165 return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); in php_getopt()
169 *optarg = argv[(*optind)++]; in php_getopt()
171 } else if (argv[*optind][arg_start] == '=') { in php_getopt()
173 *optarg = &argv[*optind][arg_start]; in php_getopt()
174 (*optind)++; in php_getopt()
176 *optarg = &argv[*optind][arg_start]; in php_getopt()
177 (*optind)++; in php_getopt()
182 if (arg_start >= 2 && !((argv[*optind][0] == '-') && (argv[*optind][1] == '-'))) { in php_getopt()
183 if (!argv[*optind][optchr+1]) in php_getopt()
186 (*optind)++; in php_getopt()
191 (*optind)++; in php_getopt()