sc68fordevelopers  2.2.1
istream68.h
Go to the documentation of this file.
1 
14 /* Copyright (C) 1998-2003 Benjamin Gerard */
15 
16 #ifndef _ISTREAM68_H_
17 #define _ISTREAM68_H_
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
24 typedef struct _istream_t istream_t;
25 
33 const char * istream_filename(istream_t *istream);
34 
43 int istream_open(istream_t *istream);
44 
53 int istream_close(istream_t *istream);
54 
65 int istream_read(istream_t *istream, void * data, int len);
66 
76 int istream_write(istream_t *istream, const void * data, int len);
77 
85 int istream_length(istream_t *istream);
86 
94 int istream_tell(istream_t *istream);
95 
106 int istream_seek(istream_t *istream, int offset);
107 
118 int istream_seek_to(istream_t *istream, int pos);
119 
125 void istream_destroy(istream_t *istream);
126 
136 int istream_gets(istream_t *istream, char * buffer, int max);
137 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif /* #ifndef _ISTREAM68_H_ */
int istream_seek_to(istream_t *istream, int pos)
Set stream absolute position.
int istream_length(istream_t *istream)
Get stream length.
int istream_close(istream_t *istream)
Close stream.
int istream_seek(istream_t *istream, int offset)
Set stream relative position.
int istream_open(istream_t *istream)
Open stream.
int istream_read(istream_t *istream, void *data, int len)
Read data from stream.
void istream_destroy(istream_t *istream)
Close and destroy stream.
int istream_write(istream_t *istream, const void *data, int len)
Write data into stream.
int istream_gets(istream_t *istream, char *buffer, int max)
Read a '\0' or '\n' terminated string.
Input stream structure.
Definition: istream68_def.h:67
const char * istream_filename(istream_t *istream)
Get stream name.
int istream_tell(istream_t *istream)
Get stream current position.