added usage
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
Submodule libft updated: d622367cfd...f32d4bbc96
+6
-1
@@ -75,13 +75,18 @@ void init_fdf(t_fdf *fdf)
|
|||||||
draw_image(fdf);
|
draw_image(fdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int usage() {
|
||||||
|
write(2, "usage:\nneed one argument : ./fdf maps/<map>.fdf\n", 48);
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int ac, char **av)
|
int main(int ac, char **av)
|
||||||
{
|
{
|
||||||
t_fdf *fdf;
|
t_fdf *fdf;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (ac != 2)
|
if (ac != 2)
|
||||||
return (0);
|
return usage();
|
||||||
fdf = malloc(sizeof(t_fdf));
|
fdf = malloc(sizeof(t_fdf));
|
||||||
fd = open(av[1], O_RDONLY);
|
fd = open(av[1], O_RDONLY);
|
||||||
if (!fd || !fdf)
|
if (!fd || !fdf)
|
||||||
|
|||||||
Reference in New Issue
Block a user