summaryrefslogtreecommitdiffstats
path: root/src/m_minishell.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/m_minishell.c (renamed from src/minishell.c)26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/minishell.c b/src/m_minishell.c
index ee79f8f..dd47ac3 100644
--- a/src/minishell.c
+++ b/src/m_minishell.c
@@ -1,7 +1,7 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
-/* minishell.c :+: :+: :+: */
+/* m_minishell.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
@@ -16,31 +16,30 @@
#include <string.h>
#include <errno.h>
-#include "ft_f_fail.h"
-#include "ft_m_argv.h"
-#include "ft_s_struct.h"
-#include "ft_s_init.h"
-#include "ft_s_destroy.h"
+#include "f_fail.h"
+#include "m_argv.h"
+#include "s_struct.h"
+#include "s_init.h"
+#include "s_destroy.h"
+#include "s_lvars.h"
int
main(int argc,
char *const argv[],
char *const envp[])
{
- t_msh *msh;
int32_t ret;
+ t_msh *msh;
- /* TODO: increment $SHLVL */
- /* TODO: also set $SHELL | maybe not bash does not set $SHELL */
- /* only zsh does */
/* TODO: handle general variables | $var */
- if (!(msh = ft_init_msh(argv, envp)))
+ if (!(msh = init_msh(argv, envp)))
{
ft_dprintf(2, "%s\n", strerror(errno));
return (FT_RET_ALLOC);
}
- ret = ft_m_argv(argc, argv, msh);
- ft_s_destroy(msh);
+ /* TODO: delet this */
+ ret = m_argv(argc, argv, msh);
+ s_destroy(msh);
return (ret);
}
@@ -48,7 +47,6 @@ int
** ====== INFO ======
** Files prefixes info
** -------------------
-** ft_ -> 42
** b_ -> builtins related
** d_ -> defines related
** e_ -> exec related