ft_lstpop
This commit is contained in:
parent
0d10f17f9d
commit
f65b74dcb3
2 changed files with 12 additions and 0 deletions
11
libft/ft_lstpop.c
Normal file
11
libft/ft_lstpop.c
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#include "libft.h"
|
||||||
|
|
||||||
|
t_list *ft_lstpop(t_list **lst)
|
||||||
|
{
|
||||||
|
t_list *top;
|
||||||
|
|
||||||
|
top = *lst;
|
||||||
|
if (*lst)
|
||||||
|
*lst = (*lst)->next;
|
||||||
|
return (top);
|
||||||
|
}
|
||||||
|
|
@ -96,6 +96,7 @@ void ft_lst_cfree(void *ptr, size_t size);
|
||||||
t_list *ft_lst_filter(t_list *lst, void const *data_ref, t_list *(*f)(t_list *elem, void const *));
|
t_list *ft_lst_filter(t_list *lst, void const *data_ref, t_list *(*f)(t_list *elem, void const *));
|
||||||
t_list *ft_lst_removeif(t_list **alst, void *data_ref, int (*cmp)());
|
t_list *ft_lst_removeif(t_list **alst, void *data_ref, int (*cmp)());
|
||||||
t_list *ft_lst_find(t_list *begin_list, void *data_ref, int (*cmp)());
|
t_list *ft_lst_find(t_list *begin_list, void *data_ref, int (*cmp)());
|
||||||
|
t_list *ft_lstpop(t_list **lst);
|
||||||
|
|
||||||
int ft_diff(void *a, void *b);
|
int ft_diff(void *a, void *b);
|
||||||
t_list *ft_id(t_list *a);
|
t_list *ft_id(t_list *a);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue