forked from Telodendria/Telodendria
Jordan Bancino
ab4755240a
Both do buffered reads and writes, but IoCopy() uses IoRead() and IoWrite() directly, whereas StreamCopy() relies on StreamGetc() and StreamPutc(), which manipulate the stream buffers.
46 lines
655 B
C
46 lines
655 B
C
#ifndef TELODENDRIA_STREAM_H
|
|
#define TELODENDRIA_STREAM_H
|
|
|
|
#include <Io.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
typedef struct Stream Stream;
|
|
|
|
extern Stream *
|
|
StreamOpen(Io *io);
|
|
|
|
extern int
|
|
StreamClose(Stream *);
|
|
|
|
extern int
|
|
StreamVprintf(Stream *, const char *, va_list);
|
|
|
|
extern int
|
|
StreamPrintf(Stream *, const char *, ...);
|
|
|
|
extern int
|
|
StreamGetc(Stream *);
|
|
|
|
extern int
|
|
StreamUngetc(Stream *, int);
|
|
|
|
extern int
|
|
StreamPutc(Stream *, int);
|
|
|
|
extern int
|
|
StreamEof(Stream *);
|
|
|
|
extern int
|
|
StreamError(Stream *);
|
|
|
|
extern void
|
|
StreamClearError(Stream *);
|
|
|
|
extern int
|
|
StreamFlush(Stream *);
|
|
|
|
extern ssize_t
|
|
StreamCopy(Stream *, Stream *);
|
|
|
|
#endif /* TELODENDRIA_STREAM_H */
|