UNGETC man page on IRIX

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



UNGETC(3S)							    UNGETC(3S)

NAME
     ungetc - push character back into input stream

SYNOPSIS
     #include <stdio.h>

     int ungetc (int c, FILE *stream);

DESCRIPTION
     ungetc inserts the character c into the buffer associated with an input
     stream.  Pushed-back characters will be returned by subsequent reads on
     that stream in the reverse order of their pushing.	 A successful
     intervening call (with the stream pointed to by stream) to a file
     positioning function (fseek(3S), fsetpos(3S) or rewind(3S)), discards any
     pushed-back characters.  The external storage corresponding to the stream
     is unchanged.  A successful call to ungetc clears the end-of-file
     indicator for the stream.

     One character of pushback is guaranteed, provided something has already
     been read from the stream and the stream is actually buffered.

     If c equals EOF, the operation fails and the input stream is unchanged.

SEE ALSO
     fseek(3S), fsetpos(3S), getc(3S), rewind(3S), setbuf(3S), stdio(3S).

DIAGNOSTICS
     ungetc returns the character pushed back, or EOF if it cannot insert the
     character.

BUGS
     When stream is stdin, one character may be pushed back onto the buffer
     without a previous read statement.

     An ungetc on an unbuffered stream (including stderr) may succeed, with
     the following consequences.  If the stream is open for input, the
     pushed-back character will be prepended to the input.  If the stream is
     open only for output, the next character written to the output stream may
     be lost.

									Page 1

[top]

List of man pages available for IRIX

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