diff options
Diffstat (limited to '')
-rw-r--r-- | src/minishell.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/minishell.c b/src/minishell.c index 5d97ed6..a3b0354 100644 --- a/src/minishell.c +++ b/src/minishell.c @@ -11,9 +11,10 @@ /* ************************************************************************** */ #include <libft.h> +#include <stdint.h> #include "minishell.h" #include "ft_d_enum.h" -#include "ft_m_prompt.h" +#include "ft_m_loop.h" #include "ft_s_struct.h" #include "ft_s_init.h" #include "ft_s_destroy.h" @@ -24,23 +25,23 @@ main(int argc, char *envp[]) { t_msh *msh; + int32_t ret; (void)argc; (void)argv; - (void)envp; - if (!(msh = ft_init_msh())) + if (!(msh = ft_init_msh(envp))) { return (FT_RET_ALLOC); } - msh->envp = envp; - ft_m_prompt(msh); + msh->ret = ft_m_loop(msh); + ret = msh->ret; /* while (*msh->envp) */ /* { */ /* ft_printf("%s\n", *msh->envp); */ /* msh->envp++; */ /* } */ ft_s_destroy(msh); - return (FT_RET_FINE); + return (ret); } /* |