mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-14 16:18:47 +02:00
「🔨」 fix(libft): replaced libft by a better one :D
This commit is contained in:
29
libft/src/stack/ft_stackadd_back.c
Normal file
29
libft/src/stack/ft_stackadd_back.c
Normal file
@ -0,0 +1,29 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_stackadd_back.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: mmoussou <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/18 00:36:32 by mmoussou #+# #+# */
|
||||
/* Updated: 2024/01/18 00:39:38 by mmoussou ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void ft_stackadd_back(t_stack **stack, t_stack *new)
|
||||
{
|
||||
t_stack *tmp;
|
||||
|
||||
if (!stack || !new)
|
||||
return ;
|
||||
if (!*stack)
|
||||
{
|
||||
*stack = new;
|
||||
return ;
|
||||
}
|
||||
tmp = *stack;
|
||||
tmp = ft_stacklast(*stack);
|
||||
tmp->next = new;
|
||||
}
|
Reference in New Issue
Block a user