1: #if defined(LIBC_SCCS) && !defined(lint)
   2: static char sccsid[] = "@(#)ungetc.c	5.3 (Berkeley) 3/26/86";
   3: #endif LIBC_SCCS and not lint
   4: 
   5: #include <stdio.h>
   6: 
   7: ungetc(c, iop)
   8:     register FILE *iop;
   9: {
  10:     if (c == EOF || (iop->_flag & (_IOREAD|_IORW)) == 0 ||
  11:         iop->_ptr == NULL || iop->_base == NULL)
  12:         return (EOF);
  13: 
  14:     if (iop->_ptr == iop->_base)
  15:         if (iop->_cnt == 0)
  16:             iop->_ptr++;
  17:         else
  18:             return (EOF);
  19: 
  20:     iop->_cnt++;
  21:     *--iop->_ptr = c;
  22: 
  23:     return (c);
  24: }

Defined functions

ungetc defined in line 7; used 118 times

Defined variables

sccsid defined in line 2; never used
Last modified: 1986-03-27
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2087
Valid CSS Valid XHTML 1.0 Strict