|
@ -6,7 +6,7 @@ |
|
|
/* By: mea <marvin@42.fr> +#+ +:+ +#+ */ |
|
|
/* By: mea <marvin@42.fr> +#+ +:+ +#+ */ |
|
|
/* +#+#+#+#+#+ +#+ */ |
|
|
/* +#+#+#+#+#+ +#+ */ |
|
|
/* Created: 2022/05/02 13:50:44 by narnaud #+# #+# */ |
|
|
/* Created: 2022/05/02 13:50:44 by narnaud #+# #+# */ |
|
|
/* Updated: 2022/05/05 20:46:00 by narnaud ### ########.fr */ |
|
|
/* Updated: 2022/05/06 11:38:29 by narnaud ### ########.fr */ |
|
|
/* */ |
|
|
/* */ |
|
|
/* ************************************************************************** */ |
|
|
/* ************************************************************************** */ |
|
|
|
|
|
|
|
@ -52,6 +52,7 @@ int is_empty(char *line); |
|
|
void halt(int ret_code); |
|
|
void halt(int ret_code); |
|
|
void termios(int ctl); |
|
|
void termios(int ctl); |
|
|
void sigs_handler(int sig_num); |
|
|
void sigs_handler(int sig_num); |
|
|
|
|
|
void handle_status(t_datas *datas, int status); |
|
|
|
|
|
|
|
|
// ----------------------------------Builtins.c
|
|
|
// ----------------------------------Builtins.c
|
|
|
int close_minishell(int exit_code); |
|
|
int close_minishell(int exit_code); |
|
@ -69,6 +70,9 @@ int ft_export(t_datas *datas, t_command *cmd); |
|
|
void exe(t_datas *datas, t_command *cmd); |
|
|
void exe(t_datas *datas, t_command *cmd); |
|
|
int builtin_call(t_datas *datas, t_command *cmd); |
|
|
int builtin_call(t_datas *datas, t_command *cmd); |
|
|
int is_builtin(char *cmd); |
|
|
int is_builtin(char *cmd); |
|
|
|
|
|
pid_t caller(t_datas *datas, t_command *cmd); |
|
|
|
|
|
int piper(t_datas *datas, t_command *cmd); |
|
|
|
|
|
|
|
|
// ----------------------------------Parser.c
|
|
|
// ----------------------------------Parser.c
|
|
|
|
|
|
|
|
|
typedef enum e_type |
|
|
typedef enum e_type |
|
@ -87,9 +91,10 @@ typedef struct s_token |
|
|
t_type type; |
|
|
t_type type; |
|
|
struct s_token *next; |
|
|
struct s_token *next; |
|
|
} t_token; |
|
|
} t_token; |
|
|
|
|
|
char *expend_str(t_datas *datas, char *line); |
|
|
size_t count_arguments(t_token *tok); |
|
|
size_t count_arguments(t_token *tok); |
|
|
void update_redir(t_datas *datas, t_command *cmd, t_token *tok); |
|
|
void update_redir(t_datas *datas, t_command *cmd, t_token *tok); |
|
|
|
|
|
t_command *parser(t_datas *datas, t_token *tok, t_command *prev); |
|
|
|
|
|
|
|
|
// ----------------------------------Lexer.c
|
|
|
// ----------------------------------Lexer.c
|
|
|
|
|
|
|
|
@ -114,6 +119,6 @@ int create_token(t_lexer *lex, char str[]); |
|
|
int check_register(t_lexer *lex, char **line, char *tmp); |
|
|
int check_register(t_lexer *lex, char **line, char *tmp); |
|
|
int replace_var(t_datas *datas, char **line, char *tmp, int tmp_i); |
|
|
int replace_var(t_datas *datas, char **line, char *tmp, int tmp_i); |
|
|
int check_state(t_lexer *lex, char **line); |
|
|
int check_state(t_lexer *lex, char **line); |
|
|
char *expend_str(t_datas *datas, char *line); |
|
|
t_token *lexer(t_datas *datas, char *line); |
|
|
|
|
|
|
|
|
#endif |
|
|
#endif |
|
|