push_swap/push_swap.c
Etienne Rey-bethbeder 719b712dae UWO
2022-11-27 16:38:05 +01:00

47 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* push_swap.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/23 16:48:12 by erey-bet #+# #+# */
/* Updated: 2022/11/23 17:25:59 by erey-bet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft/libft.h"
#include "push_swap.h"
#include <stdio.h>
void push_swap(int *pa)
{
}
int main(int argc, char *argv[])
{
int *tab;
int i;
int test;
tab = malloc(sizeof(int) * argc);
i = 0;
if (argc > 1)
{
while (++i < argc)
{
if(ft_atoi_check(argv[i]))
*tab++ = ft_atoi(argv[i]);
else
{
write(1, "Error\n", 6);
return (1);
}
}
}
return (0);
}