.TH iogetc() "" "" "Internal Kernel Routine"
.PC "Get a character from I/O segment"
.B "#include <sys/io.h>"
\fBint iogetc(\fIiop\^\fB)\fR
\fBIO *\fIiop\^\fB;\fR
.PP
.B iogetc()
reads a character from the I/O segment referenced by \fIiop\fR.
If an address fault occurs, it calls
.B set_user_error()
with value
.B EFAULT
and returns \-1;
otherwise, it decrements \fIiop\fB->ioc\fR
by one and returns the value of the character read.
If \fIiop\fB->io_ioc\fR (the I/O count) is zero,
.B iogetc()
returns \-1.
.SH "See Also"
.B
internal kernel routines
.R
