implemented why2_list_t in all llist-related functions' declarations

This commit is contained in:
Václav Šmejkal 2023-04-13 16:34:52 +02:00
parent 4234bab428
commit ff2ec4078d
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -24,17 +24,17 @@ typedef struct _why2_node
{ {
void *value; void *value;
struct _why2_node *next; struct _why2_node *next;
} why2_node_t; //SINGLE LINKED LIST } why2_node_t; //NODES
typedef struct typedef struct
{ {
why2_node_t *head; why2_node_t *head;
} why2_list_t; } why2_list_t; //SINGLE LINKED LIST MADE OF why2_node_t
//FUNCTIONS //FUNCTIONS
void why2_list_push(why2_node_t *llist_head, void *value); //PUSH ELEMENT TO LIST BACK void why2_list_push(why2_list_t *list, 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(why2_list_t *list, why2_node_t *node); //REMOVE ELEMENT
void why2_list_remove_back(why2_node_t *llist_head); //REMOVE LAST ELEMENT void why2_list_remove_back(why2_list_t *list); //REMOVE LAST ELEMENT
why2_node_t *why2_list_find(why2_node_t *llist_head, void *value); //FIND ELEMENT IN LIST why2_node_t *why2_list_find(why2_list_t *list, void *value); //FIND ELEMENT IN LIST
#endif #endif