summaryrefslogtreecommitdiffstats
path: root/src/s_lpipes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/s_lpipes.c')
-rw-r--r--src/s_lpipes.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/s_lpipes.c b/src/s_lpipes.c
index 9d10849..f6a6845 100644
--- a/src/s_lpipes.c
+++ b/src/s_lpipes.c
@@ -20,7 +20,7 @@
#include "s_struct.h"
struct s_lpipes
- *lpipes_last(struct s_lpipes *lpipes)
+ *s_lpipes_last(struct s_lpipes *lpipes)
{
while (lpipes->next != NULL)
lpipes = lpipes->next;
@@ -28,7 +28,7 @@ struct s_lpipes
}
void
- lpipes_add_back(struct s_lpipes **alpipes,
+ s_lpipes_add_back(struct s_lpipes **alpipes,
struct s_lpipes *new)
{
struct s_lpipes *tmp;
@@ -37,13 +37,13 @@ void
*alpipes = new;
else
{
- tmp = lpipes_last(*alpipes);
+ tmp = s_lpipes_last(*alpipes);
tmp->next = new;
}
}
void
- lpipes_clear(struct s_lpipes **lpipes)
+ s_lpipes_clear(struct s_lpipes **lpipes)
{
struct s_lpipes *tmp;
struct s_lpipes *renext;
@@ -62,12 +62,12 @@ void
}
struct s_lpipes
- *lpipes_new(const char pipedword[],
+ *s_lpipes_new(const char pipedword[],
t_msh *msh)
{
struct s_lpipes *link;
- if (!(link = (struct s_lpipes*)malloc(sizeof(struct s_lpipes))))
+ if ((link = (struct s_lpipes*)malloc(sizeof(struct s_lpipes))) == NULL)
return (NULL);
link->com = NULL;
if ((link->com = s_com_new(pipedword, msh)) == NULL)
@@ -79,7 +79,7 @@ struct s_lpipes
}
struct s_lpipes
- *split_pipes(const char word[],
+ *s_split_pipes(const char word[],
t_line *line,
t_msh *msh)
{
@@ -92,11 +92,11 @@ struct s_lpipes
i = 0;
while (words[i])
{
- if (!(lpipes = lpipes_new(words[i], msh)))
+ if (!(lpipes = s_lpipes_new(words[i], msh)))
{
return (NULL);
}
- lpipes_add_back(&line->pipes, lpipes);
+ s_lpipes_add_back(&line->pipes, lpipes);
i++;
}
ft_delwords(words);