summary refs log tree commit diff
path: root/buf.h
diff options
context:
space:
mode:
authorwrmr2024-11-03 02:48:05 -0500
committerwrmr2024-11-03 02:48:05 -0500
commit3e9c75318b0eb1114fb7361dbc467990674804b6 (patch)
tree504efbb2fe56c4700055ec584170cb77237c732a /buf.h
parent610808a5902adad751a4acdbcc310803a51fed5d (diff)
start working on fetching
Diffstat (limited to 'buf.h')
-rw-r--r--buf.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/buf.h b/buf.h
index fdf0c52..c275f9c 100644
--- a/buf.h
+++ b/buf.h
@@ -3,13 +3,16 @@
 
 #include <stddef.h>
 
-struct buf {
+typedef struct buf {
 	size_t sz, cap;
 	char *buf;
-};
+} buf_t;
 
-void buf_init(struct buf *, size_t);
-void buf_grow(struct buf *, size_t);
-void buf_free(struct buf *);
+void buf_init(buf_t *, size_t);
+void buf_grow(buf_t *, size_t);
+void buf_free(buf_t *);
+
+void buf_cat(buf_t *b, char *src, size_t n);
+void buf_catc(buf_t *b, char c);
 
 #endif