Lines Matching refs:argv
31 static int php_opt_error(int argc, char * const *argv, int oint, int optchr, int err, int show_err)… in php_opt_error() argument
42 fprintf(stderr, "option not found %c\n", argv[oint][optchr]); in php_opt_error()
45 fprintf(stderr, "no argument for option %c\n", argv[oint][optchr]); in php_opt_error()
58 PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char **optarg, int *opt… in php_getopt() argument
69 if ((argv[*optind][0] != '-')) { in php_getopt()
72 if (!argv[*optind][1]) in php_getopt()
82 if ((argv[*optind][0] == '-') && (argv[*optind][1] == '-')) { in php_getopt()
84 int arg_end = strlen(argv[*optind])-1; in php_getopt()
87 if (argv[*optind][2] == '\0') { in php_getopt()
95 if ((pos = php_memnstr(&argv[*optind][arg_start], "=", 1, argv[*optind]+arg_end)) != NULL) { in php_getopt()
96 arg_end = pos-&argv[*optind][arg_start]; in php_getopt()
106 return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); in php_getopt()
107 …} else if (opts[php_optidx].opt_name && !strncmp(&argv[*optind][2], opts[php_optidx].opt_name, arg… in php_getopt()
121 if (argv[*optind][optchr] == ':') { in php_getopt()
124 return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err)); in php_getopt()
135 if (!argv[*optind][optchr+1]) { in php_getopt()
142 return(php_opt_error(argc, argv, errind, errchr, OPTERRNF, show_err)); in php_getopt()
143 } else if (argv[*optind][optchr] == opts[php_optidx].opt_char) { in php_getopt()
152 if (!argv[*optind][arg_start]) { in php_getopt()
157 return(php_opt_error(argc, argv, *optind-1, optchr, OPTERRARG, show_err)); in php_getopt()
161 *optarg = argv[(*optind)++]; in php_getopt()
163 } else if (argv[*optind][arg_start] == '=') { in php_getopt()
165 *optarg = &argv[*optind][arg_start]; in php_getopt()
168 *optarg = &argv[*optind][arg_start]; in php_getopt()
174 if (arg_start >= 2 && !((argv[*optind][0] == '-') && (argv[*optind][1] == '-'))) { in php_getopt()
175 if (!argv[*optind][optchr+1]) in php_getopt()