37 lines
1.3 kB
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* op_rotate.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: ohaponiu <marvin@42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2026/04/24 09:57:37 by ohaponiu #+# #+# */
9/* Updated: 2026/04/29 16:03:14 by ohaponiu ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "operations.h"
14#include "stack.h"
15#include <libft.h>
16
17void op_ra(t_stack *a, t_ops *ops)
18{
19 stack_rotate(a);
20 ft_printf("ra\n");
21 ops->ra++;
22}
23
24void op_rb(t_stack *b, t_ops *ops)
25{
26 stack_rotate(b);
27 ft_printf("rb\n");
28 ops->rb++;
29}
30
31void op_rr(t_stack *a, t_stack *b, t_ops *ops)
32{
33 stack_rotate(a);
34 stack_rotate(b);
35 ft_printf("rr\n");
36 ops->rr++;
37}