home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / stdio / ungetc.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  443 b   |  27 lines

  1. @node ungetc, stdio
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <stdio.h>
  6.  
  7. int ungetc(int c, FILE *file);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function pushes @var{c} back into the @var{file}.  You can only
  13. push back one character at a time. 
  14.  
  15. @subheading Return Value
  16.  
  17. The pushed-back character, or @code{EOF} on error.
  18.  
  19. @subheading Example
  20.  
  21. @example
  22. int q;
  23. while (q = getc(stdin) != 'q');
  24. ungetc(q);
  25. @end example
  26.  
  27.