va_list ap;
eformat(const char *fp, ...){	char	kname[NKNAME], *cp;	va_list ap;	int	c;	va_start(ap, fp);	while ((c = *fp++) != '\0') {		if (c != '%')			eputc(c);		else {			c = *fp++;			switch (c) {			case 'c':				keyname(kname, sizeof(kname), va_arg(ap, int));				eputs(kname);				break;			case 'k':				for (cp = kname, c = 0; c < key.k_count; c++) {					if (c)						*cp++ = ' ';					cp = keyname(cp, sizeof(kname) -					    (cp - kname) - 1, key.k_chars[c]);				}				eputs(kname);				break;			case 'd':				eputi(va_arg(ap, int), 10);				break;			case 'o':				eputi(va_arg(ap, int), 8);				break;			case 's':				eputs(va_arg(ap, char *));				break;			case 'l':				/* explicit longword */				c = *fp++;				switch (c) {				case 'd':					eputl(va_arg(ap, long), 10);					break;				default:					eputc(c);					break;				}				break;			default:				eputc(c);			}		}	}}