diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/list.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/list.h b/include/list.h new file mode 100644 index 0000000..e8df51c --- /dev/null +++ b/include/list.h @@ -0,0 +1,22 @@ +#ifndef __LIST_H +#define __LIST_H + +#include <stddef.h> +#include <stdint.h> + +#define START_SIZE 100 +#define INCREMENT_BY 25 + +typedef struct { + size_t element_size; + size_t max; + size_t size; + uint8_t *elements; +} list_t; + +list_t *list_create(size_t element_size); +void list_add(list_t *list, void *element); +void *list_get(list_t *list, size_t i); +void list_delete(list_t *list); + +#endif |
