PWB1/usr/man/man3/getchar.3

Compare this file to the similar file:
Show the results in this format:

.th GETCHAR III 5/31/77
.sh NAME
getchar \*- read character
.sh SYNOPSIS
.ft B
getchar( )
.br
.ft R
.sh DESCRIPTION
.it Getchar
provides the simplest means of reading characters from
the standard input for C programs.
It returns successive characters until end-of-file,
when it returns ``\\0''.
.s3
Associated with this routine is an external variable
called \fIfin\fR, which is a structure containing
a buffer such as described under
.it getc(III).
.s3
Generally speaking,
.it getchar
should be used only for the simplest applications;
.it getc
is better when there are multiple input files.
.s3
Use the new "Standard I/O" instead.
.sh "SEE ALSO"
getc(III)
.br
.it "A New Input-Output Package"
by D. M. Ritchie.
.sh DIAGNOSTICS
Null character returned on EOF or error.
.sh BUGS
\*-1 should be
returned on EOF; null is a legitimate character.