28 lines
1.1 KiB
C
28 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lsteadd.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2016/11/03 14:57:17 by jhalford #+# #+# */
|
|
/* Updated: 2017/03/13 15:37:23 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void ft_lsteadd(t_list **alst, t_list *new)
|
|
{
|
|
t_list *lst;
|
|
|
|
lst = *alst;
|
|
if (lst)
|
|
{
|
|
while (lst->next)
|
|
lst = lst->next;
|
|
lst->next = new;
|
|
}
|
|
else
|
|
*alst = new;
|
|
}
|