args->list = xrealloc(args->list, args->nalloc * sizeof(char *));
args->list = xrealloc(args->list, nalloc * sizeof(char *)); args->nalloc = nalloc;
addargs(arglist *args, char *fmt, ...){	va_list ap;	char buf[1024];	va_start(ap, fmt);	vsnprintf(buf, sizeof(buf), fmt, ap);	va_end(ap);	if (args->list == NULL) {		args->nalloc = 32;		args->num = 0;	} else if (args->num+2 >= args->nalloc)		args->nalloc *= 2;	args->list = xrealloc(args->list, args->nalloc * sizeof(char *));	args->list[args->num++] = xstrdup(buf);	args->list[args->num] = NULL;}