finish to link all the files

This commit is contained in:
Maoake Teriierooiterai
2026-01-07 10:06:38 +01:00
parent ca732b1b97
commit 95577e5f02
15 changed files with 158 additions and 319 deletions

View File

@@ -11,6 +11,8 @@
/* ************************************************************************** */
#include "push_swap.h"
#include "parsing.h"
#include "medium_headers.h"
#include <stdio.h>
#include <stdlib.h>
@@ -33,29 +35,3 @@ int test1(int argc, char **argv)
free(piles);
return (0);
}
int test2(char **argv)
{
int *tab;
int len;
t_tab *preset;
t_stacks *piles;
len = ft_atoi(argv[2]);
if (len < 1)
{
printf("WRONG LEN PLS BE SMART.\n");
return (0);
}
tab = auto_shuffle(len);
piles = init_big_stacks2(tab, len);
preset = get_tabs(piles->a, range_bucket(piles->a));
bucket_algo(piles, preset, range_bucket(piles->a));
free(tab);
if (piles->a)
stack_clear_all(piles->a, piles->a);
if (piles->b)
stack_clear_all(piles->b, piles->b);
free(piles);
return (0);
}