Lines Matching defs:new
231 struct opts *new = 0;
259 // Allocate a new list entry when necessary
260 if (!new) {
261 new = xzalloc(sizeof(struct opts));
262 new->next = gof->opts;
263 gof->opts = new;
264 new->val[0].l = LONG_MIN;
265 new->val[1].l = LONG_MAX;
269 if (*options == '(' && new->c != -1) {
277 // init a new struct longopts
280 lo->opt = new;
287 if (!new->c) new->c = -1;
291 // If this is the start of a new option that wasn't a longopt,
294 if (CFG_TOYBOX_DEBUG && new->type)
295 error_exit("multiple types %c:%c%c", new->c, new->type, *options);
296 new->type = *options;
297 } else if (-1 != (idx = stridx("|^ ;", *options))) new->flags |= 1<<idx;
300 if (new->type == '#') {
302 if (temp != options) new->val[idx].l = l;
303 } else if (CFG_TOYBOX_FLOAT && new->type == '.') {
305 if (temp != options) new->val[idx].f = f;
310 // current character is the start of a new option. If we've already
311 // assigned an option to this struct, loop to allocate a new one.
313 } else if (new->c) {
314 new = 0;
318 } else new->c = *options;
326 for (new = gof->opts; new; new = new->next) {
329 if (new->c == 1) new->c = 0;
330 new->dex[1] = u;
331 if (new->flags & 1) gof->requires |= u;
332 if (new->type) {
333 new->arg = (void *)nextarg;
334 *(nextarg++) = new->val[2].l;