42/d11/ex06/ft_list.h

35 lines
1.5 KiB
C
Raw Normal View History

2016-11-20 02:20:23 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_list.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/08 15:12:28 by gtertysh #+# #+# */
/* Updated: 2016/11/09 18:18:23 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 *));
int ft_list_size(t_list *begin_list);
#endif