27 lines
1.0 KiB
C
27 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_lstadd_back_bonus.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: pbonilla <eirodeis.lepnj@gmail.com> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2020/12/04 16:04:08 by pbonilla #+# #+# */
|
||
|
/* Updated: 2020/12/04 16:04:11 by pbonilla ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
void ft_lstadd_back(t_list **alst, t_list *new)
|
||
|
{
|
||
|
t_list *suiv;
|
||
|
|
||
|
if (!*alst)
|
||
|
{
|
||
|
*alst = new;
|
||
|
return ;
|
||
|
}
|
||
|
suiv = ft_lstlast(*alst);
|
||
|
suiv->next = new;
|
||
|
}
|