From a39a1b47d5775404cd0357d105e132c3c69fa545 Mon Sep 17 00:00:00 2001 From: salad Date: Mon, 26 Oct 2020 14:31:44 +0100 Subject: ARG_MAX DE MES DEUX BOULES --- src/b_alias.c | 2 +- src/b_type.c | 2 +- src/e_externs.c | 2 +- src/e_externs_pipes.c | 2 +- src/m_init.c | 2 +- src/m_loop.c | 2 +- src/m_mshrc.c | 2 +- src/m_prompt.c | 2 +- src/p_args_next.c | 2 +- src/p_lblock_next.c | 2 +- src/p_split.c | 2 +- src/s_com.c | 5 ++--- src/s_struct.h | 2 +- src/u_path.c | 8 +++++--- src/u_vars_next.c | 2 +- 15 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/b_alias.c b/src/b_alias.c index 5ddc46f..6b86b25 100644 --- a/src/b_alias.c +++ b/src/b_alias.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include "b_alias_print.h" #include "d_define.h" diff --git a/src/b_type.c b/src/b_type.c index c490aae..3dd7b42 100644 --- a/src/b_type.c +++ b/src/b_type.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "d_define.h" #include "f_fail.h" diff --git a/src/e_externs.c b/src/e_externs.c index 8761986..9d5ec6a 100644 --- a/src/e_externs.c +++ b/src/e_externs.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include "b_export_next.h" diff --git a/src/e_externs_pipes.c b/src/e_externs_pipes.c index ca843d0..c76175f 100644 --- a/src/e_externs_pipes.c +++ b/src/e_externs_pipes.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include "d_define.h" diff --git a/src/m_init.c b/src/m_init.c index 91baf7c..22e420b 100644 --- a/src/m_init.c +++ b/src/m_init.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include "d_define.h" #include "s_struct.h" diff --git a/src/m_loop.c b/src/m_loop.c index 3762aac..35605c3 100644 --- a/src/m_loop.c +++ b/src/m_loop.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include "d_define.h" #include "e_line.h" diff --git a/src/m_mshrc.c b/src/m_mshrc.c index 7f6b8b9..5033697 100644 --- a/src/m_mshrc.c +++ b/src/m_mshrc.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "d_define.h" #include "s_struct.h" diff --git a/src/m_prompt.c b/src/m_prompt.c index 584a98d..789da0d 100644 --- a/src/m_prompt.c +++ b/src/m_prompt.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "d_define.h" #include "m_prompt.h" diff --git a/src/p_args_next.c b/src/p_args_next.c index ea8dd81..6be76b1 100644 --- a/src/p_args_next.c +++ b/src/p_args_next.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include "d_define.h" #include "p_args.h" diff --git a/src/p_lblock_next.c b/src/p_lblock_next.c index 02ecbb2..f5e5aac 100644 --- a/src/p_lblock_next.c +++ b/src/p_lblock_next.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "d_define.h" #include "s_destroy.h" diff --git a/src/p_split.c b/src/p_split.c index dc26c04..0c6003c 100644 --- a/src/p_split.c +++ b/src/p_split.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include "f_fail.h" #include "d_define.h" diff --git a/src/s_com.c b/src/s_com.c index ebf7b87..919c620 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -12,15 +12,14 @@ #include #include -#include +#include #include "d_define.h" #include "f_fail.h" #include "p_args.h" #include "p_lblock.h" #include "p_lblock_next.h" ->>>>>>> master -#include "s_struct.h" +#include "s_struct.h" static int8_t s_fill_com(char *words[], t_com **com) diff --git a/src/s_struct.h b/src/s_struct.h index 871b0f4..45c5890 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -14,7 +14,7 @@ #define S_STRUCT_H #include -#include +#include #include "d_define.h" diff --git a/src/u_path.c b/src/u_path.c index b43946f..a682a75 100644 --- a/src/u_path.c +++ b/src/u_path.c @@ -13,7 +13,9 @@ #include #include #include -#include +#include + +/* TODO: ARG_MAX ????? */ #include "s_struct.h" #include "u_vars.h" @@ -42,11 +44,11 @@ uint8_t u_search_in_path(char fullpath[], t_msh *msh) { struct dirent *ent; - char tmp[ARG_MAX]; + char tmp[131072]; char *tok_path; DIR *dir; - if (u_get_var_value(tmp, "$PATH", ARG_MAX, msh) != 0) + if (u_get_var_value(tmp, "$PATH", 131072, msh) != 0) return (1); tok_path = ft_strtok(tmp, ":"); while (tok_path != NULL) diff --git a/src/u_vars_next.c b/src/u_vars_next.c index 2f23667..6c6cd1c 100644 --- a/src/u_vars_next.c +++ b/src/u_vars_next.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "d_enum.h" #include "s_lvars.h" -- cgit v1.2.3