mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 00:41:57 +00:00
modified some files like all files in stack utils and adding main.c and modified atoi and parssing
This commit is contained in:
40
main.c
Normal file
40
main.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* main.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mteriier <mteriier@student.42lyon.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/12/08 18:32:35 by mteriier #+# #+# */
|
||||
/* Updated: 2025/12/08 20:36:49 by mteriier ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "push_swap.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void print_all_stack(t_stack *stack, t_stack *first)
|
||||
{
|
||||
t_stack *tmp;
|
||||
|
||||
tmp = stack;
|
||||
printf("TAB\n");
|
||||
while (tmp->next != first)
|
||||
{
|
||||
printf("[%d] ", tmp->value);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
printf("[%d] \n", tmp->value);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
t_stack *first;
|
||||
|
||||
if (argc > 1)
|
||||
{
|
||||
first = parsing(argc, argv);
|
||||
print_all_stack(first, first);
|
||||
}
|
||||
stack_clear_all(first, first);
|
||||
}
|
||||
Reference in New Issue
Block a user