12 #ifndef __ZEDA_STREAM_H__ 13 #define __ZEDA_STREAM_H__ 102 #define zStreamRewind(s) (*(s)->rewind)( (s) ) 103 #define zStreamSeek(s,p) (*(s)->seek)( (s), (p) ) 104 #define zStreamTell(s) (*(s)->tell)( (s) ) 105 #define zStreamRead(s,d,u,n) (*(s)->read)( (s), (d), (u), (n) ) 106 #define zStreamWrite(s,m,u,n) (*(s)->write)( (s), (m), (u), (n) ) 107 #define zStreamClose(s) (*(s)->close)( (s) )
int8_t byte
Definition: zeda_defs.h:92
struct __zstream::@1::@2 mem
#define __END_DECLS
Definition: zeda_defs.h:30
int(* seek)(struct __zstream *str, long offset)
Definition: zeda_stream.h:43
size_t size
Definition: zeda_stream.h:39
Definition: zeda_stream.h:34
void zStreamAttachFile(zStream *str, FILE *fp)
attach a file to a stream.
FILE * fp
Definition: zeda_stream.h:36
abstracted stream manipulation class.
int(* close)(struct __zstream *str)
Definition: zeda_stream.h:47
#define __BEGIN_DECLS
Definition: zeda_defs.h:26
byte * buf
Definition: zeda_stream.h:38
size_t(* write)(struct __zstream *str, byte *src, size_t size, size_t nmemb)
Definition: zeda_stream.h:46
void zStreamAttachMem(zStream *str, byte *mem, size_t size)
attach a memory space to a stream.
zStream * zStreamOpenFile(zStream *str, char filename[], char *mode)
open a file and attach to a stream.
zStream * zStreamOpenMem(zStream *str, size_t size)
allocate a memory space and attach to a stream.
#define __EXPORT
Definition: zeda_compat.h:32
long(* tell)(struct __zstream *str)
Definition: zeda_stream.h:44
size_t(* read)(struct __zstream *str, byte *dest, size_t size, size_t nmemb)
Definition: zeda_stream.h:45
byte * cur
Definition: zeda_stream.h:38
void(* rewind)(struct __zstream *str)
Definition: zeda_stream.h:42