aboutsummaryrefslogtreecommitdiff
path: root/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index bf6181b..4fb390e 100644
--- a/lib.h
+++ b/lib.h
@@ -34,4 +34,16 @@ typedef struct Buffer
} buffer_t;
buffer_t *buffer_init_str(const char *name, const char *str, size_t str_size);
+
+typedef struct
+{
+ u64 size, capacity;
+ u8 *data;
+} vec_t;
+
+void vec_append(vec_t *vec, void *ptr, u64 size);
+void vec_ensure(vec_t *vec, u64 abs_size);
+void vec_ensure_free(vec_t *vec, u64 rel_size);
+void vec_free(vec_t *vec);
+
#endif