|
|
1.1 ! root 1: /* @(#)printf.c 4.1 (Berkeley) 12/21/80 */ ! 2: #include <stdio.h> ! 3: ! 4: printf(fmt, args) ! 5: char *fmt; ! 6: { ! 7: register int n; ! 8: unsigned char buff[BUFSIZ]; ! 9: ! 10: if (stdout->_flag & _IONBF) ! 11: setbuf(stdout, buff); ! 12: ! 13: n = _doprnt(fmt, &args, stdout); ! 14: ! 15: if (stdout->_base == buff) ! 16: { ! 17: fflush(stdout); ! 18: setbuf(stdout, NULL); ! 19: } ! 20: ! 21: return(ferror(stdout)? EOF: n); ! 22: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.