style: reoarginsed the file and fix the makefile
This commit is contained in:
parent
ecd9608320
commit
a5fe7484a1
46 changed files with 140 additions and 49 deletions
|
|
@ -1,28 +0,0 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_lstadd_back.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/12 11:39:56 by rparodi #+# #+# */
|
||||
/* Updated: 2023/11/12 17:11:53 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void ft_lstadd_back(t_list **lst, t_list *new)
|
||||
{
|
||||
t_list *tempo;
|
||||
|
||||
if (*lst == NULL)
|
||||
{
|
||||
*lst = new;
|
||||
return ;
|
||||
}
|
||||
tempo = *lst;
|
||||
while (tempo->next != NULL)
|
||||
tempo = tempo->next;
|
||||
tempo->next = new;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue