CAMILLE BOUFON

This commit is contained in:
Etienne Rey-bethbeder 2023-04-11 17:26:49 +02:00
parent a6a0293095
commit 10db23e4ef

View File

@ -6,7 +6,7 @@
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */ /* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/17 13:09:08 by erey-bet #+# #+# */ /* Created: 2023/02/17 13:09:08 by erey-bet #+# #+# */
/* Updated: 2023/03/30 13:55:40 by erey-bet ### ########.fr */ /* Updated: 2023/04/11 14:57:00 by erey-bet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -38,14 +38,16 @@ int echo(int fd, char **strs)
int check_backslash_n; int check_backslash_n;
int check_start_write; int check_start_write;
int i; int i;
int y;
check_backslash_n = 0; check_backslash_n = 0;
check_start_write = 0; check_start_write = 0;
i = -1; i = -1;
while (strs[++i]) while (strs[++i])
{ {
while (is_space(*strs[i])) y = -1;
strs[i]++; while (is_space(strs[i][++y]))
;
if (check_start_write == 1 if (check_start_write == 1
|| check_argument(strs[i], &check_backslash_n)) || check_argument(strs[i], &check_backslash_n))
{ {