/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_list_push_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jayang <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/23 10:59:19 by jayang #+# #+# */
/* Updated: 2022/02/24 09:53:23 by jayang ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_list.h"
void ft_list_push_back(t_list **begin_list, void *data)
{
t_list *current;
if (*begin_list == 0)
{
*begin_list = ft_create_elem(data);
return ;
}
current = *begin_list;
while (current->next != 0)
current = current->next;
current->next = ft_create_elem(data);
}