From 17f9a5affdf095618e2a240ed01bc8a31d7172b5 Mon Sep 17 00:00:00 2001 From: Maoake Teriierooiterai Date: Wed, 7 Jan 2026 13:27:06 +0100 Subject: [PATCH] delete the parsing2.c cause no use for now --- Makefile | 2 +- headers/parsing.h | 1 - parsing/parsing_2.c | 55 --------------------------------------------- 3 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 parsing/parsing_2.c diff --git a/Makefile b/Makefile index 9d20870..9911a0a 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ INSERTION = insertion.c FLAGS_FILES = algorithms_sort.c flag.c -PARSING = ft_atoi.c parsing.c parsing_2.c ft_strncmp.c +PARSING = ft_atoi.c parsing.c ft_strncmp.c STACK_UTILS = push.c rev_rotate.c rotate.c stack_add.c stack_remove.c stacks_len.c swap.c print_stacks.c diff --git a/headers/parsing.h b/headers/parsing.h index 5a59a8d..72ac070 100644 --- a/headers/parsing.h +++ b/headers/parsing.h @@ -14,7 +14,6 @@ # define PARSING_H int ft_atoi(const char *nptr); -t_stacks *init_big_stacks2(int *tab, int len); t_stacks *init_big_stacks(int argc, char **argv); int ft_strncmp(const char *s1, const char *s2, int n); diff --git a/parsing/parsing_2.c b/parsing/parsing_2.c deleted file mode 100644 index b1f653f..0000000 --- a/parsing/parsing_2.c +++ /dev/null @@ -1,55 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* parsing_2.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: mteriier +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2025/12/22 13:10:58 by mteriier #+# #+# */ -/* Updated: 2025/12/22 13:11:21 by mteriier ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include "push_swap.h" -#include - -static t_stack *parsing2(int *tab, int len) -{ - int i; - int stock; - t_stack *first; - t_stack *new; - - i = 0; - first = NULL; - while (i < len) - { - stock = tab[i]; - new = new_stack(stock); - if (!new && !first) - return (NULL); - else if (!new) - { - stack_clear_all(first, first); - return (NULL); - } - stack_add_back(&first, new); - i++; - } - return (first); -} - -t_stacks *init_big_stacks2(int *tab, int len) -{ - t_stacks *stacks; - t_stack *a; - - stacks = malloc(sizeof(t_stacks)); - stacks->a = NULL; - stacks->b = NULL; - if (!stacks) - return (NULL); - a = parsing2(tab, len); - stacks->a = a; - return (stacks); -}