.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" This code is derived from software contributed to Berkeley by
.\" Chris Torek and the American National Standards Committee X3,
.\" on Information Processing Systems.
.\" %sccs.include.redist.man%
.\" @(#)getc.3 6.8 (Berkeley) %G%
.Nd get next character or word from input stream
obtains the next input character (if present) from the stream pointed at by
or the next character pushed back on the stream via
acts essentially identically to
but is a macro that expands in-line.
getc with the argument stdin.
from the stream pointed at by
If successful, these routines return the next requested object
If the stream is at end-of-file or a read error occurs,
must be used to distinguish between end-of-file and error.
If an error occurs, the global variable
is set to indicate the error.
The end-of-file condition is remembered, even on a terminal, and all
subsequent attempts to read will return
until the condition is cleared with
is a valid integer value,
must be used to check for failure after calling
The size and byte order of an
varies from one machine to another, and
is not recommended for portable applications.