diff options
Diffstat (limited to 'src/ft_get_colors.c')
-rw-r--r-- | src/ft_get_colors.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/ft_get_colors.c b/src/ft_get_colors.c index 417608b..69eb8f8 100644 --- a/src/ft_get_colors.c +++ b/src/ft_get_colors.c @@ -30,7 +30,7 @@ static int8_t if (i != ft_strlen(num[j])) { ft_free_words(num); - ft_sprintf(clist.errmsg, FT_ERR_COLOR_ALPHA); + ft_sprintf(clist->errmsg, FT_ERR_COLOR_ALPHA); return (-1); } i = 0; @@ -45,7 +45,7 @@ static int8_t if (ft_atoi(num[0]) > 255 || ft_atoi(num[1]) > 255 || ft_atoi(num[2]) > 255) { - ft_sprintf(clist.errmsg, FT_ERR_COLOR_MAX); + ft_sprintf(clist->errmsg, FT_ERR_COLOR_MAX); ft_free_words(num); return (-1); } @@ -57,7 +57,7 @@ static int8_t { if (!num[0] || !num[1] || !num[2] || num[3]) { - ft_sprintf(clist.errmsg, FT_ERR_COLOR_ARGS); + ft_sprintf(clist->errmsg, FT_ERR_COLOR_ARGS); ft_free_words(num); return (-1); } @@ -71,12 +71,12 @@ int8_t if (!(*words) || !words[1] || words[2]) { - ft_sprintf(clist.errmsg, FT_ERR_ARGS); + ft_sprintf(clist->errmsg, FT_ERR_ARGS); return (-1); } if (!(num = ft_split(words[1], ','))) { - ft_sprintf(clist.errmsg, FT_ERR_ALLOCATE); + ft_sprintf(clist->errmsg, FT_ERR_ALLOCATE); return (-1); } if (ft_check_nums_amount(num, clist) < 0) @@ -85,9 +85,9 @@ int8_t return (-1); if (ft_check_max_int(num, clist) < 0) return (-1); - clist.f_rgb.r = ft_atoi(num[0]); - clist.f_rgb.g = ft_atoi(num[1]); - clist.f_rgb.b = ft_atoi(num[2]); + clist->f_rgb.r = ft_atoi(num[0]); + clist->f_rgb.g = ft_atoi(num[1]); + clist->f_rgb.b = ft_atoi(num[2]); ft_free_words(num); return (0); } @@ -99,12 +99,12 @@ int8_t if (!(*words) || !words[1] || words[2]) { - ft_sprintf(clist.errmsg, FT_ERR_ARGS); + ft_sprintf(clist->errmsg, FT_ERR_ARGS); return (-1); } if (!(num = ft_split(words[1], ','))) { - ft_sprintf(clist.errmsg, FT_ERR_ALLOCATE); + ft_sprintf(clist->errmsg, FT_ERR_ALLOCATE); return (-1); } if (ft_check_nums_amount(num, clist) < 0) @@ -113,9 +113,9 @@ int8_t return (-1); if (ft_check_max_int(num, clist) < 0) return (-1); - clist.c_rgb.r = ft_atoi(num[0]); - clist.c_rgb.g = ft_atoi(num[1]); - clist.c_rgb.b = ft_atoi(num[2]); + clist->c_rgb.r = ft_atoi(num[0]); + clist->c_rgb.g = ft_atoi(num[1]); + clist->c_rgb.b = ft_atoi(num[2]); ft_free_words(num); return (0); } |