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-16 08:47:04 -04:00
|
|
|
ft_eprintf("map: name doesn't finish 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));
|
|
|
|
}
|