From 33cbe45795557da6a1cb8921c03bc5213e15b005 Mon Sep 17 00:00:00 2001 From: Dominik Kaiser Date: Sat, 13 Apr 2024 14:39:57 +0200 Subject: [PATCH] Finish command handling and add command printing --- command_handling.c | 133 +++++++++++++++++++++++++++++++-------------- push_swap.h | 10 +++- stack_utils.c | 15 +++-- 3 files changed, 108 insertions(+), 50 deletions(-) diff --git a/command_handling.c b/command_handling.c index 484c858..0fffb1e 100644 --- a/command_handling.c +++ b/command_handling.c @@ -1,48 +1,99 @@ -#include "libft/libft.h" +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* command_handling.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: dkaiser next->next) - *stack = (*stack)->next; - (*stack)->next->next = first_elem; - (*stack)->next = NULL; + first_elem = *stack; + while ((*stack)->next->next) + *stack = (*stack)->next; + (*stack)->next->next = first_elem; + (*stack)->next = NULL; } -- 2.47.2