summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDominik Kaiser2024-04-13 15:00:31 +0200
committerDominik Kaiser2024-04-13 15:00:31 +0200
commite8e671060271e9471b37aedb712d30855ff9df8c (patch)
treead626652bd9107999a549692d4572029758fd413 /main.c
parent8d2fe088d72dfebfc96e7bd9b1eae9b3e02f804a (diff)
downloadpush_swap-e8e671060271e9471b37aedb712d30855ff9df8c.tar.gz
push_swap-e8e671060271e9471b37aedb712d30855ff9df8c.zip
Add debug printing to main
This will be removed in the end but for now it is nice to see if the stack has actually been sorted.
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.c b/main.c
index fcb75fc..45f5b56 100644
--- a/main.c
+++ b/main.c
@@ -6,15 +6,17 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/12 17:03:30 by dkaiser #+# #+# */
-/* Updated: 2024/04/13 14:52:31 by dkaiser ### ########.fr */
+/* Updated: 2024/04/13 14:56:18 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
+#include "libft/ft_printf.h"
+#include "libft/libft.h"
#include "push_swap.h"
static void print_content(void *content)
{
- ft_printf("%d\n", *(int *)content);
+ ft_printf("%d ", *(int *)content);
}
int main(int argc, char *argv[])
@@ -33,6 +35,11 @@ int main(int argc, char *argv[])
pscmds = NULL;
// TODO: Optimize commands
+ ft_printf("A:");
+ ft_lstiter(stack_a, print_content);
+ ft_printf("\nB:");
+ ft_lstiter(stack_b, print_content);
+ ft_printf("\n\nCMDS:\n");
print_commands(pscmds);
return 0;
}