parrotcode: Win32 I/O utility functions | |
Contents | C |
src/io/win32.c - Win32 I/O utility functions
This file implements OS-specific I/O functions for Win32 platforms.
Win32 System Programming, 2nd Edition.
static INTVAL convert_flags_to_win32
INTVAL Parrot_io_init_win32
std*
IO handles.
INTVAL Parrot_io_getblksize_win32
PIO_BLKSIZE
.
PMC *Parrot_io_open_win32
CreateFile()
to open *spath
with the Win32 translation of flags
.
PMC *Parrot_io_fdopen_win32
PMC
with fd
as its file descriptor.
INTVAL Parrot_io_close_win32
CloseHandle()
to close *io
's file descriptor.
INTVAL Parrot_io_is_closed_win32
static INTVAL io_is_tty_win32
fd
is a console/tty.
INTVAL Parrot_io_flush_win32
FlushFileBuffers()
to flush *io
's file descriptor.
size_t Parrot_io_read_win32
ReadFile()
to read up to len
bytes from *io
's file descriptor to the memory starting at buffer
.
size_t Parrot_io_write_win32
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
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
*io
's file descriptor.
size_t Parrot_io_peek_win32
PMC *Parrot_io_open_pipe_win32
src/io/unix.c, src/io/stdio.c, src/io/io.c, src/io/io_private.h. include/parrot/io_win32.h.
|