summaryrefslogtreecommitdiffstats
path: root/src/u_utils.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-05 17:03:49 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-05 17:03:49 +0200
commit247023e3fac41c99b5580d69262837429fb2bfed (patch)
treef8cf9e42cffa38b8b0062512fc24bb4404386c42 /src/u_utils.c
parentNot quite done yet (diff)
download42-minishell-247023e3fac41c99b5580d69262837429fb2bfed.tar.gz
42-minishell-247023e3fac41c99b5580d69262837429fb2bfed.tar.bz2
42-minishell-247023e3fac41c99b5580d69262837429fb2bfed.tar.xz
42-minishell-247023e3fac41c99b5580d69262837429fb2bfed.tar.zst
42-minishell-247023e3fac41c99b5580d69262837429fb2bfed.zip
Fuck shell
Diffstat (limited to '')
-rw-r--r--src/u_utils.c11
1 files changed, 11 insertions, 0 deletions
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 <stdint.h>
#include <unistd.h>
+#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)
{