-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathac_push.c
More file actions
27 lines (24 loc) · 1.18 KB
/
Copy pathac_push.c
File metadata and controls
27 lines (24 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ac_push.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kenakamu <kenakamu@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/08/14 12:13:17 by kenakamu #+# #+# */
/* Updated: 2025/09/10 17:00:23 by kenakamu ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
void pa(t_pushswap *ps)
{
if (stack_head_to_head(&ps->stack_a, &ps->stack_b) != SUCCESS)
end_program(EXIT_FAILURE, ps);
write (1, "pa\n", 3);
}
void pb(t_pushswap *ps)
{
if (stack_head_to_head(&ps->stack_b, &ps->stack_a) != SUCCESS)
end_program(EXIT_FAILURE, ps);
write(1, "pb\n", 3);
}