www.pudn.com > iccavr_lib.rar > csprintf.c, change:2003-11-27,size:353b


#include <stdarg.h> 
extern int _cprint(void (*_put)(char), const char *fmt, va_list va); 
 
static char *p; 
/* static */ void _depi(char c) 
	{ 
	*p++ = c; 
	} 
	 
int csprintf(char *buf, const char *fmt, ...) 
	{ 
	va_list va; 
	int val; 
 
	p = buf; 
	va_start(va, fmt); 
	val = _cprint(_depi, fmt, va); 
	va_end(va); 
	*p = 0; 
 
	return val; 
	}