-
Notifications
You must be signed in to change notification settings - Fork 0
/
lst.h
33 lines (29 loc) · 1.42 KB
/
lst.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* lst.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: scambier <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/24 16:45:09 by scambier #+# #+# */
/* Updated: 2024/05/08 19:04:46 by scambier ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LST_H
# define LST_H
typedef struct s_list
{
void *content;
struct s_list *next;
} t_list;
t_list *ft_lstnew(void *content);
void ft_lstadd_front(t_list **lst, t_list *n);
int ft_lstsize(t_list *lst);
t_list *ft_lstlast(t_list *lst);
void ft_lstadd_back(t_list **lst, t_list *n);
void ft_lstdelone(t_list *lst, void (*del)(void*));
void ft_lstclear(t_list **lst, void (*del)(void*));
void ft_lstiter(t_list *lst, void (*f)(void *));
t_list *ft_lstmap(t_list *lst, void *(*f)(void *), void (*del)(void *));
void **ft_lstexport(t_list *lst);
#endif