diff options
| author | Dominik Kaiser | 2025-01-14 18:32:42 +0100 |
|---|---|---|
| committer | GitHub | 2025-01-14 18:32:42 +0100 |
| commit | d4f3525a01f2566afed0da9209cb1c64bf188776 (patch) | |
| tree | 14d1f541418576d565f42f0d70faf1369fc17d1b /include | |
| parent | 3e692dac63577011bd5862a66767ef412183f26b (diff) | |
| parent | da80405b345b58f9e1bd83039b1df3771b5ca193 (diff) | |
| download | minishell-d4f3525a01f2566afed0da9209cb1c64bf188776.tar.gz minishell-d4f3525a01f2566afed0da9209cb1c64bf188776.zip | |
Merge branch 'miau' into uwu
Diffstat (limited to 'include')
| -rw-r--r-- | include/env.h | 5 | ||||
| -rw-r--r-- | include/minishell.h | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/include/env.h b/include/env.h index d38ed29..0c45aef 100644 --- a/include/env.h +++ b/include/env.h @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/08/08 16:53:39 by dkaiser #+# #+# */ -/* Updated: 2024/12/24 16:21:50 by chuhlig ### ########.fr */ +/* Updated: 2025/01/14 16:50:55 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,6 +22,7 @@ typedef struct s_env struct s_env *next; } t_env; +void free_env_node(t_env *node); void getenvlst(t_env **env, char **en); void free_envlst(t_env **env); char *env_get(t_env *env, char *name); @@ -34,5 +35,7 @@ int echo(char **av); int pwd(t_env *env); int cd(t_env **env, char **args); int ft_env(t_env *env); +int builtin_exit(char **args, t_env **env); +t_env *env_new(char *name); #endif
\ No newline at end of file diff --git a/include/minishell.h b/include/minishell.h index f0f458b..c905ca5 100644 --- a/include/minishell.h +++ b/include/minishell.h @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/22 17:14:49 by dkaiser #+# #+# */ -/* Updated: 2025/01/14 14:52:29 by dkaiser ### ########.fr */ +/* Updated: 2025/01/14 15:29:46 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,11 +25,13 @@ # include <stdlib.h> # include <termios.h> # include <unistd.h> +# include <fcntl.h> +# include <sys/wait.h> int init(void); int init_signal_handling(void); -void repl(const char *prompt, t_env **env); +void repl(const char *prompt, t_env **env, int *promptflag); t_list *parse(t_token *tokens, t_env **env); t_node *parse_cmd(t_token *tokens, t_env **env); @@ -41,5 +43,6 @@ char *get_cmd_path(char *cmd, t_env *env); int execute_cmd(t_cmd *cmd, t_env **env); char *format_string(char *str, t_env *env); int set_return_code(int return_code, t_env **env); +int handle_redirections(t_redirection *redirs); #endif |
