From 60af4e44b0dbcbc4be71dce27c033f791cfda065 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Thu, 24 Mar 2022 16:49:59 +0100 Subject: [PATCH] change fonctions pour list avec nouvelles fonctions pour listes a deux sens --- Makefile | 37 ++++++++++++----- includes/libft.h | 21 +++++++++- srcs/ft_lst_find.bak | 24 +++++++++++ srcs/{ft_lstadd_back.c => ft_lstadd_back.bak} | 0 ...{ft_lstadd_front.c => ft_lstadd_front.bak} | 0 srcs/ft_lstbegin.c | 25 +++++++++++ srcs/{ft_lstclear.c => ft_lstclear.bak} | 0 srcs/ft_lstcopy.c | 34 +++++++++++++++ srcs/ft_lstcreate.c | 31 ++++++++++++++ srcs/{ft_lstdelone.c => ft_lstdelone.bak} | 0 srcs/ft_lstend.c | 24 +++++++++++ srcs/ft_lsterase.c | 30 ++++++++++++++ srcs/ft_lstfind.c | 25 +++++++++++ srcs/ft_lstfree.c | 33 +++++++++++++++ srcs/ft_lstinsert.c | 27 ++++++++++++ srcs/{ft_lstiter.c => ft_lstiter.bak} | 0 srcs/{ft_lstlast.c => ft_lstlast.bak} | 0 srcs/ft_lstlen.c | 30 ++++++++++++++ srcs/ft_lstloop.c | 30 ++++++++++++++ srcs/ft_lstloop_back.c | 30 ++++++++++++++ srcs/{ft_lstmap.c => ft_lstmap.bak} | 0 srcs/{ft_lstnew.c => ft_lstnew.bak} | 0 srcs/ft_lstpush_back.c | 41 +++++++++++++++++++ srcs/ft_lstpush_front.c | 24 +++++++++++ srcs/ft_lstremove.delete | 31 ++++++++++++++ ...remove_next.c => ft_lstremove_next.delete} | 0 srcs/{ft_lstsize.c => ft_lstsize.bak} | 0 27 files changed, 484 insertions(+), 13 deletions(-) create mode 100644 srcs/ft_lst_find.bak rename srcs/{ft_lstadd_back.c => ft_lstadd_back.bak} (100%) rename srcs/{ft_lstadd_front.c => ft_lstadd_front.bak} (100%) create mode 100644 srcs/ft_lstbegin.c rename srcs/{ft_lstclear.c => ft_lstclear.bak} (100%) create mode 100644 srcs/ft_lstcopy.c create mode 100644 srcs/ft_lstcreate.c rename srcs/{ft_lstdelone.c => ft_lstdelone.bak} (100%) create mode 100644 srcs/ft_lstend.c create mode 100644 srcs/ft_lsterase.c create mode 100644 srcs/ft_lstfind.c create mode 100644 srcs/ft_lstfree.c create mode 100644 srcs/ft_lstinsert.c rename srcs/{ft_lstiter.c => ft_lstiter.bak} (100%) rename srcs/{ft_lstlast.c => ft_lstlast.bak} (100%) create mode 100644 srcs/ft_lstlen.c create mode 100644 srcs/ft_lstloop.c create mode 100644 srcs/ft_lstloop_back.c rename srcs/{ft_lstmap.c => ft_lstmap.bak} (100%) rename srcs/{ft_lstnew.c => ft_lstnew.bak} (100%) create mode 100644 srcs/ft_lstpush_back.c create mode 100644 srcs/ft_lstpush_front.c create mode 100644 srcs/ft_lstremove.delete rename srcs/{ft_lstremove_next.c => ft_lstremove_next.delete} (100%) rename srcs/{ft_lstsize.c => ft_lstsize.bak} (100%) diff --git a/Makefile b/Makefile index c3937a8..901c31b 100644 --- a/Makefile +++ b/Makefile @@ -62,15 +62,19 @@ SRCS = ft_memset.c \ ft_putendl_fd.c \ ft_putnbr_fd.c \ \ - ft_lstnew.c \ - ft_lstadd_front.c \ - ft_lstsize.c \ - ft_lstlast.c \ - ft_lstadd_back.c \ - ft_lstdelone.c \ - ft_lstclear.c \ - ft_lstiter.c \ - ft_lstmap.c \ + ft_lstcreate.c \ + ft_lstpush_back.c \ + ft_lstpush_front.c \ + ft_lstloop.c \ + ft_lstloop_back.c \ + ft_lstbegin.c \ + ft_lstend.c \ + ft_lstfind.c \ + ft_lstinsert.c \ + ft_lsterase.c \ + ft_lstfree.c \ + ft_lstlen.c \ + ft_lstcopy.c \ \ ft_strcat.c \ ft_strcmp.c \ @@ -120,8 +124,19 @@ SRCS = ft_memset.c \ ft_sqrt.c \ ft_free_tab.c \ \ - ft_arrintchr.c \ - ft_lstremove_next.c + ft_arrintchr.c + + # ft_lstremove.c \ + ft_lstfind.c + # ft_lstnew.c \ + ft_lstadd_front.c \ + ft_lstsize.c \ + ft_lstlast.c \ + ft_lstadd_back.c \ + ft_lstdelone.c \ + ft_lstclear.c \ + ft_lstiter.c \ + ft_lstmap.c ODIR = ./builds diff --git a/includes/libft.h b/includes/libft.h index 56b1d85..16430c8 100644 --- a/includes/libft.h +++ b/includes/libft.h @@ -6,7 +6,7 @@ /* By: hulamy +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/11/25 14:45:53 by hulamy #+# #+# */ -/* Updated: 2022/03/23 21:51:14 by simplonco ### ########.fr */ +/* Updated: 2022/03/24 16:38:25 by simplonco ### ########.fr */ /* */ /* ************************************************************************** */ @@ -60,9 +60,11 @@ void ft_putnbr_fd(int n, int fd); typedef struct s_list { void *content; + struct s_list *prev; struct s_list *next; } t_list; +/* t_list *ft_lstnew(void *content); void ft_lstadd_front(t_list **alst, t_list *n); void *ft_lstadd_back(t_list **alst, t_list *n); @@ -72,6 +74,22 @@ void ft_lstdelone(t_list *lst, void (*del)(void *)); void ft_lstclear(t_list **lst, void (*del)(void *)); void ft_lstiter(t_list *lst, void (*f)(void *)); t_list *ft_lstmap(t_list *l, void *(*f)(void*), void (*d)(void*)); +*/ +//void ft_lstremove(t_list *lst, void (*del)(void *)); +//t_list *ft_lstfind(t_list *lst, void *to_find, int (*comp)(void*, void *)); +t_list *ft_lstcreate(void *content); +void *ft_lstpush_back(t_list **lst, t_list *new); +void ft_lstpush_front(t_list **alst, t_list *new); +void ft_lstloop(t_list *lst, void (*f)(void *)); +void ft_lstloop_back(t_list *lst, void (*f)(void *)); +t_list *ft_lstbegin(t_list *lst); +t_list *ft_lstend(t_list *lst); +t_list *ft_lstfind(t_list *lst, void *to_find, int (*comp)(void*, void *)); +void ft_lstinsert(t_list *lst, t_list *new); +void ft_lsterase(t_list *lst, void (*del)(void *)); +void ft_lstfree(t_list *lst, void (*del)(void *)); +int ft_lstlen(t_list *lst); +t_list *ft_lstcopy(t_list *lst, void *(*cpy)(void *)); char *ft_strcat(char *s1, const char *s2); int ft_strcmp(const char *s1, const char *s2); @@ -114,6 +132,5 @@ int ft_sqrt(int i); void ft_free_tab(char **tab); int ft_arrintchr(int * intarr, int comp, size_t size); -void ft_lstremove_next(t_list *lst, void (*del)(void *)); #endif diff --git a/srcs/ft_lst_find.bak b/srcs/ft_lst_find.bak new file mode 100644 index 0000000..86a0dbe --- /dev/null +++ b/srcs/ft_lst_find.bak @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstfind.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/23 22:48:47 by simplonco #+# #+# */ +/* Updated: 2022/03/23 22:49:16 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * find an element with the comp function, and return a pointer to it + */ + +#include "libft.h" + +t_list *ft_lstfind(t_list *lst, void *to_find, int (*comp)(void*, void *)) +{ + while (lst && (!comp(to_find, lst->content))) + lst = lst->next; + return (lst); +} diff --git a/srcs/ft_lstadd_back.c b/srcs/ft_lstadd_back.bak similarity index 100% rename from srcs/ft_lstadd_back.c rename to srcs/ft_lstadd_back.bak diff --git a/srcs/ft_lstadd_front.c b/srcs/ft_lstadd_front.bak similarity index 100% rename from srcs/ft_lstadd_front.c rename to srcs/ft_lstadd_front.bak diff --git a/srcs/ft_lstbegin.c b/srcs/ft_lstbegin.c new file mode 100644 index 0000000..7d429c1 --- /dev/null +++ b/srcs/ft_lstbegin.c @@ -0,0 +1,25 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstbegin.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 15:05:21 by simplonco #+# #+# */ +/* Updated: 2022/03/24 15:10:45 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * return a pointer to the first element of a two-way list + */ + +#include "libft.h" + +t_list *ft_lstbegin(t_list *lst) +{ + while (lst->prev) + lst = lst->prev; + return (lst); +} + diff --git a/srcs/ft_lstclear.c b/srcs/ft_lstclear.bak similarity index 100% rename from srcs/ft_lstclear.c rename to srcs/ft_lstclear.bak diff --git a/srcs/ft_lstcopy.c b/srcs/ft_lstcopy.c new file mode 100644 index 0000000..7160e42 --- /dev/null +++ b/srcs/ft_lstcopy.c @@ -0,0 +1,34 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstcopy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 16:26:27 by simplonco #+# #+# */ +/* Updated: 2022/03/24 16:37:39 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * copy a two-way list with the copy function for the content + * and return pointer to the begining of the new list + */ + +#include "libft.h" + +t_list *ft_lstcopy(t_list *lst, void *(*cpy)(void *)) +{ + t_list *lst_copy; + + if (!lst || !cpy) + return (NULL); + lst_copy = NULL; + while (lst) + { + ft_lstpush_back(&lst_copy, ft_lstcreate(cpy(lst->content))); + lst = lst->next; + } + return (ft_lstbegin(lst_copy)); +} + diff --git a/srcs/ft_lstcreate.c b/srcs/ft_lstcreate.c new file mode 100644 index 0000000..81fc0c0 --- /dev/null +++ b/srcs/ft_lstcreate.c @@ -0,0 +1,31 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstcreate.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 13:12:50 by simplonco #+# #+# */ +/* Updated: 2022/03/24 14:29:04 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * create a new two-way list + */ + +#include "libft.h" + +t_list *ft_lstcreate(void *content) +{ + t_list *lst; + + lst = (t_list *)malloc(sizeof(*lst)); + if (!lst) + return (NULL); + lst->content = content; + lst->prev = NULL; + lst->next = NULL; + return (lst); +} + diff --git a/srcs/ft_lstdelone.c b/srcs/ft_lstdelone.bak similarity index 100% rename from srcs/ft_lstdelone.c rename to srcs/ft_lstdelone.bak diff --git a/srcs/ft_lstend.c b/srcs/ft_lstend.c new file mode 100644 index 0000000..bb04263 --- /dev/null +++ b/srcs/ft_lstend.c @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstend.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 15:11:41 by simplonco #+# #+# */ +/* Updated: 2022/03/24 15:12:17 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * return a pointer to the last element of a two-way list + */ + +#include "libft.h" + +t_list *ft_lstend(t_list *lst) +{ + while (lst->next) + lst = lst->next; + return (lst); +} diff --git a/srcs/ft_lsterase.c b/srcs/ft_lsterase.c new file mode 100644 index 0000000..75e477d --- /dev/null +++ b/srcs/ft_lsterase.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lsterase.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 15:31:16 by simplonco #+# #+# */ +/* Updated: 2022/03/24 15:40:32 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * erase an element in two-way list + * and rejoin the list + */ + +#include "libft.h" + +void ft_lsterase(t_list *lst, void (*del)(void *)) +{ + if (!lst || !del) + return ; + del(lst->content); + lst->prev->next = lst->next; + lst->next->prev = lst->prev; + free(lst); + lst = NULL; +} + diff --git a/srcs/ft_lstfind.c b/srcs/ft_lstfind.c new file mode 100644 index 0000000..297f6d0 --- /dev/null +++ b/srcs/ft_lstfind.c @@ -0,0 +1,25 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstfind.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/23 22:48:47 by simplonco #+# #+# */ +/* Updated: 2022/03/24 15:23:22 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * find an element in two-way list with the comp function + * return a pointer to it + */ + +#include "libft.h" + +t_list *ft_lstfind(t_list *lst, void *to_find, int (*comp)(void*, void *)) +{ + while (lst && (!comp(to_find, lst->content))) + lst = lst->next; + return (lst); +} diff --git a/srcs/ft_lstfree.c b/srcs/ft_lstfree.c new file mode 100644 index 0000000..7f9a0f4 --- /dev/null +++ b/srcs/ft_lstfree.c @@ -0,0 +1,33 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstfree.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 15:49:35 by simplonco #+# #+# */ +/* Updated: 2022/03/24 16:16:47 by simplonco ### ########.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; + } +} + diff --git a/srcs/ft_lstinsert.c b/srcs/ft_lstinsert.c new file mode 100644 index 0000000..3e9297d --- /dev/null +++ b/srcs/ft_lstinsert.c @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstinsert.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 15:22:46 by simplonco #+# #+# */ +/* Updated: 2022/03/24 15:31:52 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * insert an element in two-way list just after the one in parameter + * and rejoin the list + */ + +#include "libft.h" + +void ft_lstinsert(t_list *lst, t_list *new) +{ + new->next = lst->next; + lst->next = new; + new->next->prev = new; + new->prev = lst; +} + diff --git a/srcs/ft_lstiter.c b/srcs/ft_lstiter.bak similarity index 100% rename from srcs/ft_lstiter.c rename to srcs/ft_lstiter.bak diff --git a/srcs/ft_lstlast.c b/srcs/ft_lstlast.bak similarity index 100% rename from srcs/ft_lstlast.c rename to srcs/ft_lstlast.bak diff --git a/srcs/ft_lstlen.c b/srcs/ft_lstlen.c new file mode 100644 index 0000000..bc649b8 --- /dev/null +++ b/srcs/ft_lstlen.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstlen.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 16:20:25 by simplonco #+# #+# */ +/* Updated: 2022/03/24 16:22:24 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * return the len of the two-way list + */ + +#include "libft.h" + +int ft_lstlen(t_list *lst) +{ + int size; + + size = 0; + while (lst) + { + size++; + lst = lst->next; + } + return (size); +} diff --git a/srcs/ft_lstloop.c b/srcs/ft_lstloop.c new file mode 100644 index 0000000..8524029 --- /dev/null +++ b/srcs/ft_lstloop.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstloop.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 14:37:15 by simplonco #+# #+# */ +/* Updated: 2022/03/24 14:38:32 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * go forward through all elements of a two-way list + * and apply the function f to each of them + */ + +#include "libft.h" + +void ft_lstloop(t_list *lst, void (*f)(void *)) +{ + if (!f) + return ; + while (lst) + { + f(lst->content); + lst = lst->next; + } +} + diff --git a/srcs/ft_lstloop_back.c b/srcs/ft_lstloop_back.c new file mode 100644 index 0000000..da75152 --- /dev/null +++ b/srcs/ft_lstloop_back.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstloop_back.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 15:01:37 by simplonco #+# #+# */ +/* Updated: 2022/03/24 15:02:02 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * go backward through all elements of a two-way list + * and apply the function f to each of them + */ + +#include "libft.h" + +void ft_lstloop_back(t_list *lst, void (*f)(void *)) +{ + if (!f) + return ; + while (lst) + { + f(lst->content); + lst = lst->prev; + } +} + diff --git a/srcs/ft_lstmap.c b/srcs/ft_lstmap.bak similarity index 100% rename from srcs/ft_lstmap.c rename to srcs/ft_lstmap.bak diff --git a/srcs/ft_lstnew.c b/srcs/ft_lstnew.bak similarity index 100% rename from srcs/ft_lstnew.c rename to srcs/ft_lstnew.bak diff --git a/srcs/ft_lstpush_back.c b/srcs/ft_lstpush_back.c new file mode 100644 index 0000000..3d819fb --- /dev/null +++ b/srcs/ft_lstpush_back.c @@ -0,0 +1,41 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstpush_back.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 13:37:11 by simplonco #+# #+# */ +/* Updated: 2022/03/24 14:28:49 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * add an element to the end of a two-way list, or first if list has no element + * return NULL if element is NULL (eg it returned from ft_lstcreate and failed) + * or else address to the element added + */ + +#include "libft.h" + +void *ft_lstpush_back(t_list **lst, t_list *new) +{ + t_list *tmp; + + if (!new) + return (NULL); + if (lst) + { + tmp = *lst; + if (!tmp) + *lst = new; + else + { + while (tmp->next) + tmp = tmp->next; + tmp->next = new; + new->prev = tmp; + } + } + return (new); +} diff --git a/srcs/ft_lstpush_front.c b/srcs/ft_lstpush_front.c new file mode 100644 index 0000000..453054f --- /dev/null +++ b/srcs/ft_lstpush_front.c @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstpush_front.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/24 14:25:25 by simplonco #+# #+# */ +/* Updated: 2022/03/24 14:32:14 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * add an element to the begining of a two-way list + */ + +#include "libft.h" + +void ft_lstpush_front(t_list **alst, t_list *new) +{ + new->next = *alst; + (*alst)->prev = new; + *alst = new; +} diff --git a/srcs/ft_lstremove.delete b/srcs/ft_lstremove.delete new file mode 100644 index 0000000..08cd46d --- /dev/null +++ b/srcs/ft_lstremove.delete @@ -0,0 +1,31 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_lstremove.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: simplonco +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2022/03/23 22:44:55 by simplonco #+# #+# */ +/* Updated: 2022/03/23 22:46:30 by simplonco ### ########.fr */ +/* */ +/* ************************************************************************** */ + +/* + * remove an element of the list, by moving the content of the next element + * and delete and free the next element + */ + +#include "libft.h" + +void ft_lstremove(t_list *lst, void (*del)(void *)) +{ + t_list *next_tmp; + + if (!lst || !del) + return ; + next_tmp = lst->next; + del(lst->content); + lst->content = lst->next->content; + lst->next = lst->next->next; + free(next_tmp); +} diff --git a/srcs/ft_lstremove_next.c b/srcs/ft_lstremove_next.delete similarity index 100% rename from srcs/ft_lstremove_next.c rename to srcs/ft_lstremove_next.delete diff --git a/srcs/ft_lstsize.c b/srcs/ft_lstsize.bak similarity index 100% rename from srcs/ft_lstsize.c rename to srcs/ft_lstsize.bak