summaryrefslogtreecommitdiffstats
path: root/src/ft_p_lcom.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-07-27 18:55:07 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-07-27 18:55:07 +0200
commit487a66394061f2d14a2fa421302966b5442d643f (patch)
tree34237d4e9cb85f94bcefd46f399d2224dff3f6b3 /src/ft_p_lcom.c
parentCorrect shell prompt (diff)
download42-minishell-487a66394061f2d14a2fa421302966b5442d643f.tar.gz
42-minishell-487a66394061f2d14a2fa421302966b5442d643f.tar.bz2
42-minishell-487a66394061f2d14a2fa421302966b5442d643f.tar.xz
42-minishell-487a66394061f2d14a2fa421302966b5442d643f.tar.zst
42-minishell-487a66394061f2d14a2fa421302966b5442d643f.zip
I couldn't see shit
Diffstat (limited to '')
-rw-r--r--src/p_lcom.c (renamed from src/ft_p_lcom.c)36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/ft_p_lcom.c b/src/p_lcom.c
index a8449ae..f47e2c1 100644
--- a/src/ft_p_lcom.c
+++ b/src/p_lcom.c
@@ -1,7 +1,7 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
-/* ft_p_lcom.c :+: :+: :+: */
+/* p_lcom.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
@@ -17,14 +17,14 @@
#include <unistd.h>
#include <errno.h>
-#include "ft_d_define.h"
-#include "ft_f_fail.h"
-#include "ft_s_lcom.h"
-#include "ft_s_lpipes.h"
-#include "ft_s_struct.h"
+#include "d_define.h"
+#include "f_fail.h"
+#include "s_lcom.h"
+#include "s_lpipes.h"
+#include "s_struct.h"
static void
- ft_rdr_err_check(char *ptr,
+ rdr_err_check(char *ptr,
t_lcom **link)
{
if ((*link)->redir == -1 && ft_ischarset("><", *(ptr + 1)))
@@ -42,7 +42,7 @@ static void
}
static int8_t
- ft_get_rdrpath(char *ptr,
+ get_rdrpath(char *ptr,
t_lcom **link)
{
char *p_rdrpath;
@@ -68,7 +68,7 @@ static int8_t
}
static void
- ft_get_rdrfd(const char *ptr,
+ get_rdrfd(const char *ptr,
t_lcom **link)
{
while (ft_isdigit(*ptr))
@@ -85,7 +85,7 @@ static void
}
int8_t
- ft_get_redir(const char word[],
+ get_redir(const char word[],
t_lcom **link)
{
/* TODO: norme */
@@ -112,18 +112,18 @@ int8_t
if ((*link)->redir > 0)
{
if (ft_isdigit(*(ptr - 1)))
- ft_get_rdrfd(ptr - 1, link);
+ get_rdrfd(ptr - 1, link);
else
(*link)->rdrfd = STDOUT_FILENO;
- ft_rdr_err_check(ptr, link);
- if (ft_get_rdrpath(ptr, link) != 0)
+ rdr_err_check(ptr, link);
+ if (get_rdrpath(ptr, link) != 0)
return (-1);
}
return (0);
}
int8_t
- ft_p_lcom(const char line[],
+ p_lcom(const char line[],
const uint64_t count,
t_msh *msh)
{
@@ -142,15 +142,15 @@ int8_t
/* TODO: split pipes here */
if (ft_strchr(words[i], '|'))
{
- if (!(link = ft_lcom_new(NULL, msh)))
+ if (!(link = lcom_new(NULL, msh)))
return (-1);
- if (!(ft_split_pipes(words[i], link, msh)))
+ if (!(split_pipes(words[i], link, msh)))
return (-1);
next = TRUE;
}
- if (next == FALSE && !(link = ft_lcom_new(words[i], msh)))
+ if (next == FALSE && !(link = lcom_new(words[i], msh)))
return (-1);
- ft_lcom_add_back(&msh->curr, link);
+ lcom_add_back(&msh->curr, link);
i++;
}
ft_delwords(words);