From 3976118a6e9acd035d20ef79d92632ecb962814e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 5 Sep 2020 14:48:49 +0200 Subject: Rewrite in progress --- src/p_args.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/p_args.c') diff --git a/src/p_args.c b/src/p_args.c index 9ce0230..0ec391c 100644 --- a/src/p_args.c +++ b/src/p_args.c @@ -52,9 +52,9 @@ static char ptr++; if (*ptr == c && c == C_DQUOTE) { - if (*(ptr - 1) == C_BACKSLASH) + if (*(ptr - 1) == C_BS) { - if (*(ptr - 2) != C_BACKSLASH) + if (*(ptr - 2) != C_BS) ptr++; } } @@ -74,13 +74,13 @@ static int32_t { (*ptr)++; if ((*(*ptr) == C_SQUOTE || *(*ptr) == C_DQUOTE) && - *(*ptr - 1) != C_BACKSLASH) + *(*ptr - 1) != C_BS) { (*ptr) += 1; return (p_count_args(head, *ptr, argc, start)); } - if (ft_iswhitespace(*(*ptr)) == TRUE && *(*ptr - 1) == C_BACKSLASH && - *(*ptr - 2) != C_BACKSLASH) + if (ft_iswhitespace(*(*ptr)) == TRUE && *(*ptr - 1) == C_BS && + *(*ptr - 2) != C_BS) { (*ptr) += 1; return (-1); -- cgit v1.2.3