aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_select_get.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_select_get.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ft_select_get.c b/src/ft_select_get.c
index e6cdfd8..8e661cb 100644
--- a/src/ft_select_get.c
+++ b/src/ft_select_get.c
@@ -12,18 +12,20 @@ ft_get_id(char **words)
return (12);
}
-int
+uint8_t
ft_select_get(char **words, t_cub *clist)
{
int (*fun_ptr[4])(char**, t_cub*);
uint8_t id;
fun_ptr[0] = ft_get_res;
- fun_ptr[1] =
- if ((*fun_ptr[ft_get_id(words)])(words, clist) < 0)
+ fun_ptr[1] = ft_get_tex;
+ if ((id = ft_get_id(words)) == 12)
+ return (12);
+ if (|| (*fun_ptr[id])(words, clist) < 0)
{
ft_free_words(words);
return (ft_map_error(clist));
}
- return (0);
+ return (id);
}