-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
executable file
·45 lines (42 loc) · 1.33 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: espiroux <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/09/02 18:44:43 by espiroux #+# #+# */
/* Updated: 2013/09/02 18:44:43 by espiroux ### ########.fr */
/* */
/* ************************************************************************** */
#include "struct.h"
#include "ft_map_copy.h"
#include "ft_display.h"
#include "ft_square_test.h"
int main(int argc, char *argv[])
{
int i;
square sq;
map mp;
int size;
i = 1;
if (argc == 1)
{
mp = ft_map_copy(argv[0], argc);
size = mp.max;
sq = ft_square_test(size, mp);
ft_display(mp, sq);
}
else
{
while (i < argc)
{
mp = ft_map_copy(argv[i], argc);
size = mp.max;
sq = ft_square_test(size, mp);
ft_display(mp, sq);
i++;
}
}
return (0);
}