isteam68 provides functions for stream operations.
Go to the source code of this file.
Typedefs | |
| typedef _istream_t | istream_t |
| stream type. | |
Functions | |
| const char * | istream_filename (istream_t *istream) |
| Get stream name. | |
| int | istream_open (istream_t *istream) |
| Open stream. | |
| int | istream_close (istream_t *istream) |
| Close stream. | |
| int | istream_read (istream_t *istream, void *data, int len) |
| Read data from stream. | |
| int | istream_write (istream_t *istream, const void *data, int len) |
| Write data into stream. | |
| int | istream_length (istream_t *istream) |
| Get stream length. | |
| int | istream_tell (istream_t *istream) |
| Get stream current position. | |
| int | istream_seek (istream_t *istream, int offset) |
| Set stream relative position. | |
| int | istream_seek_to (istream_t *istream, int pos) |
| Set stream absolute position. | |
| void | istream_destroy (istream_t *istream) |
| Close and destroy stream. | |
| int | istream_gets (istream_t *istream, char *buffer, int max) |
| Read a '\0' or '\n' terminated string. | |
| typedef struct _istream_t istream_t |
stream type.
| const char* istream_filename | ( | istream_t * | istream | ) |
Get stream name.
| istream | stream |
| 0 | Failure. |
| int istream_open | ( | istream_t * | istream | ) |
Open stream.
| istream | stream |
| 0 | Success | |
| -1 | Failure |
| int istream_close | ( | istream_t * | istream | ) |
Close stream.
| istream | stream |
| 0 | Success | |
| -1 | Failure |
| int istream_read | ( | istream_t * | istream, | |
| void * | data, | |||
| int | len | |||
| ) |
Read data from stream.
| istream | stream | |
| data | destination buffer | |
| len | number of byte to read |
| -1 | Failure. |
| int istream_write | ( | istream_t * | istream, | |
| const void * | data, | |||
| int | len | |||
| ) |
Write data into stream.
| istream | stream | |
| data | destination buffer | |
| len | number of byte to read |
| -1 | Failure. |
| int istream_length | ( | istream_t * | istream | ) |
Get stream length.
| istream | stream |
| -1 | Failure. |
| int istream_tell | ( | istream_t * | istream | ) |
Get stream current position.
| istream | stream |
| -1 | Failure. |
| int istream_seek | ( | istream_t * | istream, | |
| int | offset | |||
| ) |
Set stream relative position.
| istream | stream | |
| offset | displacement from current position |
| -1 | Failure. |
| int istream_seek_to | ( | istream_t * | istream, | |
| int | pos | |||
| ) |
Set stream absolute position.
| istream | stream | |
| pos | position to reach |
| -1 | Failure. |
| void istream_destroy | ( | istream_t * | istream | ) |
Close and destroy stream.
| istream | stream |
| int istream_gets | ( | istream_t * | istream, | |
| char * | buffer, | |||
| int | max | |||
| ) |
Read a '\0' or '\n' terminated string.
| istream | stream | |
| buffer | destination buffer | |
| max | destination buffer size |
| -1 | Failure. |
1.5.2