xref: /csrg-svn/lib/libc/stdio/sprintf.c (revision 26663)
1*26663Sdonn #if defined(LIBC_SCCS) && !defined(lint)
2*26663Sdonn static char sccsid[] = "@(#)sprintf.c	5.2 (Berkeley) 03/09/86";
3*26663Sdonn #endif LIBC_SCCS and not lint
422148Smckusick 
52033Swnj #include	<stdio.h>
62033Swnj 
72033Swnj char *sprintf(str, fmt, args)
82033Swnj char *str, *fmt;
92033Swnj {
1017951Sserge 	FILE _strbuf;
112033Swnj 
122033Swnj 	_strbuf._flag = _IOWRT+_IOSTRG;
132033Swnj 	_strbuf._ptr = str;
142033Swnj 	_strbuf._cnt = 32767;
152033Swnj 	_doprnt(fmt, &args, &_strbuf);
162033Swnj 	putc('\0', &_strbuf);
172033Swnj 	return(str);
182033Swnj }
19