return;
return ((bp - buf) - 1);
vsprintf(char *buf, const char *cfmt, va_list ap)#elsevsprintf(buf, cfmt, ap)	char *buf, *cfmt;	va_list ap;#endif{	register const char *fmt = cfmt;	register char *p, *bp;	register int ch, base;	u_long ul;	int lflag, tmp, width;	char padc;	for (bp = buf; ; ) {		padc = ' ';		width = 0;		while ((ch = *(u_char *)fmt++) != '%')			if ((*bp++ = ch) == '\0')				return ((bp - buf) - 1);		lflag = 0;reswitch:	switch (ch = *(u_char *)fmt++) {		case '\0':			while(*--fmt != '%')				;			while(*bp++ = *fmt++)				;			return;		case '0':			padc = '0';			goto reswitch;		case '1': case '2': case '3': case '4':		case '5': case '6': case '7': case '8': case '9':			for (width = 0;; ++fmt) {				width = width * 10 + ch - '0';				ch = *fmt;				if (ch < '0' || ch > '9')					break;			}			goto reswitch;		case 'l':			lflag = 1;			goto reswitch;		/* case 'b': ... break; XXX */		case 'c':			*bp++ = va_arg(ap, int);			break;		/* case 'r': ... break; XXX */		case 's':			p = va_arg(ap, char *);			while ((*bp++ = *p++) != 0)				continue;			--bp;			break;		case 'd':			ul = lflag ? va_arg(ap, long) : va_arg(ap, int);			if ((long)ul < 0) {				*bp++ = '-';				ul = -(long)ul;			}			base = 10;			goto number;			break;		case 'o':			ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);			base = 8;			goto number;			break;		case 'u':			ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);			base = 10;			goto number;			break;		case 'p':			*bp++ = '0';			*bp++ = 'x';			ul = (u_long)va_arg(ap, void *);			base = 16;			goto number;		case 'x':			ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);			base = 16;number:			p = ksprintn(ul, base, &tmp);			if (width && (width -= tmp) > 0)				while (width--)					*bp++ = padc;			while ((ch = *p--) != 0)				*bp++ = ch;			break;		default:			*bp++ = '%';			if (lflag)				*bp++ = 'l';			/* FALLTHROUGH */		case '%':			*bp++ = ch;		}	}}