void clone_push_list (struct options *o) { if (o->push_list.head) { const struct push_entry *e = o->push_list.head; push_reset (o); while (e) { push_option_ex (o, string_alloc (e->option, &o->gc), true, M_FATAL); e = e->next; } } }
static bool push_option_fmt(struct gc_arena *gc, struct push_list *push_list, int msglevel, const char *format, ...) { va_list arglist; char tmp[256] = {0}; int len; va_start(arglist, format); len = vsnprintf(tmp, sizeof(tmp), format, arglist); va_end(arglist); if (len > sizeof(tmp)-1) { return false; } push_option_ex(gc, push_list, string_alloc(tmp, gc), true, msglevel); return true; }
void push_option(struct options *o, const char *opt, int msglevel) { push_option_ex(&o->gc, &o->push_list, opt, true, msglevel); }
void push_option (struct options *o, const char *opt, int msglevel) { push_option_ex (o, opt, true, msglevel); }