diff options
| author | Dominik Kaiser | 2024-04-13 15:00:31 +0200 |
|---|---|---|
| committer | Dominik Kaiser | 2024-04-13 15:00:31 +0200 |
| commit | e8e671060271e9471b37aedb712d30855ff9df8c (patch) | |
| tree | ad626652bd9107999a549692d4572029758fd413 | |
| parent | 8d2fe088d72dfebfc96e7bd9b1eae9b3e02f804a (diff) | |
| download | push_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.
| -rw-r--r-- | main.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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; } |
