Added memorybook to parsing and cleaned most of the files

This commit is contained in:
Philippe BLAGOJEVIC
2022-05-04 14:38:34 +02:00
parent e564e7c8e9
commit 362668fe35
231 changed files with 11474 additions and 405 deletions

View File

@@ -0,0 +1,32 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstfree.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: simplonco <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/03/24 15:49:35 by simplonco #+# #+# */
/* Updated: 2022/05/04 14:18:07 by pblagoje ### ########.fr */
/* */
/* ************************************************************************** */
/*
* delete and free an element of a two-way list and all the followings
*/
#include "libft.h"
void ft_lstfree(t_list *lst, void (*del)(void *))
{
t_list *next;
if (lst && lst->prev)
lst->prev->next = NULL;
while (lst != NULL)
{
next = lst->next;
del(lst->content);
free(lst);
lst = next;
}
}