Lines Matching refs:option
147 const char* option = o->argv[o->optind]; in bc_opt_parseShort() local
155 option += o->subopt + 1; in bc_opt_parseShort()
156 o->optopt = option[0]; in bc_opt_parseShort()
159 type = bc_opt_type(longopts, option[0]); in bc_opt_parseShort()
174 str[0] = option[0]; in bc_opt_parseShort()
177 bc_opt_error(BC_ERR_FATAL_OPTION, option[0], str, true); in bc_opt_parseShort()
187 if (option[1]) o->subopt += 1; in bc_opt_parseShort()
195 ret = (int) option[0]; in bc_opt_parseShort()
205 bc_opt_error(BC_ERR_FATAL_OPTION, option[0], in bc_opt_parseShort()
206 bc_opt_longopt(longopts, option[0]), true); in bc_opt_parseShort()
221 if (option[1]) o->optarg = option + 1; in bc_opt_parseShort()
231 bc_opt_error(BC_ERR_FATAL_OPTION_NO_ARG, option[0], in bc_opt_parseShort()
232 bc_opt_longopt(longopts, option[0]), true); in bc_opt_parseShort()
235 ret = (int) option[0]; in bc_opt_parseShort()
252 bc_opt_longoptsMatch(const char* name, const char* option) in bc_opt_longoptsMatch() argument
254 const char* a = option; in bc_opt_longoptsMatch()
277 bc_opt_longoptsArg(const char* option) in bc_opt_longoptsArg() argument
280 for (; *option && *option != '='; ++option) in bc_opt_longoptsArg()
285 if (*option == '=') return option + 1; in bc_opt_longoptsArg()
293 const char* option; in bc_opt_parse() local
299 option = o->argv[o->optind]; in bc_opt_parse()
300 if (option == NULL) return -1; in bc_opt_parse()
302 empty = !strcmp(option, ""); in bc_opt_parse()
308 if (BC_OPT_ISDASHDASH(option)) in bc_opt_parse()
315 else if (BC_OPT_ISSHORTOPT(option)) return bc_opt_parseShort(o, longopts); in bc_opt_parse()
317 else if (!BC_OPT_ISLONGOPT(option)) return -1; in bc_opt_parse()
324 option += 2; in bc_opt_parse()
333 if (bc_opt_longoptsMatch(name, option)) in bc_opt_parse()
339 arg = bc_opt_longoptsArg(option); in bc_opt_parse()
378 bc_opt_error(BC_ERR_FATAL_OPTION, 0, option, false); in bc_opt_parse()