From 441295b57b9892267841840d8d7166b9306f8501 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 25 Aug 2020 23:25:07 +0200 Subject: In progress --- src/s_struct.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 15505d5..54d3af3 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -74,6 +74,7 @@ typedef struct s_msh char **bu_ref; char *cwd; char env_fork_tmp[128][1024]; + char sqb_ref[FT_ID_SQB_COUNT][4]; uint8_t (*bu_ptr[FT_BUILTINS_COUNT])(char **, struct s_msh*); struct s_line *curr; struct s_lvars *vars; -- cgit v1.2.3 From 3a09e7ae69c3eb1fc3d1f8dfa25f7376ca066e86 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 27 Aug 2020 15:33:35 +0200 Subject: Freed leaks --- src/s_struct.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 54d3af3..3f9e84f 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -28,19 +28,19 @@ typedef struct s_lvars { + struct s_lvars *next; char *name; char *val; - struct s_lvars *next; } t_lvars; typedef struct s_com { - char *bin; char **argv; - int8_t redir; - int32_t rdrfd; - char *rdrpath; char **env_fork; + char *rdrpath; + char *bin; + int32_t rdrfd; + int8_t redir; } t_com; struct s_lpipes @@ -59,25 +59,26 @@ struct s_lpipes typedef struct s_line { - uint8_t nextif; struct s_com *com; struct s_lpipes *pipes; struct s_line *next; + uint8_t nextif; } t_line; typedef struct s_msh { + struct s_line *curr; + struct s_lvars *vars; char **envp; + char **bu_ref; char ps[4][1024]; - uint8_t ret; char *shname; - char **bu_ref; char *cwd; + int32_t fd; char env_fork_tmp[128][1024]; char sqb_ref[FT_ID_SQB_COUNT][4]; uint8_t (*bu_ptr[FT_BUILTINS_COUNT])(char **, struct s_msh*); - struct s_line *curr; - struct s_lvars *vars; + uint8_t ret; } t_msh; #endif -- cgit v1.2.3 From 8a1352d62c0dd66ecdd5807e83c16a00fb864635 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 27 Aug 2020 17:47:04 +0200 Subject: Histfile is BAV --- src/s_struct.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 3f9e84f..01c8f1f 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -72,11 +72,12 @@ typedef struct s_msh char **envp; char **bu_ref; char ps[4][1024]; + char env_fork_tmp[128][1024]; + char sqb_ref[FT_ID_SQB_COUNT][4]; + char hist[1037595]; char *shname; char *cwd; int32_t fd; - char env_fork_tmp[128][1024]; - char sqb_ref[FT_ID_SQB_COUNT][4]; uint8_t (*bu_ptr[FT_BUILTINS_COUNT])(char **, struct s_msh*); uint8_t ret; } t_msh; -- cgit v1.2.3 From 4543c3ba3222d47780ad3e091cfe6f3098cc2bca Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 6 Sep 2020 21:56:20 +0200 Subject: Stacked --- src/s_struct.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 01c8f1f..a1d1828 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -43,7 +43,7 @@ typedef struct s_com int8_t redir; } t_com; -struct s_lpipes +struct s_lpipes { struct s_com *com; struct s_lpipes *next; @@ -61,8 +61,8 @@ typedef struct s_line { struct s_com *com; struct s_lpipes *pipes; - struct s_line *next; uint8_t nextif; + struct s_line *next; } t_line; typedef struct s_msh -- cgit v1.2.3 From d0038f19a7cb23749588b72c9febcf114d9d31e9 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 8 Sep 2020 18:31:51 +0200 Subject: static hist, words fix --- src/s_struct.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index a1d1828..1089dc6 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -74,7 +74,6 @@ typedef struct s_msh char ps[4][1024]; char env_fork_tmp[128][1024]; char sqb_ref[FT_ID_SQB_COUNT][4]; - char hist[1037595]; char *shname; char *cwd; int32_t fd; -- cgit v1.2.3 From 4dd10e6f4de22446ea84d7b194d2a18cb6e43c6c Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 8 Sep 2020 18:50:11 +0200 Subject: Names --- src/s_struct.h | 73 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 36 deletions(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 1089dc6..f98f948 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -26,27 +26,27 @@ ** 0: means no redirection */ -typedef struct s_lvars +typedef struct s_lvars { - struct s_lvars *next; - char *name; - char *val; -} t_lvars; + struct s_lvars *next; + char *name; + char *val; +} t_lvars; -typedef struct s_com +typedef struct s_com { - char **argv; - char **env_fork; - char *rdrpath; - char *bin; - int32_t rdrfd; - int8_t redir; -} t_com; + char **argv; + char **env_fork; + char *rdrpath; + char *bin; + int32_t rdrfd; + int8_t redir; +} t_com; -struct s_lpipes +struct s_lpipes { - struct s_com *com; - struct s_lpipes *next; + struct s_com *com; + struct s_lpipes *next; }; /* @@ -57,28 +57,29 @@ struct s_lpipes ** 2: || */ -typedef struct s_line +typedef struct s_line { - struct s_com *com; - struct s_lpipes *pipes; - uint8_t nextif; - struct s_line *next; -} t_line; + char line[4096]; + uint8_t nextif; + struct s_line_block *next; +} t_line; -typedef struct s_msh +typedef struct s_msh { - struct s_line *curr; - struct s_lvars *vars; - char **envp; - char **bu_ref; - char ps[4][1024]; - char env_fork_tmp[128][1024]; - char sqb_ref[FT_ID_SQB_COUNT][4]; - char *shname; - char *cwd; - int32_t fd; - uint8_t (*bu_ptr[FT_BUILTINS_COUNT])(char **, struct s_msh*); - uint8_t ret; -} t_msh; + struct s_line_block *curr; + struct s_com *com; + struct s_lpipes *pipes; + struct s_lvars *vars; + char **envp; + char **bu_ref; + char ps[4][1024]; + char env_fork_tmp[128][1024]; + char sqb_ref[FT_ID_SQB_COUNT][4]; + char *shname; + char *cwd; + int32_t fd; + uint8_t (*bu_ptr[FT_BUILTINS_COUNT])(char **, struct s_msh*); + uint8_t ret; +} t_msh; #endif -- cgit v1.2.3 From d742075e1af0c063ef9677f157263c0d45253f73 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 8 Sep 2020 19:32:40 +0200 Subject: Rework in progress --- src/s_struct.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index f98f948..f7ea271 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -57,12 +57,12 @@ struct s_lpipes ** 2: || */ -typedef struct s_line +typedef struct s_line_block { - char line[4096]; + char lblock[4096]; uint8_t nextif; struct s_line_block *next; -} t_line; +} t_line_block; typedef struct s_msh { -- cgit v1.2.3 From ddf4006f9db4920c47efdd8488203408cf8d5e58 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 9 Sep 2020 16:45:07 +0200 Subject: qwe --- src/s_struct.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/s_struct.h') 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 From 44cd349d69a11fec6c698ec45a59e373cad56c2e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 9 Sep 2020 18:40:11 +0200 Subject: qwe --- src/s_struct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 2734618..31c80fc 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -60,7 +60,7 @@ struct s_lpipes typedef struct s_line_block { - char lblock[ARG_MAX]; + char *lblock; uint8_t nextif; struct s_line_block *next; } t_line_block; -- cgit v1.2.3 From 0ab424df075f09aac376890a9a5a73cb74e053bf Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 11 Sep 2020 16:56:23 +0200 Subject: alias in progress --- src/s_struct.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 31c80fc..b45af9f 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -18,6 +18,20 @@ #include "d_define.h" +typedef struct s_lalias +{ + char *name; + char *value; + struct s_lalias *next; +} t_lalias; + +typedef struct s_lvars +{ + struct s_lvars *next; + char *name; + char *val; +} t_lvars; + /* ** redir(int8_t) index ** ------------------- @@ -27,13 +41,6 @@ ** 0: means no redirection */ -typedef struct s_lvars -{ - struct s_lvars *next; - char *name; - char *val; -} t_lvars; - typedef struct s_com { char **argv; @@ -71,6 +78,7 @@ typedef struct s_msh struct s_com *com; struct s_lpipes *pipes; struct s_lvars *vars; + struct s_lalias *alias; char **envp; char **bu_ref; char ps[4][1024]; -- cgit v1.2.3 From 9d23dbe9fded1100b50073d29d06d99b4adb37fa Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 11 Sep 2020 17:01:33 +0200 Subject: Preparing files --- src/s_struct.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index b45af9f..d678c36 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -18,6 +18,13 @@ #include "d_define.h" +typedef struct s_lvars +{ + char *name; + char *val; + struct s_lvars *next; +} t_lvars; + typedef struct s_lalias { char *name; @@ -25,13 +32,6 @@ typedef struct s_lalias struct s_lalias *next; } t_lalias; -typedef struct s_lvars -{ - struct s_lvars *next; - char *name; - char *val; -} t_lvars; - /* ** redir(int8_t) index ** ------------------- -- cgit v1.2.3 From 6e74d376f1a888f4730b9fa39df1b34b251eb3f5 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 11 Sep 2020 17:45:49 +0200 Subject: Aliases list in progress --- src/s_struct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index d678c36..963d5ad 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -28,7 +28,7 @@ typedef struct s_lvars typedef struct s_lalias { char *name; - char *value; + char *val; struct s_lalias *next; } t_lalias; -- cgit v1.2.3 From ff845bada3fe6898a228c10422f0561e2a532622 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 11 Sep 2020 21:18:27 +0200 Subject: Fuck this --- src/s_struct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 963d5ad..310c5f4 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -82,7 +82,7 @@ typedef struct s_msh char **envp; char **bu_ref; char ps[4][1024]; - char env_fork_tmp[128][1024]; + char env_fork_tmp[128][4096]; char sqb_ref[FT_ID_SQB_COUNT][4]; char *shname; char *cwd; -- cgit v1.2.3 From 949f93b57b6411b07eb12110e0db37cdf393db0c Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 12 Sep 2020 16:33:02 +0200 Subject: Fuck --- src/s_struct.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index 310c5f4..ba56e82 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -29,6 +29,7 @@ typedef struct s_lalias { char *name; char *val; + size_t id; struct s_lalias *next; } t_lalias; -- cgit v1.2.3 From aeb1dec54283f4506f47893923b29a71499353de Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 15 Sep 2020 20:14:00 +0200 Subject: Init fix --- src/s_struct.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/s_struct.h') diff --git a/src/s_struct.h b/src/s_struct.h index ba56e82..871b0f4 100644 --- a/src/s_struct.h +++ b/src/s_struct.h @@ -81,7 +81,6 @@ typedef struct s_msh struct s_lvars *vars; struct s_lalias *alias; char **envp; - char **bu_ref; char ps[4][1024]; char env_fork_tmp[128][4096]; char sqb_ref[FT_ID_SQB_COUNT][4]; -- cgit v1.2.3