Lines Matching refs:opts
892 static int parse_opts(char * opts, opt_struct ** result) argument
896 unsigned int opts_len = (unsigned int)strlen(opts);
899 if ((opts[i] >= 48 && opts[i] <= 57) ||
900 (opts[i] >= 65 && opts[i] <= 90) ||
901 (opts[i] >= 97 && opts[i] <= 122)
910 while ( (*opts >= 48 && *opts <= 57) || /* 0 - 9 */
911 (*opts >= 65 && *opts <= 90) || /* A - Z */
912 (*opts >= 97 && *opts <= 122) /* a - z */
914 paras->opt_char = *opts;
915 paras->need_param = *(++opts) == ':';
918 opts++;
919 if (*opts == ':') {
921 opts++;
943 opt_struct *opts, *orig_opts; local
994 len = parse_opts(options, &opts);
1004 opts = (opt_struct *) safe_erealloc(opts, sizeof(opt_struct), (len + count + 1), 0);
1005 orig_opts = opts;
1006 opts += len;
1008 memset(opts, 0, count * sizeof(opt_struct));
1015 opts->need_param = 0;
1016 opts->opt_name = estrdup(ZSTR_VAL(arg_str));
1017 len = strlen(opts->opt_name);
1018 if ((len > 0) && (opts->opt_name[len - 1] == ':')) {
1019 opts->need_param++;
1020 opts->opt_name[len - 1] = '\0';
1021 if ((len > 1) && (opts->opt_name[len - 2] == ':')) {
1022 opts->need_param++;
1023 opts->opt_name[len - 2] = '\0';
1026 opts->opt_char = 0;
1027 opts++;
1032 opts = (opt_struct*) erealloc(opts, sizeof(opt_struct) * (len + 1));
1033 orig_opts = opts;
1034 opts += len;
1038 opts->opt_char = '-';
1039 opts->need_param = 0;
1040 opts->opt_name = NULL;
1046 opts = orig_opts;
1048 while ((o = php_getopt(argc, argv, opts, &php_optarg, &php_optind, 0, 1)) != -1) {
1056 optname = opts[php_optidx].opt_name;