From cfaf9947227065ce40661544dff9b3554ff5aca2 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 17 Aug 2020 17:22:24 +0200 Subject: Set libft/ft_is* to type t_bool --- src/p_lcom_next.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/p_lcom_next.c') diff --git a/src/p_lcom_next.c b/src/p_lcom_next.c index cdceef5..3f18ec1 100644 --- a/src/p_lcom_next.c +++ b/src/p_lcom_next.c @@ -36,7 +36,7 @@ static int8_t s_varname = NULL; varlen = i + 1; while ((*p_words)[varlen] != '\0' && - !ft_ischarset("$=/#@%^*+{}[],.-", (*p_words)[varlen])) + ft_ischarset("$=/#@%^*+{}[],.-", (*p_words)[varlen]) == FALSE) varlen += 1; if (!(s_varname = ft_substr(*p_words, (uint32_t)i, varlen - i))) return (-1); @@ -86,9 +86,9 @@ char return (words); } i = 0; - while (word[i] && !ft_ischarset("<>", word[i])) + while (word[i] && ft_ischarset("<>", word[i]) == FALSE) i++; - while (redir > 0 && ft_isdigit(word[i])) + while (redir > 0 && ft_isdigit(word[i]) == TRUE) i--; if (!(subst = ft_substr(word, 0, i))) return (NULL); @@ -213,7 +213,8 @@ char reg = TRUE; isvar = TRUE; } - if (*ptr == '\0' || words[i][0] == '=' || ft_isdigit(words[i][0]) == 1) + if (*ptr == '\0' || words[i][0] == '=' || + ft_isdigit(words[i][0]) == TRUE) { reg = FALSE; if (i == 0) -- cgit v1.2.3