xref: /csrg-svn/lib/libc/stdio/sprintf.c (revision 32532)
1 #if defined(LIBC_SCCS) && !defined(lint)
2 static char sccsid[] = "@(#)sprintf.c	5.3 (Berkeley) 10/25/87";
3 #endif LIBC_SCCS and not lint
4 
5 #include	<stdio.h>
6 
7 sprintf(str, fmt, args)
8 char *str, *fmt;
9 {
10 	FILE _strbuf;
11 	int len;
12 
13 	_strbuf._flag = _IOWRT+_IOSTRG;
14 	_strbuf._ptr = str;
15 	_strbuf._cnt = 32767;
16 	len = _doprnt(fmt, &args, &_strbuf);
17 	*_strbuf._ptr = 0;
18 	return(len);
19 }
20