| parrotcode: STDIO layer | |
| Contents | C |

src/io/io_stdio.c - STDIO layer

This is the Parrot IO STDIO layer. This may provide a subset of full functionality, but must compile on any system with the ANSI C standard library. Also note that unlike the other low-level IO layers (UNIX, Win32), this is buffered IO, out of necessity.

static const char *flags_to_stdio(INTVAL flags)flags suitable for passing to fopen() in PIO_stdio_open().static INTVAL PIO_stdio_init(Interp *interp, ParrotIOLayer *layer)static ParrotIO *PIO_stdio_open(Interp *interp, ParrotIOLayer *layer, const char *spath, INTVAL flags)<,
>,
etc.static ParrotIO *PIO_stdio_fdopen(Interp *interp, ParrotIOLayer *layer, PIOHANDLE fptr, INTVAL flags)static INTVAL PIO_stdio_close(Interp *interp, ParrotIOLayer *layer, ParrotIO *io)static INTVAL PIO_stdio_isatty(PIOHANDLE fptr)INTVAL PIO_stdio_getblksize(PIOHANDLE fptr)static INTVAL PIO_stdio_flush(Interp *interp, ParrotIOLayer *layer, ParrotIO *io)static size_t PIO_stdio_read(Interp *interp, ParrotIOLayer *layer, ParrotIO *io, STRING **)static size_t PIO_stdio_write(Interp *interp, ParrotIOLayer *layer, ParrotIO *io, STRING *s)static PIOOFF_T PIO_stdio_seek(Interp *interp, ParrotIOLayer *layer, ParrotIO *io, PIOOFF_T offset, INTVAL whence)static PIOOFF_T PIO_stdio_tell(Interp *interp, ParrotIOLayer *layer, ParrotIO *io)
src/io/io_buf.c, src/io/io_passdown.c, src/io/io_unix.c, src/io/io_win32.c, src/io/io.c, src/io/io_private.h.

Adapted from io_unix.c by Josh Wilmes (josh@hitchhiker.org).
|
|
|