diff options
Diffstat (limited to 'buffer.h')
| -rw-r--r-- | buffer.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/buffer.h b/buffer.h new file mode 100644 index 0000000..7bc9d76 --- /dev/null +++ b/buffer.h @@ -0,0 +1,20 @@ +#ifndef BUFFER_H +#define BUFFER_H + +#include <sys/types.h> + +struct buffer { + char *addr; + char *begin; + char *end; + int size; +}; + +void binit(struct buffer *b, size_t size); +void bfree(struct buffer *b); +int bread(struct buffer *b, int fd); +int bwrite(struct buffer *b, int fd); +int bcanfill(struct buffer *b); +int bhasdata(struct buffer *b); + +#endif |
