diff options
Diffstat (limited to '')
-rw-r--r-- | src/b_export.c | 2 | ||||
-rw-r--r-- | src/b_type.c | 2 | ||||
-rw-r--r-- | src/b_unset.c | 2 | ||||
-rw-r--r-- | src/e_externs.c | 2 | ||||
-rw-r--r-- | src/e_externs_pipes.c | 2 | ||||
-rw-r--r-- | src/p_lcom.c | 10 | ||||
-rw-r--r-- | src/p_lcom_next.c | 9 | ||||
-rw-r--r-- | src/s_com.c | 2 |
8 files changed, 16 insertions, 15 deletions
diff --git a/src/b_export.c b/src/b_export.c index 4267b4d..9987583 100644 --- a/src/b_export.c +++ b/src/b_export.c @@ -31,7 +31,7 @@ t_bool char *ptr; ptr = (char*)arg; - if (ft_isalpha(ptr[0]) || ptr[0] == '_') + if (ft_isalpha(ptr[0]) == TRUE || ptr[0] == '_') { return (TRUE); } diff --git a/src/b_type.c b/src/b_type.c index 0d80869..e55a87c 100644 --- a/src/b_type.c +++ b/src/b_type.c @@ -50,7 +50,7 @@ static char envpath = NULL; fullpath = NULL; - if (ft_ischarset("/.", com[0])) + if (ft_ischarset("/.", com[0]) == TRUE) { if (absolute_path_exists(com)) { diff --git a/src/b_unset.c b/src/b_unset.c index 00fab78..0df411a 100644 --- a/src/b_unset.c +++ b/src/b_unset.c @@ -27,7 +27,7 @@ static t_bool ptr = (char*)arg; r = TRUE; - if (ft_isalpha(ptr[0]) == 0) + if (ft_isalpha(ptr[0]) == FALSE) { r = FALSE; } diff --git a/src/e_externs.c b/src/e_externs.c index 46afb28..5128bc8 100644 --- a/src/e_externs.c +++ b/src/e_externs.c @@ -81,7 +81,7 @@ void char **envpath; char *fullpath; - if (ft_ischarset("./", ptr->bin[0])) + if (ft_ischarset("./", ptr->bin[0]) == TRUE) { exec_path(ptr->bin, ptr, msh); return ; diff --git a/src/e_externs_pipes.c b/src/e_externs_pipes.c index e1518fa..858e60f 100644 --- a/src/e_externs_pipes.c +++ b/src/e_externs_pipes.c @@ -153,7 +153,7 @@ void i = 0; while (rptr != NULL) { - if (ft_ischarset("/.", rptr->com->bin[0])) + if (ft_ischarset("/.", rptr->com->bin[0]) == TRUE) { if ((fullpath[i] = ft_strdup(rptr->com->bin)) == NULL) f_alloc_and_destroy_msh(msh); diff --git a/src/p_lcom.c b/src/p_lcom.c index 0e849a0..13b4d11 100644 --- a/src/p_lcom.c +++ b/src/p_lcom.c @@ -28,15 +28,15 @@ static void rdr_err_check(char *ptr, t_com **com) { - if ((*com)->redir == -1 && ft_ischarset("><", *(ptr + 1))) + if ((*com)->redir == -1 && ft_ischarset("><", *(ptr + 1)) == TRUE) { /* TODO: syntax err */ } - else if ((*com)->redir == 1 && ft_ischarset("<", *(ptr + 1))) + else if ((*com)->redir == 1 && ft_ischarset("<", *(ptr + 1)) == TRUE) { /* TODO: syntax err */ } - else if ((*com)->redir == 2 && ft_ischarset("<>", *(ptr + 1))) + else if ((*com)->redir == 2 && ft_ischarset("<>", *(ptr + 1)) == TRUE) { /* TODO: syntax err */ } @@ -72,7 +72,7 @@ static void get_rdrfd(const char *ptr, t_com **com) { - while (ft_isdigit(*ptr)) + while (ft_isdigit(*ptr) == TRUE) { ptr--; } @@ -112,7 +112,7 @@ int8_t } if ((*com)->redir > 0) { - if (ft_isdigit(*(ptr - 1))) + if (ft_isdigit(*(ptr - 1)) == TRUE) get_rdrfd(ptr - 1, com); else (*com)->rdrfd = STDOUT_FILENO; 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) diff --git a/src/s_com.c b/src/s_com.c index 2abbe9e..1bde96c 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -40,7 +40,7 @@ static int8_t { /* TODO: cut fd number "msh ~> echo a 2>file" */ /* ^ */ - if (ft_ischarset("<>", words[i][0])) + if (ft_ischarset("<>", words[i][0]) == TRUE) break ; i++; } |