aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_select_get.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-03-09 17:41:08 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-03-09 17:41:08 +0100
commitfffd37b3423720af58c416221ffbdbc5960b1439 (patch)
treed5f8c2946fff86e5bcc533484cf886bfd92c048e /src/ft_select_get.c
parentPerf (diff)
download42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.gz
42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.bz2
42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.xz
42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.tar.zst
42-cub3d-fffd37b3423720af58c416221ffbdbc5960b1439.zip
Norme
Diffstat (limited to 'src/ft_select_get.c')
-rw-r--r--src/ft_select_get.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/ft_select_get.c b/src/ft_select_get.c
index 2ed439c..c246d25 100644
--- a/src/ft_select_get.c
+++ b/src/ft_select_get.c
@@ -60,25 +60,11 @@ static int8_t
ft_get_id(char **words, t_cub *clist)
{
int8_t ret;
- char ref[13][3];
- ft_sprintf(ref[0], "R");
- ft_sprintf(ref[1], "NO");
- ft_sprintf(ref[2], "SO");
- ft_sprintf(ref[3], "EA");
- ft_sprintf(ref[4], "WE");
- ft_sprintf(ref[5], "S");
- ft_sprintf(ref[6], "F");
- ft_sprintf(ref[7], "C");
- ft_sprintf(ref[8], "L");
- ft_sprintf(ref[9], "LT");
- ft_sprintf(ref[10], "MU");
- ft_sprintf(ref[11], "SH");
- ft_bzero(ref[12], 3);
if (words[0][0] == ' ' || words[0][0] == '1')
return (FT_PARSE_END_RET);
ret = 0;
- while (ft_strncmp(words[0], ref[ret], 3) && ref[ret][0])
+ while (ft_strncmp(words[0], clist->ref[ret], 3) && clist->ref[ret][0])
ret++;
if (ret == 12)
ret = FT_PARSE_END_RET;