diff options
Diffstat (limited to 'src/list.h')
-rw-r--r-- | src/list.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h new file mode 100644 index 0000000..71594ad --- /dev/null +++ b/src/list.h @@ -0,0 +1,25 @@ +/* + * src/list.h + * (c) 2021 Jonas Gunz <himself@jonasgunz.de> + * License: MIT + */ + +#pragma once + +#include <stdio.h> +#include <stdlib.h> + +typedef struct list_element list_element_t; + +struct list_element { + void* data; + list_element_t* next; +}; + +int list_add( list_element_t** _root, void* _data ); + +int list_sort ( list_element_t** _root ); + +int list_length ( list_element_t* _root ); + +void* list_pop_front ( list_element_t** _root ); |