mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 08:41:58 +00:00
aading the push file need to be test
This commit is contained in:
33
stack_functions/push.c
Normal file
33
stack_functions/push.c
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* ::: :::::::: */
|
||||||
|
/* push.c :+: :+: :+: */
|
||||||
|
/* +:+ +:+ +:+ */
|
||||||
|
/* By: mteriier <mteriier@student.42lyon.fr> +#+ +:+ +#+ */
|
||||||
|
/* +#+#+#+#+#+ +#+ */
|
||||||
|
/* Created: 2025/12/08 15:09:40 by mteriier #+# #+# */
|
||||||
|
/* Updated: 2025/12/08 15:28:53 by mteriier ### ########lyon.fr */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
#include "push_swap.h"
|
||||||
|
|
||||||
|
void pa(t_stacks *stacks)
|
||||||
|
{
|
||||||
|
t_stack a;
|
||||||
|
|
||||||
|
if (!stacks || !stacks->b)
|
||||||
|
return ;
|
||||||
|
a = stack->a;
|
||||||
|
a-value = stacks->b->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void pb(t_stacks *stacks)
|
||||||
|
{
|
||||||
|
t_stack b;
|
||||||
|
|
||||||
|
if (!stacks || !stacks->a)
|
||||||
|
return ;
|
||||||
|
b = stacks->b;
|
||||||
|
b->value = stacks->a->value;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user