diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2021-12-07 18:13:24 +0100 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2021-12-07 18:13:24 +0100 |
commit | daad1e7e3abf5a27a41d8b5e52a4536068030327 (patch) | |
tree | ab18a31fd590e40c8483ff992761f2d97a4f88d9 /list.h | |
parent | 7d65acce058a99a8b33d6d2870ac8bbb939827d8 (diff) |
day 6
Diffstat (limited to 'list.h')
-rw-r--r-- | list.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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 |