From daad1e7e3abf5a27a41d8b5e52a4536068030327 Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Tue, 7 Dec 2021 18:13:24 +0100 Subject: day 6 --- list.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 list.h (limited to 'list.h') 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 + +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 -- cgit v1.2.3