#include #include static void ft_checkdigit(const char *word, t_cub *clist) { size_t i; i = 0; while (ft_isdigit(word[i])) i++; if (i != ft_strlen(word)) ft_map_error(clist); } int ft_get_res(char **words, t_cub *clist) { if (!(*words + 0) || !(*(words + 1)) || !(*(words + 2)) || (*(words + 3))) return (-1); ft_checkdigit(words[1], clist); ft_checkdigit(words[2], clist); clist->wlist->x_size = ft_atoi(words[1]); clist->wlist->y_size = ft_atoi(words[2]); return (0); }