1: /* @(#)sprintf.c 2.1 SCCS id keyword */ 2: #include <stdio.h> 3: 4: char *sprintf(str, fmt, args) 5: char *str, *fmt; 6: { 7: struct _iobuf _strbuf; 8: 9: _strbuf._flag = _IOWRT+_IOSTRG; 10: _strbuf._ptr = str; 11: _strbuf._cnt = 32767; 12: _doprnt(fmt, &args, &_strbuf); 13: putc('\0', &_strbuf); 14: return(str); 15: }