summaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h
new file mode 100644
index 0000000..6d2211b
--- /dev/null
+++ b/src/list.h
@@ -0,0 +1,26 @@
+#pragma once
+
+typedef struct {
+ union {
+ float *fdata;
+ int *idata;
+ unsigned int *udata;
+ unsigned char *bdata;
+ void *data;
+ };
+ int len;
+ int capacity;
+ int elmSize;
+} List;
+
+void list_initf(List *list);
+void list_initi(List *list);
+void list_initu(List *list);
+void list_initb(List *list);
+
+void list_pushf(List *list, float f);
+void list_pushi(List *list, int i);
+void list_pushu(List *list, unsigned int u);
+void list_pushb(List *list, unsigned char u);
+
+void list_free(List *list);