Lines Matching defs:option
87 char *option = o->argv[o->optind];
93 option += o->subopt + 1;
94 o->optopt = option[0];
96 type = bc_opt_type(longopts, option[0]);
110 str[0] = option[0];
113 bc_opt_error(BC_ERR_FATAL_OPTION, option[0], str);
121 if (option[1]) o->subopt += 1;
127 ret = (int) option[0];
136 if (option[1]) o->optarg = option + 1;
141 else bc_opt_error(BC_ERR_FATAL_OPTION_NO_ARG, option[0],
142 bc_opt_longopt(longopts, option[0]));
145 ret = (int) option[0];
153 static bool bc_opt_longoptsMatch(const char *name, const char *option) {
155 const char *a = option, *n = name;
166 static char* bc_opt_longoptsArg(char *option) {
168 for (; *option && *option != '='; ++option);
170 if (*option == '=') return option + 1;
177 char *option;
182 option = o->argv[o->optind];
183 if (option == NULL) return -1;
185 empty = !strcmp(option, "");
190 if (BC_OPT_ISDASHDASH(option)) {
196 else if (BC_OPT_ISSHORTOPT(option)) return bc_opt_parseShort(o, longopts);
197 else if (!BC_OPT_ISLONGOPT(option)) return -1;
202 // Skip "--" at beginning of the option.
203 option += 2;
210 if (bc_opt_longoptsMatch(name, option)) {
215 arg = bc_opt_longoptsArg(option);
242 bc_opt_error(BC_ERR_FATAL_OPTION, 0, option);