-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
36 lines (32 loc) · 1.16 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: ojustine <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/14 15:27:38 by ojustine #+# #+# */
/* Updated: 2019/11/13 15:09:09 by ojustine ### ########.fr */
/* */
/* ************************************************************************** */
#include "fillit.h"
/*
** Just main function.
*/
int main(int argc, char **argv)
{
int fd;
t_row *puzzle;
if (argc == 2)
{
fd = open(argv[1], O_RDONLY);
if (fd < 0)
error_exit(1);
puzzle = get_puzzle(fd);
close(fd);
solve(puzzle);
}
else
error_exit(0);
return (0);
}