maxishell
Implementation of a shell for Linux-like systems
|
#include "shell.h"
Go to the source code of this file.
Functions | |
int | builtin_cd (t_ms_data *data) |
int | builtin_echo (t_ms_data *data) |
int | builtin_env (t_ms_data *data) |
int | builtin_exit (t_ms_data *data) |
int | builtin_export (t_ms_data *data) |
int | builtin_pwd (t_ms_data *data) |
int | builtin_unset (t_ms_data *data) |
void | free_signal_context (void) |
int builtin_cd | ( | t_ms_data * | data | ) |
Definition at line 28 of file cd.c.
References s_ms_data::args, s_ms_data::envp, EXIT_FAILURE, exit_status_handler(), EXIT_SUCCESS, ft_strjoin(), get_env(), IS_DIRECTORY, PERMISSION_DENIED, and set_env().
Referenced by execute().
int builtin_echo | ( | t_ms_data * | data | ) |
Definition at line 23 of file echo.c.
References s_ms_data::args, EXIT_FAILURE, EXIT_SUCCESS, ft_putchar_fd(), ft_putstr_fd(), ft_strcmp(), handle_std_io(), and s_ms_data::std_out.
Referenced by execute().
int builtin_env | ( | t_ms_data * | data | ) |
Definition at line 35 of file env.c.
References s_ms_data::args, s_ms_data::envp, s_ms_data::exit_status, EXIT_SUCCESS, ft_itoa(), ft_putstr_fd(), ft_strcmp(), IS_DIRECTORY, print_env_stack(), set_exit_status(), set_shell_var(), and s_ms_data::shell_variables.
Referenced by execute().
int builtin_exit | ( | t_ms_data * | data | ) |
Definition at line 61 of file exit.c.
References s_ms_data::args, EXIT_SUCCESS, ft_atoi(), ft_free_2d_arr(), ft_isnumber(), ft_putendl_fd(), handle_exit(), handle_numeric_error(), and handle_too_many_args_error().
Referenced by execute(), and main_loop().
int builtin_export | ( | t_ms_data * | data | ) |
Definition at line 30 of file export.c.
References add_env(), s_ms_data::args, s_ms_data::envp, exit_status_handler(), EXIT_SUCCESS, ft_putendl_fd(), ft_strcmp(), ft_strjoin(), INVALID_OPTION, and print_env().
Referenced by execute().
int builtin_pwd | ( | t_ms_data * | data | ) |
Definition at line 24 of file pwd.c.
References EXIT_SUCCESS, and ft_putendl_fd().
Referenced by execute().
int builtin_unset | ( | t_ms_data * | data | ) |
Definition at line 29 of file unset.c.
References s_ms_data::args, s_ms_data::envp, EXIT_SUCCESS, and unset_env().
Referenced by execute().
void free_signal_context | ( | void | ) |
Definition at line 23 of file builtins_utils.c.
References get_context().
Referenced by cleanup_exit_resources().