From 39c371a659a65ec14fffde12c79f8f140078e215 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 9 Mar 2020 14:48:28 +0100 Subject: CC back to clang only --- Makefile | 12 ++---------- libft/Makefile | 12 ++---------- src/ft_parse_map.c | 2 +- src/ft_select_get.c | 14 +++++++------- 4 files changed, 12 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index ca3f8ae..6a72280 100644 --- a/Makefile +++ b/Makefile @@ -99,18 +99,10 @@ endif #==================================================================================================# #------------------------------------------ Compiler ----------------------------------------------# #==================================================================================================# -ifeq (${OS}, Darwin) - DEBUG = -glldb -else - DEBUG = -ggdb -endif +DEBUG = -glldb FSANITIZE = -fsanitize=address #--------------------------------------------------------------------------------------------------# -ifeq (${OS}, Darwin) - CC = clang -else - CC = gcc -endif +CC = clang #--------------------------------------------------------------------------------------------------# CFLAGS = -std=c89 CFLAGS += -Wall diff --git a/libft/Makefile b/libft/Makefile index 1f93f13..d2053ee 100644 --- a/libft/Makefile +++ b/libft/Makefile @@ -119,18 +119,10 @@ USER = $(shell w | grep tty7 | awk '{print $$1}') #==============================================================================# #-------------------------------- Compiler ------------------------------------# #==============================================================================# -ifeq (${OS}, Darwin) - DEBUG = -glldb -else - DEBUG = -ggdb -endif +DEBUG = -glldb FSANITIZE = -fsanitize=address #------------------------------------------------------------------------------# -ifeq (${OS}, Darwin) - CC = clang -else - CC = gcc -endif +CC = clang #------------------------------------------------------------------------------# CFLAGS = -std=c89 CFLAGS += -Wall diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c index 8878719..9c688fe 100644 --- a/src/ft_parse_map.c +++ b/src/ft_parse_map.c @@ -97,7 +97,7 @@ void ft_error(FT_RET_NO_MAP, FT_ERR_NO_MAP, clist); ft_save_name(map_path, clist); ret = 1; - while (ret != 12 && ret >= 0) + while (ret != 25 && ret >= 0) ret = ft_parse_it(fd, clist); (ret == -2) ? (ft_map_error(FT_ERR_ALR_SET, clist)) : 0; (ret == -1) ? (ft_map_error(clist->errmsg, clist)) : 0; diff --git a/src/ft_select_get.c b/src/ft_select_get.c index 8005eb7..96ed6e7 100644 --- a/src/ft_select_get.c +++ b/src/ft_select_get.c @@ -18,8 +18,8 @@ static int8_t ft_check_exists(const int8_t ret, t_cub *clist) { - if (ret == 12) - return (12); + if (ret == 25) + return (25); if (ret == 0 && clist->currlvl == 0 && (clist->wlist.x_size != 0 || clist->wlist.y_size != 0)) return (-1); @@ -45,8 +45,8 @@ static int8_t static int8_t ft_check_exists_two(const int8_t ret, t_cub *clist) { - if (ret == 12) - return (12); + if (ret == 25) + return (25); if (ret == 8 && (clist->mlist.nlevel_path[0])) return (-1); if (ret == 9 && (clist->mlist.nl_tex_path[0])) @@ -80,7 +80,7 @@ static int8_t while (ft_strncmp(words[0], ref[ret], 3) && ref[ret][0]) ret++; if (ret == 11) - ret = 12; + ret = 25; ret = ft_check_exists(ret, clist); ret = ft_check_exists_two(ret, clist); return (ret); @@ -91,10 +91,10 @@ int8_t { int8_t id; - if ((id = ft_get_id(words, clist)) == 12) + if ((id = ft_get_id(words, clist)) == 25) { ft_free_words(words); - return (12); + return (25); } if (id < 0 || clist->get_ptr[id](words, clist) < 0) { -- cgit v1.2.3