diff options
Diffstat (limited to '')
-rw-r--r-- | src/p_lblock.c | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/src/p_lblock.c b/src/p_lblock.c index ba47028..a9b7144 100644 --- a/src/p_lblock.c +++ b/src/p_lblock.c @@ -24,79 +24,7 @@ #include "s_lpipes.h" #include "s_struct.h" -static void - rdr_err_check(char *ptr, t_com **com) -{ - if ((*com)->redir == -1 && ft_ischarset("><", *(ptr + 1)) == TRUE) - { - /* TODO: syntax err */ - } - else if ((*com)->redir == 1 && ft_ischarset("<", *(ptr + 1)) == TRUE) - { - /* TODO: syntax err */ - } - else if ((*com)->redir == 2 && ft_ischarset("<>", *(ptr + 1)) == TRUE) - { - /* TODO: syntax err */ - } -} - -static int8_t - get_rdrpath(char *ptr, t_com **com) -{ - char *p_rdrpath; - - ptr += ((*com)->redir == 2) ? (2) : (1); - if (!((*com)->rdrpath = - (char*)malloc((ft_strlen(ptr) + 1) * sizeof(char)))) - { - return (-1); - } - p_rdrpath = (*com)->rdrpath; - while (*ptr) - { - if (*ptr != ' ') - { - *p_rdrpath = *ptr; - p_rdrpath++; - } - ptr++; - } - *p_rdrpath = '\0'; - return (0); -} - -static void - get_rdrfd(const char *ptr, - t_com **com) -{ - while (ft_isdigit(*ptr) == TRUE) - { - ptr--; - } - if (*ptr != ' ') - (*com)->rdrfd = STDOUT_FILENO; - else - { - ptr += 1; - (*com)->rdrfd = ft_atoi(ptr); - } -} - -int8_t p_get_redirs(const char word[], t_com **com) -{ - char *ptr; - - ptr = (char *)word; - while (*ptr != C_NUL) - { - ptr++; - } - return (0); -} - -int8_t - p_line_block(const char line[], t_msh *msh) +int8_t p_line_block(const char line[], t_msh *msh) { /* TODO: norme */ uint64_t i; |