home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / unix / unixlib_1 / !UnixLib37_src_stdio_c_ungetc < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-09  |  706 b   |  28 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /unixb/home/unixlib/source/unixlib37/src/stdio/c/RCS/ungetc,v $
  4.  * $Date: 1996/04/19 21:32:42 $
  5.  * $Revision: 1.1 $
  6.  * $State: Rel $
  7.  * $Author: simon $
  8.  *
  9.  * $Log: ungetc,v $
  10.  * Revision 1.1  1996/04/19 21:32:42  simon
  11.  * Initial revision
  12.  *
  13.  ***************************************************************************/
  14.  
  15. static const char rcs_id[] = "$Id: ungetc,v 1.1 1996/04/19 21:32:42 simon Rel $";
  16.  
  17. #include <stdio.h>
  18.  
  19. __STDIOLIB__
  20.  
  21. #define ungetc(c,f) \
  22.     (((f)->i_ptr > (f)->i_base) ? ((f)->i_cnt++,*--(f)->i_ptr = (c)) : -1)
  23.  
  24. int (ungetc) (register int c, register FILE * f)
  25. {
  26.   return (ungetc (c, f));
  27. }
  28.