From 73cc6d40e6c89819c0dd9dffdd095bc9d9ea6b88 Mon Sep 17 00:00:00 2001 From: salad Date: Tue, 28 Apr 2020 15:15:40 +0200 Subject: ladies and gentlement --- src/ft_b_echo.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'src/ft_b_echo.c') 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 -- cgit v1.2.3