summaryrefslogtreecommitdiffstats
path: root/src/minishell.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/minishell.c14
1 files changed, 7 insertions, 7 deletions
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 <libft.h>
#include <stdint.h>
+#include <string.h>
+#include <errno.h>
#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);
}