39 lines
1.7 KiB
C
39 lines
1.7 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_list.h :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2016/11/08 15:12:28 by gtertysh #+# #+# */
|
||
|
/* Updated: 2016/11/09 21:53:58 by gtertysh ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#ifndef FT_LIST_H
|
||
|
# define FT_LIST_H
|
||
|
|
||
|
typedef struct s_list
|
||
|
{
|
||
|
void *data;
|
||
|
struct s_list *next;
|
||
|
} t_list;
|
||
|
|
||
|
t_list *ft_create_elem(void *data);
|
||
|
t_list *ft_list_last(t_list *begin_list);
|
||
|
t_list *ft_list_push_params(int ac, char **av);
|
||
|
t_list *ft_list_at(t_list *begin_list, unsigned int nbr);
|
||
|
void ft_list_print(t_list *list);
|
||
|
void ft_list_push_back(t_list **begin_list, void *data);
|
||
|
void ft_list_push_front(t_list **begin_list, void *data);
|
||
|
void ft_list_clear(t_list **begin_list);
|
||
|
void ft_list_reverse(t_list **begin_list);
|
||
|
void ft_list_foreach(t_list *begin_list, void (*f)(void *));
|
||
|
void ft_list_foreach_if(t_list *begin_list, void (*f)(void *),
|
||
|
void *data_ref, int (*cmp)());
|
||
|
t_list *ft_list_find(t_list *begin_list,
|
||
|
void *data_ref, int (*cmp)());
|
||
|
int ft_list_size(t_list *begin_list);
|
||
|
|
||
|
#endif
|