From ddf4006f9db4920c47efdd8488203408cf8d5e58 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 9 Sep 2020 16:45:07 +0200 Subject: qwe --- src/p_split.c | 14 ++++++++++++++ src/s_struct.h | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/p_split.c b/src/p_split.c index 25f1cc7..482bc58 100644 --- a/src/p_split.c +++ b/src/p_split.c @@ -211,6 +211,15 @@ static t_split return (sp); } +static char +**p_get_words(const char line[], const t_split sp) +{ + char **words; + + words = NULL; + return (words); +} + char **p_split_line(char line[]) { @@ -219,6 +228,11 @@ char words = NULL; sp = p_fill_sp(line); + if ((words = p_get_words(line, sp)) == NULL) + { + ft_memdel((void*)&line); + return (NULL); + } ft_memdel((void*)&line); return (words); } diff --git a/src/s_struct.h b/src/s_struct.h index f7ea271..2734618 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -14,6 +14,7 @@ #define S_STRUCT_H #include +#include #include "d_define.h" @@ -59,7 +60,7 @@ struct s_lpipes typedef struct s_line_block { - char lblock[4096]; + char lblock[ARG_MAX]; uint8_t nextif; struct s_line_block *next; } t_line_block; -- cgit v1.2.3