added usage

This commit is contained in:
asus
2024-01-09 15:14:40 +01:00
parent cf988ebbe6
commit 3c0a459b64
8 changed files with 7 additions and 2 deletions

BIN
builds/draw.o Normal file

Binary file not shown.

BIN
builds/fdf.o Normal file

Binary file not shown.

BIN
builds/keypress.o Normal file

Binary file not shown.

BIN
builds/modifs.o Normal file

Binary file not shown.

BIN
builds/parse.o Normal file

Binary file not shown.

BIN
fdf Executable file

Binary file not shown.

2
libft

Submodule libft updated: d622367cfd...f32d4bbc96

View File

@@ -75,13 +75,18 @@ void init_fdf(t_fdf *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)
{
t_fdf *fdf;
int fd;
if (ac != 2)
return (0);
return usage();
fdf = malloc(sizeof(t_fdf));
fd = open(av[1], O_RDONLY);
if (!fd || !fdf)