44 #ifndef SYS_IOSTREAM_CAPACITY 45 #define SYS_IOSTREAM_CAPACITY 8 53 #define SYS_IOSTREAM_EOF (-1) int sys_iostream_peek(sys_iostream_t *s)
Look at the next byte without consuming it.
size_t sys_iostream_read(sys_iostream_t *s, char *buf, size_t n)
Read bytes from a stream.
struct sys_iostream_t sys_iostream_t
An opaque byte stream.
ptrdiff_t sys_iostream_seek(sys_iostream_t *s, ptrdiff_t offset, bool abs)
Move a stream's read/write position.
size_t sys_iostream_write(sys_iostream_t *s, const char *buf, size_t n)
Write bytes to a stream.
void sys_iostream_close(sys_iostream_t *s)
Release a stream back to the pool.