|
libft
|
Linked list for libft. More...
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | s_list |
Typedefs | |
| typedef struct s_list | t_list |
| Node structure for singly linked list. | |
Functions | |
| void | ft_del (void *content) |
| Deletes content pointer in a list node (utility function). | |
| void | ft_lstadd_back (t_list **lst, t_list *new) |
| Adds a node to the end of a list. | |
| void | ft_lstadd_front (t_list **lst, t_list *new) |
| Adds a node to the front of a list. | |
| void | ft_lstclear (t_list **lst, void(*del)(void *)) |
| Clears an entire list, deleting all its nodes. | |
| void | ft_lstdelone (t_list *lst, void(*del)(void *)) |
| Deletes a single node using a deletion function. | |
| void | ft_lstiter (t_list *lst, void(*f)(void *)) |
| Applies a function to each element of the list. | |
| t_list * | ft_lstlast (t_list *lst) |
| Returns the last node of the list. | |
| t_list * | ft_lstmap (t_list *lst, void *(*f)(void *), void(*del)(void *)) |
| Creates a new list by applying a function to each node. | |
| t_list * | ft_lstnew (void *content) |
| Creates a new list node. | |
| int | ft_lstsize (t_list *lst) |
| Counts the number of nodes in a list. | |
Linked list for libft.
This header defines the singly-linked list type t_list and the utility functions used to manipulate linked lists.
Features include:
content pointer in each node can point to any type of data.NULL-safe and follow defensive programming principles.