From: Dominik Kaiser Date: Sat, 13 Apr 2024 12:39:57 +0000 (+0200) Subject: Finish command handling and add command printing X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=33cbe45795557da6a1cb8921c03bc5213e15b005;p=42%2Fpush_swap.git Finish command handling and add command printing --- 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; }