summaryrefslogtreecommitdiff
path: root/list.h
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2021-12-07 18:13:24 +0100
committerVincent Douillet <vincent@vdouillet.fr>2021-12-07 18:13:24 +0100
commitdaad1e7e3abf5a27a41d8b5e52a4536068030327 (patch)
treeab18a31fd590e40c8483ff992761f2d97a4f88d9 /list.h
parent7d65acce058a99a8b33d6d2870ac8bbb939827d8 (diff)
day 6
Diffstat (limited to 'list.h')
-rw-r--r--list.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/list.h b/list.h
new file mode 100644
index 0000000..21ceeaa
--- /dev/null
+++ b/list.h
@@ -0,0 +1,22 @@
+#ifndef DEF_LISTH
+#define DEF_LISTH
+
+#include <stdlib.h>
+
+struct long_list {
+ long* list;
+ size_t alloc_size;
+ size_t length;
+};
+
+struct long_list* long_list_init(size_t size);
+
+void long_list_free(struct long_list* list);
+
+void long_list_add(struct long_list* list, long value);
+
+long long_list_get(struct long_list* list, size_t index);
+
+void long_list_set(struct long_list* list, size_t index, long value);
+
+#endif