Connected parsing to rest of the game

This commit is contained in:
Philippe BLAGOJEVIC
2022-04-23 20:12:13 +02:00
parent fac1f78230
commit f53e66556b
19 changed files with 1010 additions and 23 deletions

View File

@@ -0,0 +1,27 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* check_extension.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pblagoje <pblagoje@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/04/17 00:24:35 by pblagoje #+# #+# */
/* Updated: 2022/04/17 00:24:38 by pblagoje ### ########.fr */
/* */
/* ************************************************************************** */
#include "cube3d.h"
int check_extension(char *filename, char *ext)
{
char *str;
if (!filename || !ext)
return (1);
str = ft_strrchr(filename, '.');
if (!str)
return (2);
if (!ft_strcmp(str, ext))
return (0);
return (3);
}