Initial commit

This commit is contained in:
2026-01-09 15:20:33 +01:00
commit d0a9d550e5
31 changed files with 2248 additions and 0 deletions

28
srcs/push_swap/action2.c Normal file
View File

@@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* action2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lejulien <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/04/01 14:52:29 by lejulien #+# #+# */
/* Updated: 2021/04/01 14:53:06 by lejulien ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
#include <stdlib.h>
void
stack_dup(t_stack **res, t_stack **src)
{
t_stack *ptr;
*res = NULL;
ptr = *src;
while (ptr)
{
add_to_stack(res, ptr->value, 0);
ptr = ptr->next;
}
}