diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-20 17:04:59 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-20 17:04:59 +0200 |
commit | 386c44e541af7aa1ba594d2f0a9665199b3dffb4 (patch) | |
tree | cf5ef3cfeca4348c76aa97ffa5c00849ef9ee24a /src/minishell.c | |
parent | Good (diff) | |
download | 42-minishell-386c44e541af7aa1ba594d2f0a9665199b3dffb4.tar.gz 42-minishell-386c44e541af7aa1ba594d2f0a9665199b3dffb4.tar.bz2 42-minishell-386c44e541af7aa1ba594d2f0a9665199b3dffb4.tar.xz 42-minishell-386c44e541af7aa1ba594d2f0a9665199b3dffb4.tar.zst 42-minishell-386c44e541af7aa1ba594d2f0a9665199b3dffb4.zip |
Nice prompt
Diffstat (limited to 'src/minishell.c')
-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); } /* |