-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.c
More file actions
38 lines (35 loc) · 1.31 KB
/
main.c
File metadata and controls
38 lines (35 loc) · 1.31 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
34
35
36
37
38
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mtacnet <mtacnet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/05/26 11:53:33 by mtacnet #+# #+# */
/* Updated: 2017/06/17 17:10:54 by mtacnet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_ls.h"
int main(int argc, char **argv)
{
t_env *env;
t_flags flags;
t_elem *elem;
env = NULL;
elem = NULL;
env = (t_env*)malloc(sizeof(t_env));
init_struct(&flags, env);
elem = new_list();
env->nb_arg = argc;
if (argc < 2)
process_path(".", &flags);
free(env);
env = NULL;
env = (t_env*)malloc(sizeof(t_env));
if (argc >= 2)
{
check_flags(&flags, argv);
prep_dir(argv, env, elem, &flags);
}
return (0);
}