1: #if defined(LIBC_SCCS) && !defined(lint) 2: static char sccsid[] = "@(#)sprintf.c 5.2 (Berkeley) 3/9/86"; 3: #endif LIBC_SCCS and not lint 4: 5: #include <stdio.h> 6: 7: char *sprintf(str, fmt, args) 8: char *str, *fmt; 9: { 10: FILE _strbuf; 11: 12: _strbuf._flag = _IOWRT+_IOSTRG; 13: _strbuf._ptr = str; 14: _strbuf._cnt = 32767; 15: _doprnt(fmt, &args, &_strbuf); 16: putc('\0', &_strbuf); 17: return(str); 18: }