aboutsummaryrefslogtreecommitdiff
path: root/include/bh/internal/buffer.h
diff options
context:
space:
mode:
authorMikhail Romanko <me@blankhex.com>2024-06-03 22:11:05 +0300
committerMikhail Romanko <me@blankhex.com>2024-06-03 22:11:05 +0300
commit79874622a28c081abe155dc01860ddba746abd3b (patch)
tree9dea56ea33951b7c851b534eb6f9d1ff1e1dcfe8 /include/bh/internal/buffer.h
parentfdbabab0e04fac2b5a84ea8e8088cd4767034a45 (diff)
downloadbhlib-old-79874622a28c081abe155dc01860ddba746abd3b.tar.gz
Add documentation, expand error handling, implement file and buffer io
Diffstat (limited to 'include/bh/internal/buffer.h')
-rw-r--r--include/bh/internal/buffer.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/bh/internal/buffer.h b/include/bh/internal/buffer.h
new file mode 100644
index 0000000..ab033b6
--- /dev/null
+++ b/include/bh/internal/buffer.h
@@ -0,0 +1,20 @@
+#ifndef BH_INTERNAL_BUFFER_H
+#define BH_INTERNAL_BUFFER_H
+
+#include <bh/buffer.h>
+
+struct bh_buffer_s
+{
+ bh_io_t base;
+ char *data;
+ size_t capacity;
+ size_t size;
+ size_t at;
+ int mode;
+};
+
+int bh_buffer_init(bh_buffer_t *buffer);
+
+void bh_buffer_destroy(bh_buffer_t *buffer);
+
+#endif /* BH_INTERNAL_BUFFER_H */