From 24fbfb8c41c62b11506668a22074379115f57600 Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 24 Oct 2025 13:32:54 -0500 Subject: implement basic linked list append --- lichen.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lichen.h') diff --git a/lichen.h b/lichen.h index b30c8cb..a607d24 100644 --- a/lichen.h +++ b/lichen.h @@ -41,9 +41,18 @@ typedef struct li_ll_t { int tag; size_t count; li_llnode_t *head; + li_llnode_t *end; } li_ll_t; +// allocate a linked list +struct li_ll_t * li_alloc_ll(); +// free a linked list +void li_free_ll(struct li_ll_t *list, void (*free_data)(void*)); +void li_ll_append(struct li_ll_t *list, void *data); +struct li_ll_t * li_copy_list(struct li_ll_t *list); + + #endif -- cgit v1.2.1