33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* parsing_meta.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/05/16 16:28:39 by cchauvet #+# #+# */
|
|
/* Updated: 2023/05/16 16:28:41 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "./parsing_private.h"
|
|
|
|
static int name_check(const char *path)
|
|
{
|
|
size_t len;
|
|
|
|
len = ft_strlen(path);
|
|
if (len < 4
|
|
|| (ft_strcmp(".cub", path + len - 4) != 0))
|
|
{
|
|
ft_eprintf("map: name doesn't finish by .cub");
|
|
return (1);
|
|
}
|
|
return (0);
|
|
}
|
|
|
|
int parsing_meta(const char *path)
|
|
{
|
|
return (name_check(path));
|
|
}
|