2005-09-22 18:47:04 +00:00
|
|
|
#ifndef STREAM_H
|
|
|
|
#define STREAM_H
|
|
|
|
|
|
|
|
/* stream.h */
|
|
|
|
|
2005-09-22 20:46:58 +00:00
|
|
|
#include <inttypes.h>
|
2005-09-22 18:47:04 +00:00
|
|
|
|
2005-09-22 20:46:58 +00:00
|
|
|
typedef struct {
|
|
|
|
int eof;
|
|
|
|
} stream_t;
|
2005-09-22 18:47:04 +00:00
|
|
|
|
|
|
|
void stream_read(stream_t *stream, size_t len, void *buf);
|
|
|
|
|
|
|
|
int32_t stream_read_int32(stream_t *stream);
|
|
|
|
uint32_t stream_read_uint32(stream_t *stream);
|
|
|
|
|
|
|
|
int16_t stream_read_int16(stream_t *stream);
|
|
|
|
uint16_t stream_read_uint16(stream_t *stream);
|
|
|
|
|
|
|
|
int8_t stream_read_int8(stream_t *stream);
|
|
|
|
uint8_t stream_read_uint8(stream_t *stream);
|
|
|
|
|
|
|
|
void stream_skip(stream_t *stream, size_t skip);
|
|
|
|
|
|
|
|
int stream_eof(stream_t *stream);
|
|
|
|
|
|
|
|
#endif /* STREAM_H */
|