/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* push_swap.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/11/23 16:48:12 by erey-bet #+# #+# */ /* Updated: 2022/11/27 23:10:27 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft/libft.h" #include "push_swap.h" #include void get_index(int *tab, int **index) { int i; int min; int new_index; i = 0; min = tab[0]; new_index = 0; while (i < argc) { } } void push_swap(int *tab, int argc) { int *index; index = malloc(sizeof(int) * (argc + 1)); get_index(tab, &index); } int main(int argc, char *argv[]) { int *tab; int i; int y; int test; tab = malloc(sizeof(int) * (argc + 1)); i = 0; y = 0; if (argc > 1) { while (++i < argc) { if(ft_atoi_check(argv[i])) tab[y++] = ft_atoi(argv[i]); else { write(1, "Error\n", 6); return (1); } } tab[y] = NULL; push_swap(tab, argc); } return (0); }