diff options
| author | Dominik Kaiser | 2024-04-13 14:45:30 +0200 |
|---|---|---|
| committer | Dominik Kaiser | 2024-04-13 14:45:30 +0200 |
| commit | 2cef393801e18d68c762e293b5cef1194f77e078 (patch) | |
| tree | ea89ee54a54285a31d84ad1fefb15d0c5e4a8dfd | |
| parent | 33cbe45795557da6a1cb8921c03bc5213e15b005 (diff) | |
| download | push_swap-2cef393801e18d68c762e293b5cef1194f77e078.tar.gz push_swap-2cef393801e18d68c762e293b5cef1194f77e078.zip | |
Add command list printing
| -rw-r--r-- | command_handling.c | 4 | ||||
| -rw-r--r-- | push_swap.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/command_handling.c b/command_handling.c index 0fffb1e..e25f47c 100644 --- a/command_handling.c +++ b/command_handling.c @@ -6,10 +6,11 @@ /* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/13 14:38:47 by dkaiser #+# #+# */ -/* Updated: 2024/04/13 14:39:09 by dkaiser ### ########.fr */ +/* Updated: 2024/04/13 14:43:45 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ +#include "libft/libft.h" #include "push_swap.h" static int add_cmd_to_queue(t_list **cmds, enum e_pscmd cmd) @@ -96,4 +97,5 @@ static void print_cmd(void *ptr_cmd) void print_commands(t_list *cmds) { + ft_lstiter(cmds, print_cmd); } diff --git a/push_swap.h b/push_swap.h index d8c13f4..332da4e 100644 --- a/push_swap.h +++ b/push_swap.h @@ -6,7 +6,7 @@ /* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/04/12 16:59:09 by dkaiser #+# #+# */ -/* Updated: 2024/04/13 14:33:46 by dkaiser ### ########.fr */ +/* Updated: 2024/04/13 14:45:16 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ @@ -39,5 +39,6 @@ void stack_rrotate(t_list **stack); void run_command(t_list **stack_a, t_list **stack_b, t_list **cmds, enum e_pscmd cmd); +void print_commands(t_list *cmds) #endif // PUSH_SWAP_H |
