The OpenD Programming Language

gamut.io

I/O streams.

Members

Aliases

EofProc
alias EofProc = int function(IOHandle handle)

A function with same signature and semantics than feof. From Linux man: "The function feof() tests the end-of-file indicator for the stream pointed to by stream, returning nonzero if it is set."

IOHandle
alias IOHandle = void*

Can be a FILE* handle, a FIMEMORY, a WrappedIO... identifies the I/O stream.

ReadProc
alias ReadProc = size_t function(void* buffer, size_t size, size_t count, IOHandle handle)

A function with same signature and semantics than fread.

SeekProc
alias SeekProc = int function(IOHandle handle, c_long offset, int origin)

A function with same signature and semantics than fseek. Origin: position from which offset is added SEEK_SET = beginning of file. SEEK_CUR = Current position of file pointer. SEEK_END = end of file. This function returns zero if successful, or else it returns a non-zero value. Note: c_long offsets in gamut can always be cast to int without loss.

TellProc
alias TellProc = c_long function(IOHandle handle)

A function with same signature and semantics than ftell. Tells where we are in the file. -1 if error. Note: c_long offsets in gamut can always be cast to int without loss.

WriteProc
alias WriteProc = size_t function(const(void)* buffer, size_t size, size_t count, IOHandle handle)

A function with same signature and semantics than fwrite.

c_long (from core.stdc.config)
alias c_long = int via public import core.stdc.config : c_long;
Undocumented in source.

Enums

SEEK_SET (from core.stdc.stdio)
anonymousenum SEEK_SET via public import core.stdc.stdio : SEEK_SET, SEEK_CUR, SEEK_END;
Undocumented in source.

Imports

SEEK_CUR (from core.stdc.stdio)
public import core.stdc.stdio : SEEK_SET, SEEK_CUR, SEEK_END;
Undocumented in source.
SEEK_END (from core.stdc.stdio)
public import core.stdc.stdio : SEEK_SET, SEEK_CUR, SEEK_END;
Undocumented in source.

Structs

IOStream
struct IOStream

I/O abstraction, to support load/write from a file, from memory, or from user-provided callbacks.

MemoryFile
struct MemoryFile

This is basically an owned buffer, with capacity, optionally borrowed. The original things being that it can both be used for reading and writing.

WrappedIO
struct WrappedIO
Undocumented in source.

Variables

GAMUT_MAX_POSSIBLE_MEMORY_OFFSET
enum size_t GAMUT_MAX_POSSIBLE_MEMORY_OFFSET;

Can't open file larger than this much bytes

GAMUT_MAX_POSSIBLE_SIMULTANEOUS_READ
enum size_t GAMUT_MAX_POSSIBLE_SIMULTANEOUS_READ;

Can't read more bytes than this at once

GAMUT_MAX_POSSIBLE_SIMULTANEOUS_WRITE
enum size_t GAMUT_MAX_POSSIBLE_SIMULTANEOUS_WRITE;

Can't write more bytes than this at once

Meta