| parrotcode: UNIX IO utility functions | |
| Contents | C |

src/io/unix.c - UNIX IO utility functions

This file implements unbuffered, low-level, UNIX-specific functionality. "UNIX" is a generalization, it may be necessary to create separate OS-specific functions for UNIX flavors.
These functions are not part of Parrot's API.
Don't call them directly,
call the Parrot_io_* functions in src/io/api.c instead.
Each platform defines the standard set of macros,
which call the correct functions for that platform.

APitUE - W. Richard Stevens, AT&T SFIO, Perl 5 (Nick Ing-Simmons)

static INTVAL convert_flags_to_unixflags suitable for passing to open() and fopen() in Parrot_io_open_unix() and Parrot_io_fdopen_unix() respectively.INTVAL Parrot_io_init_unixstd* IO handles.
Returns 0 on success and -1 on error.PMC *Parrot_io_open_unixpath.
flags is a bitwise or combination of PIO_F_* flag values.INTVAL Parrot_io_async_unixPARROT_ASYNC_DEVEL is defined.O_ASYNC flag on the IO file descriptor.PMC *Parrot_io_fdopen_unixFileHandle PMC with the file descriptor passed in.INTVAL Parrot_io_close_unix*io's file descriptor.INTVAL Parrot_io_is_closed_unixstatic INTVAL io_is_tty_unixfd is a console/tty.INTVAL Parrot_io_getblksize_unixfstat() and the stat buffer are used if available.BLKSIZE constant is returned if it was available at compile time,
otherwise PIO_BLKSIZE is returned.INTVAL Parrot_io_flush_unixflush is to ask the kernel to sync().sync() here?size_t Parrot_io_read_unixread() to return up to len bytes in the memory starting at buffer.size_t Parrot_io_write_unixwrite() to write len bytes from the memory starting at buffer to the file descriptor in *io.PIOOFF_T Parrot_io_seek_unixlseek() to advance the read/write position on *io's file descriptor to offset bytes from the location indicated by whence.PIOOFF_T Parrot_io_tell_unix*io's file discriptor.PMC *Parrot_io_open_pipe_unixexec for now.size_t Parrot_io_peek_unix
src/io/common.c, src/io/win32.c, src/io/stdio.c, src/io/io_private.h, include/parrot/io_unix.h.
|
|
|