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:     *--iop->_ptr = c;
  15:     return(0);
  16: }
Last modified: 1979-01-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 404
Valid CSS Valid XHTML 1.0 Strict