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