NAME

src/io/buffer.c - I/O buffering

DESCRIPTION

This file implements a collection of utility functions for I/O buffering.

Functions

INTVAL Parrot_io_init_buffer
Initialize buffering on STDOUT and STDIN.
void Parrot_io_setbuf
Set the buffering mode for the filehandle.
INTVAL Parrot_io_setlinebuf
Set the file handle to line buffering mode.
INTVAL Parrot_io_flush_buffer
Flush the I/O buffer for a given filehandle object.
size_t Parrot_io_fill_readbuf
The buffer layer's Fill function.
size_t Parrot_io_read_buffer
The buffer layer's Read function.
size_t Parrot_io_peek_buffer
Retrieve the next character in the buffer without modifying the stream.
size_t Parrot_io_readline_buffer
This is called from Parrot_io_read_buffer() to do line buffered reading if that is what is required.
size_t Parrot_io_write_buffer
The buffer layer's Write function.
PIOOFF_T Parrot_io_seek_buffer
The buffer layer's Seek function.
static INTVAL io_is_end_of_line
Determine if the current character is the end of the line.Note that this is not a portable solution, but it is what the old architecture was doing, once you boil away the useless macros. This will need to change to support the Strings PDD, but is left as-is for now, for a smooth transition to the new architecture.

SEE ALSO

src/io/api.c, src/io/unix.c, src/io/win32.c, src/io/portable.c, src/io.c, src/io/io_private.h.