42_cube3D/map/parsing_meta.c

21 lines
327 B
C
Raw Normal View History

2023-05-03 07:09:06 -04:00
#include "./parsing_private.h"
static int name_check(const char *path)
{
size_t len;
len = ft_strlen(path);
2023-05-03 10:33:57 -04:00
if (len < 4
|| (ft_strcmp(".cub", path + len - 4) != 0))
2023-05-03 07:09:06 -04:00
{
2023-05-03 10:33:57 -04:00
ft_eprintf("map: name doesn't finished by .cub");
2023-05-03 07:09:06 -04:00
return (1);
}
2023-05-03 10:33:57 -04:00
return (0);
2023-05-03 07:09:06 -04:00
}
int parsing_meta(const char *path)
{
return (name_check(path));
}