From 4234bab4286063966f6318970398696ecba1e3c5 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Thu, 13 Apr 2023 16:20:02 +0200 Subject: [PATCH] split why2-llist stuff into nodes and list idk how to describe it --- include/llist.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/llist.h b/include/llist.h index 3af16e1..a322a63 100644 --- a/include/llist.h +++ b/include/llist.h @@ -19,14 +19,19 @@ along with this program. If not, see . #ifndef WHY2_LLIST_H #define WHY2_LLIST_H +//TYPEDEFS typedef struct _why2_node { void *value; struct _why2_node *next; } why2_node_t; //SINGLE LINKED LIST -typedef why2_node_t why2_list_t; //just to make the code make sense +typedef struct +{ + why2_node_t *head; +} why2_list_t; +//FUNCTIONS void why2_list_push(why2_node_t *llist_head, void *value); //PUSH ELEMENT TO LIST BACK void why2_list_remove(why2_node_t *llist_head, why2_node_t *node); //REMOVE ELEMENT void why2_list_remove_back(why2_node_t *llist_head); //REMOVE LAST ELEMENT