|
ZEDA
1.6.18
|
Data Structures | |
| struct | __zstream |
| struct | zStream |
| abstracted stream manipulation class. More... | |
Macros | |
| #define | zStreamRewind(s) (*(s)->rewind)( (s) ) |
| set the current position to the head of a stream. More... | |
| #define | zStreamSeek(s, p) (*(s)->seek)( (s), (p) ) |
| set the current position to the specified location in a stream. More... | |
| #define | zStreamTell(s) (*(s)->tell)( (s) ) |
| tell the current position in a stream. More... | |
| #define | zStreamRead(s, d, u, n) (*(s)->read)( (s), (d), (u), (n) ) |
| read n data from the current position of s, and copy it to the memory pointed by d. u is the size of a data cell. More... | |
| #define | zStreamWrite(s, m, u, n) (*(s)->write)( (s), (m), (u), (n) ) |
| write n data stored at m to the current position of s. s is the size of a data cell. More... | |
| #define | zStreamClose(s) (*(s)->close)( (s) ) |
| close a stream. More... | |
Typedefs | |
| typedef struct __zstream | zStream |
Functions | |
| void | zStreamAttachFile (zStream *str, FILE *fp) |
| attach a file to a stream. More... | |
| void | zStreamAttachMem (zStream *str, byte *mem, size_t size) |
| attach a memory space to a stream. More... | |
| zStream * | zStreamOpenFile (zStream *str, char filename[], char *mode) |
| open a file and attach to a stream. More... | |
| zStream * | zStreamOpenMem (zStream *str, size_t size) |
| allocate a memory space and attach to a stream. More... | |
| #define zStreamRewind | ( | s | ) | (*(s)->rewind)( (s) ) |
set the current position to the head of a stream.
| #define zStreamSeek | ( | s, | |
| p | |||
| ) | (*(s)->seek)( (s), (p) ) |
set the current position to the specified location in a stream.
| #define zStreamTell | ( | s | ) | (*(s)->tell)( (s) ) |
tell the current position in a stream.
| #define zStreamRead | ( | s, | |
| d, | |||
| u, | |||
| n | |||
| ) | (*(s)->read)( (s), (d), (u), (n) ) |
read n data from the current position of s, and copy it to the memory pointed by d. u is the size of a data cell.
| #define zStreamWrite | ( | s, | |
| m, | |||
| u, | |||
| n | |||
| ) | (*(s)->write)( (s), (m), (u), (n) ) |
write n data stored at m to the current position of s. s is the size of a data cell.
| #define zStreamClose | ( | s | ) | (*(s)->close)( (s) ) |
close a stream.
| void zStreamAttachFile | ( | zStream * | str, |
| FILE * | fp | ||
| ) |
attach a file to a stream.
zStreamAttachFile() attaches a file stream fp to an abstracted stream str.
attach a memory space to a stream.
zStreamAttachMem() attaches a memory buffer pointed by mem with the size size to an abstracted stream str.
open a file and attach to a stream.
zStreamOpenFile() opens a file filename with the mode mode, and attaches it to a stream str.
allocate a memory space and attach to a stream.
zStreamOpenMem() allocates a memory buffer with the size size, and attaches it to a stream str.
1.8.13