modified some files like all files in stack utils and adding main.c and modified atoi and parssing

This commit is contained in:
Maoake
2025-12-08 20:44:03 +00:00
parent 8e8ca5cfdc
commit 30b306d2c2
10 changed files with 87 additions and 26 deletions

View File

@@ -6,12 +6,13 @@
/* By: mteriier <mteriier@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/08 16:21:05 by mteriier #+# #+# */
/* Updated: 2025/12/08 16:50:25 by mteriier ### ########lyon.fr */
/* Updated: 2025/12/08 20:31:37 by mteriier ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
#include <stdlib.h>
#include <stdio.h>
t_stack *parsing(int argc, char **argv)
{
@@ -21,6 +22,7 @@ t_stack *parsing(int argc, char **argv)
t_stack *new;
i = 1;
first = NULL;
while (i < argc)
{
stock = ft_atoi(argv[i]);
@@ -35,4 +37,5 @@ t_stack *parsing(int argc, char **argv)
stack_add_back(&first, new);
i++;
}
return (first);
}