|
|
1.1 ! root 1: #include <stdio.h> ! 2: ! 3: ungetc(c, iop) ! 4: register FILE *iop; ! 5: { ! 6: if (c == EOF) ! 7: return(-1); ! 8: if ((iop->_flag&_IOREAD)==0 || iop->_ptr <= iop->_base) ! 9: if (iop->_ptr == iop->_base && iop->_cnt==0) ! 10: iop->_ptr++; ! 11: else ! 12: return(-1); ! 13: iop->_cnt++; ! 14: if(*--iop->_ptr != c) /* sscanf buffer may be read-only */ ! 15: *iop->_ptr = c; ! 16: return(c); ! 17: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.