-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.c
More file actions
33 lines (30 loc) · 1.23 KB
/
main.c
File metadata and controls
33 lines (30 loc) · 1.23 KB
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
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sid-bell <sid-bell@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/02/24 04:22:06 by sid-bell #+# #+# */
/* Updated: 2019/02/24 05:11:14 by sid-bell ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int main(int argc, char **argv, char **env)
{
char *command;
t_params params;
ft_init(¶ms, env);
if (argc && argv)
while (1)
{
ft_putstr("$> ");
g_waiting_child = 0;
if ((command = ft_getline(¶ms)))
ft_getcommands(command, ¶ms);
free(command);
g_line = NULL;
}
ft_atexit(¶ms);
return (0);
}