​push_swap /
include / operations.h
162 commits
29-04-2026
37 lines 1.5 kB
 1/* ************************************************************************** */
 2/*                                                                            */
 3/*                                                        :::      ::::::::   */
 4/*   operations.h                                       :+:      :+:    :+:   */
 5/*                                                    +:+ +:+         +:+     */
 6/*   By: ohaponiu <marvin@42.fr>                    +#+  +:+       +#+        */
 7/*                                                +#+#+#+#+#+   +#+           */
 8/*   Created: 2026/04/24 09:57:01 by ohaponiu          #+#    #+#             */
 9/*   Updated: 2026/04/29 16:00:48 by ohaponiu         ###   ########.fr       */
10/*                                                                            */
11/* ************************************************************************** */
12
13#ifndef OPERATIONS_H
14# define OPERATIONS_H
15
16# include "types.h"
17
18/* swap */
19void	op_sa(t_stack *a, t_ops *ops);
20void	op_sb(t_stack *b, t_ops *ops);
21void	op_ss(t_stack *a, t_stack *b, t_ops *ops);
22
23/* push */
24void	op_pa(t_stack *a, t_stack *b, t_ops *ops);
25void	op_pb(t_stack *a, t_stack *b, t_ops *ops);
26
27/* rotate */
28void	op_ra(t_stack *a, t_ops *ops);
29void	op_rb(t_stack *b, t_ops *ops);
30void	op_rr(t_stack *a, t_stack *b, t_ops *ops);
31
32/* reverse rotate */
33void	op_rra(t_stack *a, t_ops *ops);
34void	op_rrb(t_stack *b, t_ops *ops);
35void	op_rrr(t_stack *a, t_stack *b, t_ops *ops);
36
37#endif