|
maxishell
Implementation of a shell for Linux-like systems
|


Go to the source code of this file.
Macros | |
| #define | EXIT_SUCCESS 0 |
| #define | EXIT_FAILURE 1 |
| #define | EXIT_MISUSE 2 |
| #define | IS_DIRECTORY 256 |
| #define | NUMERIC_REQUIRED 257 |
| #define | TOO_MANY_ARGS 258 |
| #define | UNKNOWN_COMMAND 259 |
| #define | INVALID_ARGUMENT 260 |
| #define | PERMISSION_DENIED 261 |
| #define | ERROR_EXIT 262 |
| #define | NOT_VALID_IDENTIFIER 263 |
| #define | INVALID_OPTION 264 |
Functions | |
| void | exit_status_handler (t_ms_data *data, int status_code, char *err_arg) |
| void | set_exit_status (int *exit_status, int status_code) |
| void | set_shell_var_handler (t_ms_data *data) |
| int | ft_perror (char *str) |
| int | ft_isnumber (char *str) |
| void | free_shell_var_list (t_env *shell_var) |
| void | handle_exit (t_ms_data *data, int status) |
| #define ERROR_EXIT 262 |
Definition at line 26 of file exit_status.h.
| #define EXIT_FAILURE 1 |
Definition at line 17 of file exit_status.h.
| #define EXIT_MISUSE 2 |
Definition at line 18 of file exit_status.h.
| #define EXIT_SUCCESS 0 |
Definition at line 16 of file exit_status.h.
| #define INVALID_ARGUMENT 260 |
Definition at line 24 of file exit_status.h.
| #define INVALID_OPTION 264 |
Definition at line 28 of file exit_status.h.
| #define IS_DIRECTORY 256 |
Definition at line 20 of file exit_status.h.
| #define NOT_VALID_IDENTIFIER 263 |
Definition at line 27 of file exit_status.h.
| #define NUMERIC_REQUIRED 257 |
Definition at line 21 of file exit_status.h.
| #define PERMISSION_DENIED 261 |
Definition at line 25 of file exit_status.h.
| #define TOO_MANY_ARGS 258 |
Definition at line 22 of file exit_status.h.
| #define UNKNOWN_COMMAND 259 |
Definition at line 23 of file exit_status.h.
| void exit_status_handler | ( | t_ms_data * | data, |
| int | status_code, | ||
| char * | err_arg | ||
| ) |
Definition at line 25 of file exit_status.c.
References s_ms_data::exit_status, ft_puterror(), INVALID_ARGUMENT, INVALID_OPTION, IS_DIRECTORY, NOT_VALID_IDENTIFIER, NUMERIC_REQUIRED, PERMISSION_DENIED, set_exit_status(), set_shell_var_handler(), TOO_MANY_ARGS, and UNKNOWN_COMMAND.
Referenced by builtin_cd(), builtin_export(), handle_numeric_error(), and handle_too_many_args_error().


| void free_shell_var_list | ( | t_env * | shell_var | ) |
Definition at line 90 of file shell_variables_utils.c.
References s_env::key, s_env::next, and s_env::value.
Referenced by free_ms_data().

| int ft_isnumber | ( | char * | str | ) |
Definition at line 24 of file exit_status_utils.c.
References ft_isdigit().
Referenced by builtin_exit().


| int ft_perror | ( | char * | str | ) |
Definition at line 18 of file exit_status_utils.c.
| void handle_exit | ( | t_ms_data * | data, |
| int | status | ||
| ) |
Definition at line 53 of file exit.c.
References cleanup_exit_resources(), ft_putendl_fd(), and TOO_MANY_ARGS.
Referenced by builtin_exit(), handle_numeric_error(), and handle_too_many_args_error().


| void set_exit_status | ( | int * | exit_status, |
| int | status_code | ||
| ) |
Definition at line 79 of file exit_status.c.
Referenced by builtin_env(), and exit_status_handler().

| void set_shell_var_handler | ( | t_ms_data * | data | ) |
Definition at line 53 of file exit_status.c.
References s_ms_data::exit_status, ft_itoa(), set_shell_var(), and s_ms_data::shell_variables.
Referenced by exit_status_handler(), and process_command().

