diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-04-28 15:15:40 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-04-28 15:15:40 +0200 |
commit | 73cc6d40e6c89819c0dd9dffdd095bc9d9ea6b88 (patch) | |
tree | 97b48e362e63f15170a5fe64112f2d8736901212 /src/ft_b_echo.c | |
parent | backslashes as intended, multiline quotes vont me tuer (diff) | |
download | 42-minishell-73cc6d40e6c89819c0dd9dffdd095bc9d9ea6b88.tar.gz 42-minishell-73cc6d40e6c89819c0dd9dffdd095bc9d9ea6b88.tar.bz2 42-minishell-73cc6d40e6c89819c0dd9dffdd095bc9d9ea6b88.tar.xz 42-minishell-73cc6d40e6c89819c0dd9dffdd095bc9d9ea6b88.tar.zst 42-minishell-73cc6d40e6c89819c0dd9dffdd095bc9d9ea6b88.zip |
ladies and gentlement
Diffstat (limited to '')
-rw-r--r-- | src/ft_b_echo.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/ft_b_echo.c b/src/ft_b_echo.c index 7d21811..b837cac 100644 --- a/src/ft_b_echo.c +++ b/src/ft_b_echo.c @@ -18,24 +18,24 @@ #include "ft_s_struct.h" #include "ft_u_utils.h" -/* TODO: echo "quoted text", echo 'quoted text', */ -/* echo kill\nbackslash\nbut\nnot\nn, echo "quoted\nnew\nlines" */ -/* Might need to go full buffer */ +/* TODO: echo "quoted text", echo 'quoted text', done*/ +/* echo kill\nbackslash\nbut\nnot\nn, echo "quoted\nnew\nlines", done */ +/* full buffer */ void -ft_e_put(char *str, - uint8_t op) + ft_e_put(char *str, + uint8_t op) { - size_t i; + size_t i; - i = -1; - if (op == 0) - while (str[++i]) - { - if (str[i] == '\\') - i++; - ft_putchar(str[i]); - } + i = -1; + if (op == 0) + while (str[++i]) + { + if (str[i] == '\\') + i++; + ft_putchar(str[i]); + } } char @@ -77,6 +77,8 @@ void { ft_e_put(*str, 0); } + else + ft_printf("%s", *str); } uint8_t |