text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_lstadd_back.c                                   :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: cshelli <cshelli@student.42.fr>            +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2020/11/09 19:30:14 by cshelli           #+#    #+#             */
  /*   Updated: 2020/11/09 20:16:08 by cshelli          ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  void	ft_lstadd_back(t_list **lst, t_list *new)
  {
  	t_list	*list;
  
  	list = NULL;
  	if (!lst || !new)
  		return ;
  	if (!(*lst))
  		*lst = new;
  	else
  	{
  		list = *lst;
  		while (list->next)
  			list = list->next;
  		list->next = new;
  	}
  }
  