1: /*	@(#)ungetc.c	2.1	SCCS id keyword	*/
   2: #include <stdio.h>
   3: 
   4: ungetc(c, iop)
   5: register FILE *iop;
   6: {
   7:     if (c == EOF)
   8:         return(EOF);
   9:     if ((iop->_flag&_IOREAD)==0 || iop->_ptr <= iop->_base)
  10:         if (iop->_ptr == iop->_base && iop->_cnt==0)
  11:             *iop->_ptr++;
  12:         else
  13:             return(EOF);
  14:     iop->_cnt++;
  15:     *--iop->_ptr = c;
  16:     return(c);
  17: }
Last modified: 1982-10-30
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 608
Valid CSS Valid XHTML 1.0 Strict