Repository navigation
Expand file tree
/
Copy pathminishell_struct.h
More file actions
80 lines (69 loc) · 1.66 KB
/
Copy pathminishell_struct.h
File metadata and controls
80 lines (69 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* minishell_struct.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aykrifa <aykrifa@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/05 10:44:40 by aykrifa #+# #+# */
/* Updated: 2025/05/02 08:06:40 by cbordeau ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MINISHELL_STRUCT_H
# define MINISHELL_STRUCT_H
# include "minishell_define.h"
typedef struct s_cmd
{
t_type type;
}t_cmd;
typedef struct s_execcmd
{
t_type type;
char *argv[MAXARGS];
char *eargv[MAXARGS];
char **args;
}t_exec;
typedef struct s_redircmd
{
t_type type;
t_cmd *cmd;
char *file;
char *efile;
int free;
int mode;
int fd;
}t_redir;
typedef struct s_pipecmd
{
t_type type;
t_cmd *left;
t_cmd *right;
}t_pipe;
typedef struct s_line
{
t_type type;
int mode;
t_cmd *left;
t_cmd *right;
}t_line;
typedef struct s_shell
{
char *buf;
char *env[MAXENV];
t_cmd *head;
int status;
int save_in;
int save_out;
} t_shell;
typedef struct s_parser
{
char **ps;
char *es;
int error;
} t_parser;
typedef struct s_file
{
char *q;
char *eq;
} t_file;
#endif