heredoc and builtins fix
This commit is contained in:
@@ -48,7 +48,10 @@ typedef enum e_redirection_type
|
||||
typedef struct s_redirection
|
||||
{
|
||||
t_token_type type;
|
||||
int io_number;
|
||||
char *target;
|
||||
bool heredoc_expand;
|
||||
bool heredoc_ready;
|
||||
} t_redirection;
|
||||
|
||||
/**
|
||||
@@ -129,6 +132,8 @@ extern void minishell_set_execution_signals(void);
|
||||
|
||||
extern void minishell_set_child_signals(void);
|
||||
|
||||
extern void minishell_set_heredoc_signals(void);
|
||||
|
||||
extern bool minishell_consume_sigint(void);
|
||||
|
||||
/* environment.c */
|
||||
@@ -142,8 +147,7 @@ extern char **get_envp(t_minishell *msh);
|
||||
|
||||
extern void free_envp(char **envp);
|
||||
|
||||
void handle_sigint_status(t_minishell *minishell);
|
||||
bool handle_eof(char *line, t_minishell *minishell);
|
||||
|
||||
extern void handle_sigint_status(t_minishell *minishell);
|
||||
extern bool handle_eof(char *line, t_minishell *minishell);
|
||||
|
||||
#endif /* CORE_H */
|
||||
|
||||
@@ -53,8 +53,12 @@ extern void executor_parent_cleanup(t_list *node, t_pipeline *pl);
|
||||
extern uint8_t executor_wait_for_children(pid_t last_child_pid);
|
||||
extern void executor_cmdfree(t_command *command);
|
||||
extern bool executor_apply_redirections(const t_command *command,
|
||||
int *saved_stdin, int *saved_stdout);
|
||||
int *saved_stdin, int *saved_stdout, int *saved_stderr);
|
||||
extern void executor_restore_redirections(int saved_stdin,
|
||||
int saved_stdout);
|
||||
int saved_stdout, int saved_stderr);
|
||||
extern bool executor_prepare_heredocs(t_list *command_list,
|
||||
t_minishell *minishell, uint8_t *exit_status);
|
||||
extern char *executor_expand_heredoc_line(const char *line,
|
||||
t_minishell *minishell);
|
||||
|
||||
#endif /* EXECUTOR_H */
|
||||
|
||||
@@ -41,8 +41,10 @@ extern void command_clear(t_command *command);
|
||||
extern void command_add_tokens(t_command **command, t_list **tokens);
|
||||
extern bool is_pipe(t_token *token);
|
||||
extern bool is_redirection(t_token *token);
|
||||
void redirection_add(t_list **tokens, t_token *token,
|
||||
t_command **command);
|
||||
bool parser_token_is_fd_prefix(t_list *token_node,
|
||||
int *io_number);
|
||||
void redirection_add_with_fd(t_list **tokens, t_token *token,
|
||||
t_command **command, int io_number);
|
||||
void words_add(t_list **tokens, t_command **command);
|
||||
|
||||
void expand(t_list **commands, t_minishell *minishell);
|
||||
|
||||
Reference in New Issue
Block a user