-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
36 lines (32 loc) · 1.21 KB
/
main.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
31
32
33
34
35
36
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: alischyn <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/24 13:09:24 by alischyn #+# #+# */
/* Updated: 2017/03/25 19:34:07 by alischyn ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_ls.h"
bool g_params[256];
int main(int argc, char *argv[])
{
char **args;
int i;
t_vec vec;
arg_parse(argc, argv, &args);
vec_init(&vec);
i = 0;
while (args[i] != NULL)
{
vec_push(&vec, args[i]);
i++;
}
if (args[0] == NULL)
vec_push(&vec, ".");
ls_pre_main(&vec);
vec_free(&vec, false);
return (0);
}