diff options
| author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-17 17:22:24 +0200 | 
|---|---|---|
| committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-17 17:22:24 +0200 | 
| commit | cfaf9947227065ce40661544dff9b3554ff5aca2 (patch) | |
| tree | e0d5da338e8df09c71c47405f5558cb67aac1cf8 /src/p_lcom_next.c | |
| parent | Updated TODO list (diff) | |
| download | 42-minishell-cfaf9947227065ce40661544dff9b3554ff5aca2.tar.gz 42-minishell-cfaf9947227065ce40661544dff9b3554ff5aca2.tar.bz2 42-minishell-cfaf9947227065ce40661544dff9b3554ff5aca2.tar.xz 42-minishell-cfaf9947227065ce40661544dff9b3554ff5aca2.tar.zst 42-minishell-cfaf9947227065ce40661544dff9b3554ff5aca2.zip | |
Set libft/ft_is* to type t_bool
Diffstat (limited to '')
| -rw-r--r-- | src/p_lcom_next.c | 9 | 
1 files changed, 5 insertions, 4 deletions
| 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) | 
