ungetc man page on Cygwin

Man page or keyword search:  
man Server   22533 pages
apropos Keyword Search (all sections)
Output format
Cygwin logo
[printable version]

UNGETC(3)			    NEWLIB			     UNGETC(3)

NAME
       4.66 `ungetc'--push data back into a stream

SYNOPSIS
	    #include <stdio.h>
	    int ungetc(int C, FILE *STREAM);

	    int _ungetc_r(struct _reent *REENT, int C, FILE *STREAM);

DESCRIPTION
       `ungetc' is used to return bytes back to STREAM to be read again.  If C
       is EOF, the stream is unchanged.	 Otherwise, the unsigned char C is put
       back on the stream, and subsequent reads will see the bytes pushed back
       in reverse order.  Pushed byes are lost if the stream is	 repositioned,
       such as by `fseek', `fsetpos', or `rewind'.

	  The  underlying file is not changed, but it is possible to push back
       something different than what was originally read.  Ungetting a charac‐
       ter  will  clear the end-of-stream marker, and decrement the file posi‐
       tion indicator.	Pushing back beyond the	 beginning  of	a  file	 gives
       unspecified behavior.

	  The  alternate  function  `_ungetc_r'	 is  a reentrant version.  The
       extra argument REENT is a pointer to a reentrancy structure.

RETURNS
       The character pushed back, or `EOF' on error.

PORTABILITY
       ANSI C requires `ungetc', but only requires a pushback  buffer  of  one
       byte;  although	this implementation can handle multiple bytes, not all
       can.  Pushing back a signed char is a common application bug.

	  Supporting OS subroutines required: `sbrk'.

SEE ALSO
       ungetc is part of the library.  The full	 documentation	for  is	 main‐
       tained as a Texinfo manual.  If info and are properly installed at your
       site, the command

	      info

       will give you access to the complete manual.

NEWLIB				  April 2010			     UNGETC(3)
[top]

List of man pages available for Cygwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net