​push_swap /
include / cli.h
162 commits
04-05-2026
28 lines 1.2 kB
 1/* ************************************************************************** */
 2/*                                                                            */
 3/*                                                        :::      ::::::::   */
 4/*   cli.h                                              :+:      :+:    :+:   */
 5/*                                                    +:+ +:+         +:+     */
 6/*   By: ohaponiu <marvin@42.fr>                    +#+  +:+       +#+        */
 7/*                                                +#+#+#+#+#+   +#+           */
 8/*   Created: 2026/04/21 14:24:09 by ohaponiu          #+#    #+#             */
 9/*   Updated: 2026/05/04 12:47:30 by ohaponiu         ###   ########.fr       */
10/*                                                                            */
11/* ************************************************************************** */
12
13#ifndef CLI_H
14# define CLI_H
15
16# include "types.h"
17
18# define ERR_MALLOC 1
19# define ERR_PARSE 2
20# define ERR_FLAG 3
21# define ERR_INPUT 4
22
23void	die(int status);
24void	init_stacks(t_stack *a, t_stack *b, int *values, int capacity);
25int		parse_flags(t_flags *flags, int argc, char **argv);
26int		*parse_args(int argc, char **argv, int *out_n);
27
28#endif