-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
45 lines (40 loc) · 1.31 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
37
38
39
40
41
42
43
44
45
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jgabelho <jgabelho@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/12/28 12:02:40 by mschroed #+# #+# */
/* Updated: 2019/01/08 13:39:45 by jgabelho ### ########.fr */
/* */
/* ************************************************************************** */
#include <libft.h>
#include "fillit.h"
#include <stdlib.h>
void usage(void)
{
ft_putstr("usage: fillit input_file\n");
exit(-1);
}
int error(void)
{
ft_putstr("error\n");
exit(-1);
}
int main(int argc, char **argv)
{
t_mino *minos;
if (argc == 2)
{
if ((minos = mino_oc(argv[1])) == 0)
return (error());
if (val_mino(minos) == -1)
return (error());
if (solved(minos) == 0)
return (error());
}
else
usage();
return (0);
}