From e42601eb5acc07417b217dfed4e9ab8cbb91794f Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 25 Apr 2020 16:40:34 +0200 Subject: Stupid bash rule --- src/minishell.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/minishell.c') diff --git a/src/minishell.c b/src/minishell.c index 1b5f4da..1df809b 100644 --- a/src/minishell.c +++ b/src/minishell.c @@ -12,9 +12,11 @@ #include #include +#include +#include #include "ft_f_fail.h" -#include "ft_m_loop.h" +#include "ft_m_argv.h" #include "ft_s_struct.h" #include "ft_s_init.h" #include "ft_s_destroy.h" @@ -27,15 +29,13 @@ int t_msh *msh; int32_t ret; - (void)argc; - (void)argv; - /* TODO: deal with args */ + /* TODO: increment $SHLVL */ if (!(msh = ft_init_msh(envp))) { - ft_fail_alloc(); + ft_dprintf(2, "%s\n", strerror(errno)); + return (FT_RET_ALLOC); } - msh->ret = ft_m_loop(msh); - ret = msh->ret; + ret = ft_m_argv(argc, argv, msh); ft_s_destroy(msh); return (ret); } -- cgit v1.2.3