-
Notifications
You must be signed in to change notification settings - Fork 0
/
mnsh.c
30 lines (27 loc) · 1.28 KB
/
mnsh.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* mnsh.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rghouzra <rghouzra@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/05/26 15:41:31 by yrhiba #+# #+# */
/* Updated: 2023/06/20 22:47:12 by rghouzra ### ########.fr */
/* */
/* ************************************************************************** */
#include "mnsh.h"
t_minishell *g_mnsh;
int main(int ac, char **av, char **env)
{
(void)av;
(void)ac;
g_mnsh = (t_minishell *)ft_malloc(sizeof(t_minishell));
if (presh(env) == -1)
exit(EXIT_FAILURE);
read_input();
my_list_clear(&(g_mnsh->env_list), &my_list_data_clear);
my_list_clear(&(g_mnsh->export_list), &my_list_data_clear);
my_strings_free(&(g_mnsh->paths_list));
free(g_mnsh);
return (EXIT_SUCCESS);
}