summaryrefslogtreecommitdiffstats
path: root/src/minishell.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-20 15:34:34 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-20 15:34:34 +0200
commita4c02cf9a4d13dc81b015a6acc19628e48b7367b (patch)
treea002631374e42f7c2580560748d1d94774bafa1a /src/minishell.c
parentMore info (diff)
download42-minishell-a4c02cf9a4d13dc81b015a6acc19628e48b7367b.tar.gz
42-minishell-a4c02cf9a4d13dc81b015a6acc19628e48b7367b.tar.bz2
42-minishell-a4c02cf9a4d13dc81b015a6acc19628e48b7367b.tar.xz
42-minishell-a4c02cf9a4d13dc81b015a6acc19628e48b7367b.tar.zst
42-minishell-a4c02cf9a4d13dc81b015a6acc19628e48b7367b.zip
Update
Diffstat (limited to '')
-rw-r--r--src/minishell.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/minishell.c b/src/minishell.c
index cd08a64..cc0798f 100644
--- a/src/minishell.c
+++ b/src/minishell.c
@@ -12,29 +12,32 @@
#include <libft.h>
#include "minishell.h"
+#include "ft_d_enum.h"
+#include "ft_s_struct.h"
+#include "ft_s_init.h"
+#include "ft_s_destroy.h"
int
main(int argc,
const char *argv[],
char *envp[])
{
- t_data *data;
+ t_msh *msh;
(void)argc;
(void)argv;
- (void)envp;
- if (!(data = ft_init_data()))
+ if (!(msh = ft_init_msh()))
{
- return (1);
+ return (FT_RET_ALLOC);
}
- data->envp = envp;
- while (*data->envp)
+ msh->envp = envp;
+ while (*msh->envp)
{
- ft_printf("%s\n", *data->envp);
- data->envp++;
+ ft_printf("%s\n", *msh->envp);
+ msh->envp++;
}
- ft_s_destroy(data);
- return (0);
+ ft_s_destroy(msh);
+ return (FT_RET_FINE);
}
/*
@@ -42,8 +45,9 @@ main(int argc,
** Files prefixes info
** -------------------
** ft_ -> 42
-** s_ -> structs related
+** b_ -> builtins related
** d_ -> defines related
-** p_ -> parse related
** e_ -> exec related
+** p_ -> parse related
+** s_ -> structs related
*/