• Home
  • Raw
  • Download

Lines Matching refs:opt

115   struct opts *opt;  member
132 static int gotflag(struct getoptflagstate *gof, struct opts *opt) in gotflag() argument
137 if (!opt) { in gotflag()
143 if (toys.optflags & opt->dex[0]) { in gotflag()
149 if (clr->arg && (i & toys.optflags & opt->dex[0])) *clr->arg = 0; in gotflag()
150 toys.optflags &= ~opt->dex[0]; in gotflag()
154 toys.optflags |= opt->dex[1]; in gotflag()
155 gof->excludes |= opt->dex[2]; in gotflag()
156 if (opt->flags&2) gof->stopearly=2; in gotflag()
163 if (opt == bad || !(i & toys.optflags)) continue; in gotflag()
166 if (bad) help_exit("No '%c' with '%c'", opt->c, bad->c); in gotflag()
171 if (opt->flags & 8) return 0; in gotflag()
174 type = opt->type; in gotflag()
176 if (type == '@') ++*(opt->arg); in gotflag()
184 if (gof->nodash_now || (!arg[0] && !(opt->flags & 8))) in gotflag()
190 if (opt->c != -1) help_exit("%s-%c", s, opt->c); in gotflag()
192 for (lo = gof->longopts; lo->opt != opt; lo = lo->next); in gotflag()
196 if (type == ':') *(opt->arg) = (long)arg; in gotflag()
200 list = (struct arg_list **)opt->arg; in gotflag()
207 if (l < opt->val[0].l) help_exit("-%c < %ld", opt->c, opt->val[0].l); in gotflag()
208 if (l > opt->val[1].l) help_exit("-%c > %ld", opt->c, opt->val[1].l); in gotflag()
210 *(opt->arg) = l; in gotflag()
212 FLOAT *f = (FLOAT *)(opt->arg); in gotflag()
215 if (opt->val[0].l != LONG_MIN && *f < opt->val[0].f) in gotflag()
216 help_exit("-%c < %lf", opt->c, (double)opt->val[0].f); in gotflag()
217 if (opt->val[1].l != LONG_MAX && *f > opt->val[1].f) in gotflag()
218 help_exit("-%c > %lf", opt->c, (double)opt->val[1].f); in gotflag()
282 lo->opt = new; in parse_optflaglist()
353 struct opts *opt; in parse_optflaglist() local
358 for (i=0, opt = gof->opts; ; i++, opt = opt->next) { in parse_optflaglist()
360 if (!opt) break; in parse_optflaglist()
361 if (bits&(1<<i)) opt->dex[idx] |= bits&~(1<<i); in parse_optflaglist()
364 if (CFG_TOYBOX_DEBUG && !opt) in parse_optflaglist()
366 if (opt->c == *options) { in parse_optflaglist()
425 else if (gof.arg[lo->len] == '=' && lo->opt->type) in get_optflags()
429 catch = lo->opt; in get_optflags()