Archived
1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
push_swap/stack/ft_stackadd_back.c

26 lines
1.1 KiB
C
Raw Normal View History

2024-02-12 15:27:29 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_stackadd_back.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/05 11:40:39 by adjoly #+# #+# */
2024-02-22 13:38:34 +01:00
/* Updated: 2024/02/22 13:32:31 by adjoly ### ########.fr */
2024-02-12 15:27:29 +01:00
/* */
/* ************************************************************************** */
#include "../push_swap.h"
void ft_stackadd_back(t_stack **stack, t_stack *new)
{
if (!stack)
return ;
if (!*stack)
{
(*stack) = new;
return ;
}
ft_stacklast(*stack)->next = new;
}