-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
29 lines (26 loc) · 1.13 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rklein <rklein@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/05 12:22:42 by rklein #+# #+# */
/* Updated: 2020/06/09 13:52:03 by rklein ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_ls.h"
int main(int argc, char **argv)
{
t_flag *flags;
int i;
flags = malloc(sizeof(t_flag));
i = 1;
if (argc > 1)
i = ft_flags(argc, argv, flags);
if (i == -1)
return (0);
ft_ls(argc, argv, i - 1, flags);
free(flags);
return (0);
}