summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-08 18:57:19 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-08 18:57:19 +0200
commitbf6043888ebdafc3da4fc60af8f0f4888e8c53d0 (patch)
tree5229dd0cd83461741326205ac2853f9eed51c200
parentNames (diff)
download42-minishell-bf6043888ebdafc3da4fc60af8f0f4888e8c53d0.tar.gz
42-minishell-bf6043888ebdafc3da4fc60af8f0f4888e8c53d0.tar.bz2
42-minishell-bf6043888ebdafc3da4fc60af8f0f4888e8c53d0.tar.xz
42-minishell-bf6043888ebdafc3da4fc60af8f0f4888e8c53d0.tar.zst
42-minishell-bf6043888ebdafc3da4fc60af8f0f4888e8c53d0.zip
Update
Diffstat (limited to '')
-rw-r--r--TODO.org1
-rw-r--r--src/p_lblock.c12
-rw-r--r--src/p_lblock.h2
-rw-r--r--src/p_line.c2
-rw-r--r--src/p_split.c2
5 files changed, 9 insertions, 10 deletions
diff --git a/TODO.org b/TODO.org
index 4746863..2fea1e9 100644
--- a/TODO.org
+++ b/TODO.org
@@ -7,6 +7,7 @@
** DONE [#A] fix pwd when cd /
** DONE [#A] Multiline pipes (ls |)
** DONE [#A] Go full tok + quotes
+** TODO [#A] fix \; \&& \||
** TODO [#A] Variables quotes qwe="okokoko kkok" asd='bav'
** TODO [#A] ls qweqwe; echo $? <---- substitute
** TODO [#A] Careful p_line \;
diff --git a/src/p_lblock.c b/src/p_lblock.c
index a8c42ce..5be1c9d 100644
--- a/src/p_lblock.c
+++ b/src/p_lblock.c
@@ -25,8 +25,7 @@
#include "s_struct.h"
static void
- rdr_err_check(char *ptr,
- t_com **com)
+ rdr_err_check(char *ptr, t_com **com)
{
if ((*com)->redir == -1 && ft_ischarset("><", *(ptr + 1)) == TRUE)
{
@@ -43,8 +42,7 @@ static void
}
static int8_t
- get_rdrpath(char *ptr,
- t_com **com)
+ get_rdrpath(char *ptr, t_com **com)
{
char *p_rdrpath;
@@ -86,8 +84,7 @@ static void
}
int8_t
- p_get_redir(const char word[],
- t_com **com)
+ p_get_redir(const char word[], t_com **com)
{
/* TODO: norme */
char *ptr;
@@ -124,8 +121,7 @@ int8_t
}
int8_t
- p_lcom(const char line[],
- t_msh *msh)
+ p_line_block(const char line[], t_msh *msh)
{
/* TODO: norme */
uint64_t i;
diff --git a/src/p_lblock.h b/src/p_lblock.h
index 796c684..6d4a023 100644
--- a/src/p_lblock.h
+++ b/src/p_lblock.h
@@ -18,6 +18,6 @@
#include "s_struct.h"
int8_t p_get_redir(const char word[], t_com **com);
-int8_t p_lcom(const char line[], t_msh *msh);
+int8_t p_line_block(const char line[], t_msh *msh);
#endif
diff --git a/src/p_line.c b/src/p_line.c
index 645c7b6..d839154 100644
--- a/src/p_line.c
+++ b/src/p_line.c
@@ -16,7 +16,7 @@
#include "d_enum.h"
#include "f_fail.h"
#include "p_line.h"
-#include "p_lcom.h"
+#include "p_lblock.h"
#include "s_destroy.h"
#include "s_struct.h"
#include "u_utils.h"
diff --git a/src/p_split.c b/src/p_split.c
index bbe9bf5..998fda5 100644
--- a/src/p_split.c
+++ b/src/p_split.c
@@ -13,6 +13,8 @@
#include <libft.h>
#include <stdlib.h>
+#include "u_utils.h"
+
static size_t
p_count_semi_words(const char line[])
{