delete the parsing2.c cause no use for now

This commit is contained in:
Maoake Teriierooiterai
2026-01-07 13:27:06 +01:00
parent e1351b4d2f
commit 17f9a5affd
3 changed files with 1 additions and 57 deletions

View File

@@ -28,7 +28,7 @@ INSERTION = insertion.c
FLAGS_FILES = algorithms_sort.c flag.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 STACK_UTILS = push.c rev_rotate.c rotate.c stack_add.c stack_remove.c stacks_len.c swap.c print_stacks.c

View File

@@ -14,7 +14,6 @@
# define PARSING_H # define PARSING_H
int ft_atoi(const char *nptr); int ft_atoi(const char *nptr);
t_stacks *init_big_stacks2(int *tab, int len);
t_stacks *init_big_stacks(int argc, char **argv); t_stacks *init_big_stacks(int argc, char **argv);
int ft_strncmp(const char *s1, const char *s2, int n); int ft_strncmp(const char *s1, const char *s2, int n);

View File

@@ -1,55 +0,0 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parsing_2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mteriier <mteriier@student.lyon42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/22 13:10:58 by mteriier #+# #+# */
/* Updated: 2025/12/22 13:11:21 by mteriier ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
#include <stdlib.h>
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);
}