-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
32 lines (29 loc) · 1.25 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nde-maes <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/12/10 11:24:35 by nde-maes #+# #+# */
/* Updated: 2019/01/07 13:04:27 by nde-maes ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
int main(int argc, char **argv)
{
t_tet *head_lst;
int res_starting_dim;
int fd;
if (argc != 2)
ft_putstr("usage: fillit source_file\n");
else
{
if ((fd = open(argv[1], O_RDONLY)) == -1)
error_message();
parse_input(fd, &head_lst);
res_starting_dim = normalize_lst(&head_lst);
resolve(&head_lst, res_starting_dim);
}
return (0);
}