summaryrefslogtreecommitdiffstats
path: root/src/ft_echo.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-19 22:27:11 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-19 22:27:11 +0200
commit62afe606a355581c5b48cca361478c43fb6ae4cf (patch)
treea278fe2fdf44c296892616554743b9d380ff7afa /src/ft_echo.c
parentAdded joe-sh_history to gitignore (diff)
download42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.tar.gz
42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.tar.bz2
42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.tar.xz
42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.tar.zst
42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.zip
Well well well that wasn't too bad, now remake everything
Diffstat (limited to '')
-rw-r--r--src/ft_echo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ft_echo.c b/src/ft_echo.c
index 1ca8fc2..e8ef75c 100644
--- a/src/ft_echo.c
+++ b/src/ft_echo.c
@@ -24,17 +24,17 @@ ft_echo(char **com, uint8_t n)
i = 1;
fd = 1;
if (!com[1])
- ft_putendl_fd("", fd);
+ ft_dprintf(fd, "\n");
else if (!ft_strncmp(com[1], "-n", ft_strlen(com[1])))
i = 2;
while (i < n)
{
- ft_putstr_fd(ft_strtrim(com[i], "\""), fd);
+ ft_dprintf(fd, "%s", ft_strtrim(com[i], "\""));
if (i != n - 1)
- ft_putchar_fd(' ', fd);
+ ft_dprintf(fd, " ");
i++;
}
if (ft_strncmp(com[1], "-n", ft_strlen(com[1])))
- ft_putchar_fd('\n', fd);
+ ft_dprintf(fd, "\n");
return (0);
}