summaryrefslogtreecommitdiffstats
path: root/src/ft_b_echo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_b_echo.c')
-rw-r--r--src/ft_b_echo.c30
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