-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit_nodes_pa.c
46 lines (40 loc) · 1.4 KB
/
init_nodes_pa.c
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* init_nodes_pa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: asfaihi <asfaihi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/06/15 17:26:25 by asfaihi #+# #+# */
/* Updated: 2021/09/28 14:25:12 by asfaihi ### ########.fr */
/* */
/* ************************************************************************** */
#include "parsing.h"
void initialize_cmd_node(t_cmd *new, char *s, t_list *env_lst)
{
int i;
i = 0;
new->cmd = NULL;
new->args = NULL;
new->redir = NULL;
allocate_args(s, new, env_lst);
}
void initialize_redir_node(t_redir *new)
{
new->file = NULL;
new->type = '\0';
}
void initialize_env_node(t_env *new)
{
new->key = NULL;
new->value = NULL;
}
void initialize_prs_node(t_prs *prs)
{
prs->i = 0;
prs->arg_num = 0;
prs->ambigous = 0;
prs->ret_value = g_exit_status;
prs->outside_quote = 0;
prs->extra_args = NULL;
}