libio
is distributed with a complete implementation of the ANSI C
stdio
facility. It is implemented using streambuf
objects. See section Wrappers for C stdio
.
The stdio
package is intended as a replacement for the whatever
stdio
is in your C library.
Since stdio
works best when you build libc
to contain it, and
that may be inconvenient, it is not installed by default.
Extensions beyond ANSI:
FILE
is identical to a streambuf.
Hence there is no need to worry about synchronizing C and C++
input/output--they are by definition always synchronized.
FILE
from C. Thus the system is extensible using the standard
streambuf
protocol.
ungetc()
buffer.