summaryrefslogtreecommitdiffstats
path: root/src/s_struct.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/s_struct.h73
1 files changed, 37 insertions, 36 deletions
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