summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDominik Kaiser2024-04-13 14:52:57 +0200
committerDominik Kaiser2024-04-13 14:52:57 +0200
commitabc12d29679ae6049c9cacbf09a897529377d79c (patch)
tree5b82dec8bfb4332652ced35a44653ddc22c7aa89 /main.c
parent2cef393801e18d68c762e293b5cef1194f77e078 (diff)
downloadpush_swap-abc12d29679ae6049c9cacbf09a897529377d79c.tar.gz
push_swap-abc12d29679ae6049c9cacbf09a897529377d79c.zip
Add command handling to makefile and setup main
Diffstat (limited to 'main.c')
-rw-r--r--main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/main.c b/main.c
index e9a96e1..fcb75fc 100644
--- a/main.c
+++ b/main.c
@@ -6,11 +6,10 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/12 17:03:30 by dkaiser #+# #+# */
-/* Updated: 2024/04/12 18:55:38 by dkaiser ### ########.fr */
+/* Updated: 2024/04/13 14:52:31 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
-#include "libft/libft.h"
#include "push_swap.h"
static void print_content(void *content)
@@ -21,6 +20,8 @@ static void print_content(void *content)
int main(int argc, char *argv[])
{
t_list *stack_a;
+ t_list *stack_b;
+ t_list *pscmds;
stack_a = create_stack(argc, argv);
if (!stack_a)
@@ -28,12 +29,10 @@ int main(int argc, char *argv[])
ft_putendl_fd("Error", 2);
return 1;
}
+ stack_b = NULL;
+ pscmds = NULL;
- ft_lstiter(stack_a, print_content);
-
- // TODO: Sort stack
// TODO: Optimize commands
- // TODO: Print commands
-
+ print_commands(pscmds);
return 0;
}