#include #include #include static uint8_t ft_get_id(char **words) { if (!ft_strcmp(words[0], "R")) return (0); if (!ft_strcmp(words[0], "NO")) return (1); return (12); } int 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) { ft_free_words(words); return (ft_map_error(clist)); } return (0); }