return (-1); p = buf + size - 1; retval = kprintf(fmt, TOBUFONLY, &p, buf, ap); *(p) = 0;
p = buf; retval = kprintf(fmt, TOBUFONLY | TOCOUNT, &p, buf, ap); if (size > 0) *(p) = 0;
vsnprintf(buf, size, fmt, ap)	char *buf;	size_t size;	const char *fmt;	va_list ap;{	int retval;	char *p;	if (size < 1)		return (-1);	p = buf + size - 1;	retval = kprintf(fmt, TOBUFONLY, &p, buf, ap);	*(p) = 0;	/* null terminate */	return(retval);}