#include #include #include int ft_get_tex_no(char **words, t_cub *clist) { if (!(*words) || !(*(words + 1)) || (*(words + 2))) return (-1); ft_memdel((void**)&clist->no_tex_path); if (!(clist->no_tex_path = ft_strdup(*(words + 1)))) return (-1); return (0); } int ft_get_tex_so(char **words, t_cub *clist) { if (!(*words) || !(*(words + 1)) || (*(words + 2))) return (-1); ft_memdel((void**)&clist->so_tex_path); if (!(clist->so_tex_path = ft_strdup(*(words + 1)))) return (-1); return (0); } int ft_get_tex_ea(char **words, t_cub *clist) { if (!(*words) || !(*(words + 1)) || (*(words + 2))) return (-1); ft_memdel((void**)&clist->ea_tex_path); if (!(clist->ea_tex_path = ft_strdup(*(words + 1)))) return (-1); return (0); } int ft_get_tex_we(char **words, t_cub *clist) { if (!(*words) || !(*(words + 1)) || (*(words + 2))) return (-1); ft_memdel((void**)&clist->we_tex_path); if (!(clist->we_tex_path = ft_strdup(*(words + 1)))) return (-1); return (0); }