-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminishell_structs.h
73 lines (64 loc) · 1.73 KB
/
minishell_structs.h
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* minishell_structs.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: caubry <caubry@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/10 16:28:32 by ychibani #+# #+# */
/* Updated: 2022/10/04 14:47:56 by caubry ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef MINISHELL_STRUCTS_H
# define MINISHELL_STRUCTS_H
typedef struct s_token
{
char *content;
struct s_token *next;
} t_token;
typedef struct s_env
{
char *name;
char *value;
int env;
int order;
struct s_env *next;
} t_env;
typedef struct s_lexer
{
t_type type;
char *token;
int hd_type;
int empty;
struct s_lexer *next;
} t_lexer;
typedef struct s_user_input
{
t_list *token;
t_lexer *lexer;
t_lexer *error_delim;
t_env **test_env;
char **env;
char *to_tokenize;
int ret_token;
int ret_hd;
} t_user_input;
typedef struct s_program_data
{
int rv;
int synthax_error;
t_user_input *ui;
t_list *token;
char **all_inputs;
char ***envp;
char **env;
} t_program_data;
typedef struct s_cmd
{
int redirection[2];
int index;
char **arg;
struct s_msh *msh;
struct s_cmd *next;
} t_cmd;
#endif