Minishell
 
Loading...
Searching...
No Matches
builtins.h
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* builtins.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: ppontet <ppontet@student.42lyon.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/05/03 11:56:38 by ppontet #+# #+# */
9/* Updated: 2025/05/30 11:08:41 by ppontet ### ########lyon.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef BUILTINS_H
14# define BUILTINS_H
15
16# include "data_structure.h"
17
23int ft_exit(t_data *data, char **array);
24int ft_echo(t_data *data, char **array);
25int ft_which(t_data *data, char **array);
26int ft_export(t_data *data, char **array);
27int ft_env(t_data *data, char **array);
28int ft_unset(t_data *data, char **array);
29int ft_pwd(t_data *data, char **array);
30int ft_cd(t_data *data, char **array);
32
38void ft_exit_int(t_garbage *garbage, int value);
39void ft_exit_int_np(t_garbage *garbage, int value);
41
47void change_cwd(t_data *data, t_bool is_pwd);
51
52#endif
struct s_data t_data
Definition data_structure.h:38
struct s_garbage t_garbage
Definition data_structure.h:26
struct s_env_vars t_env_vars
Definition data_structure.h:29
int ft_echo(t_data *data, char **array)
Echo with -n option OPTIONS : -n : print without the triling newline.
Definition ft_echo.c:33
int ft_export(t_data *data, char **array)
Definition ft_export.c:62
int ft_exit(t_data *data, char **array)
Function to exit the program.
Definition ft_exit.c:65
int ft_env(t_data *data, char **array)
Definition ft_env.c:47
int ft_which(t_data *data, char **array)
Says if the command are built-in commands or not.
Definition ft_which.c:28
int ft_pwd(t_data *data, char **array)
Print the current working directory.
Definition ft_pwd.c:26
int ft_cd(t_data *data, char **array)
Implementatin of cd builtin of shell.
Definition ft_cd.c:30
int ft_unset(t_data *data, char **array)
Definition ft_unset.c:20
int change_cwd_to_home(t_env_vars *env)
Definition ft_cd.c:99
int change_cwd_to_previous_cwd(t_env_vars *env)
Definition ft_cd.c:116
void change_cwd(t_data *data, t_bool is_pwd)
Change the values of ENV VAR.
Definition ft_cd.c:57
void ft_exit_int_np(t_garbage *garbage, int value)
Short ft_exit that uses only int but don't say it's name.
Definition ft_exit.c:49
void ft_exit_int(t_garbage *garbage, int value)
Short ft_exit that uses only int noreturn attribute is to prevent -Wmissing-noreturn flag from flag -...
Definition ft_exit.c:36