blob: f798ed732ad00dcc428ec719d981548ac03f6676 (
plain)
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* s_struct.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */
/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */
/* */
/* ************************************************************************** */
#ifndef S_STRUCT_H
#define S_STRUCT_H
#include <stdint.h>
#include "d_define.h"
/*
** redir(int8_t) index
** --------------------
** -1: <
** 1: >
** 2: >>
** 0: means no redirection
*/
typedef struct s_lpipes *t_lpipes;
typedef struct s_lvars
{
char *name;
char *val;
struct s_lvars *next;
} t_lvars;
typedef struct s_lcom
{
char *com;
char **argv;
int8_t redir;
int32_t rdrfd;
char *rdrpath;
struct s_lpipes *pipes;
struct s_lcom *next;
} t_lcom;
struct s_lpipes
{
struct s_lcom *one;
struct s_lpipes *next;
};
typedef struct s_msh
{
char **envp;
char *ps_one;
uint8_t ret;
char *shname;
char **bu_ref;
uint8_t (*bu_ptr[FT_BUILTINS_COUNT])(char **, struct s_msh*);
struct s_lcom *curr;
struct s_lvars *vars;
} t_msh;
#endif
|