Lines Matching refs:opts
652 ZEND_ARG_INFO(0, opts) /* ARRAY_INFO(0, opts, 1) */
4185 static int parse_opts(char * opts, opt_struct ** result) argument
4190 for (i = 0; i < strlen(opts); i++) {
4191 if ((opts[i] >= 48 && opts[i] <= 57) ||
4192 (opts[i] >= 65 && opts[i] <= 90) ||
4193 (opts[i] >= 97 && opts[i] <= 122)
4202 while ( (*opts >= 48 && *opts <= 57) || /* 0 - 9 */
4203 (*opts >= 65 && *opts <= 90) || /* A - Z */
4204 (*opts >= 97 && *opts <= 122) /* a - z */
4206 paras->opt_char = *opts;
4207 paras->need_param = (*(++opts) == ':') ? 1 : 0;
4210 opts++;
4211 if (*opts == ':') {
4213 opts++;
4234 opt_struct *opts, *orig_opts; local
4287 len = parse_opts(options, &opts);
4297 opts = (opt_struct *) erealloc(opts, sizeof(opt_struct) * (len + count + 1));
4298 orig_opts = opts;
4299 opts += len;
4301 memset(opts, 0, count * sizeof(opt_struct));
4317 opts->need_param = 0;
4318 opts->opt_name = estrdup(Z_STRVAL_P(arg_ptr));
4319 len = strlen(opts->opt_name);
4320 if ((len > 0) && (opts->opt_name[len - 1] == ':')) {
4321 opts->need_param++;
4322 opts->opt_name[len - 1] = '\0';
4323 if ((len > 1) && (opts->opt_name[len - 2] == ':')) {
4324 opts->need_param++;
4325 opts->opt_name[len - 2] = '\0';
4328 opts->opt_char = 0;
4329 opts++;
4338 opts = (opt_struct*) erealloc(opts, sizeof(opt_struct) * (len + 1));
4339 orig_opts = opts;
4340 opts += len;
4344 opts->opt_char = '-';
4345 opts->need_param = 0;
4346 opts->opt_name = NULL;
4352 opts = orig_opts;
4354 while ((o = php_getopt(argc, argv, opts, &php_optarg, &php_optind, 0, 1)) != -1) {
4362 optname = opts[php_optidx].opt_name;