NAME

src/io/win32.c - Win32 I/O utility functions

DESCRIPTION

This file implements OS-specific I/O functions for Win32 platforms.

References

Win32 System Programming, 2nd Edition.

Functions

static INTVAL convert_flags_to_win32
Convert to platform-specific bit open flags.
INTVAL Parrot_io_init_win32
Sets up the standard std* IO handles.
INTVAL Parrot_io_getblksize_win32
Returns PIO_BLKSIZE.
PMC *Parrot_io_open_win32
Calls CreateFile() to open *spath with the Win32 translation of flags.
PMC *Parrot_io_fdopen_win32
Returns a new PMC with fd as its file descriptor.
INTVAL Parrot_io_close_win32
Calls CloseHandle() to close *io's file descriptor.
INTVAL Parrot_io_is_closed_win32
Test whether the filehandle has been closed.
static INTVAL io_is_tty_win32
Returns whether fd is a console/tty.
INTVAL Parrot_io_flush_win32
Calls FlushFileBuffers() to flush *io's file descriptor.
size_t Parrot_io_read_win32
Calls ReadFile() to read up to len bytes from *io's file descriptor to the memory starting at buffer.
size_t Parrot_io_write_win32
Calls WriteFile() to write len bytes from the memory starting at buffer to *io's file descriptor. Returns (size_t)-1 on failure.
PIOOFF_T Parrot_io_seek_win32
Hard seek.Calls SetFilePointer() to move the read/write position of *io's file descriptor to off bytes relative to the location specified by whence.
PIOOFF_T Parrot_io_tell_win32
Returns the current read/write position of *io's file descriptor.
size_t Parrot_io_peek_win32
Retrieve the next character in the stream without modifying the stream. Not implemented for this platform.
PMC *Parrot_io_open_pipe_win32
Open a pipe. Not implemented for this platform.

SEE ALSO

src/io/unix.c, src/io/stdio.c, src/io/io.c, src/io/io_private.h. include/parrot/io_win32.h.