From 247023e3fac41c99b5580d69262837429fb2bfed Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 5 Sep 2020 17:03:49 +0200 Subject: Fuck shell --- src/u_utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/u_utils.c') diff --git a/src/u_utils.c b/src/u_utils.c index ad44e82..d554a98 100644 --- a/src/u_utils.c +++ b/src/u_utils.c @@ -15,9 +15,20 @@ #include #include +#include "d_define.h" #include "f_fail.h" #include "s_struct.h" +t_bool + u_is_true_quote(char *head, char *ptr) +{ + if (((ptr - head) == 0) || + ((ptr - head) >= 1 && *(ptr - 1) != C_BS) || + ((ptr - head) > 1 && *(ptr - 1) == C_BS && *(ptr - 2) == C_BS)) + return (TRUE); + return (FALSE); +} + void u_eof_fd(int32_t fd) { -- cgit v1.2.3