forked from JuanMiguel01/shell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.h
More file actions
22 lines (19 loc) · 650 Bytes
/
Copy pathparser.h
File metadata and controls
22 lines (19 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef PARSER_H
#define PARSER_H
typedef struct command {
char *name;
char **args;
char *stdin_archivo;
char *stdout_archivo;
int pid;
unsigned doble : 1;
unsigned tuberia : 1;
unsigned background : 1;
unsigned num_args;
struct command *next;
struct command *if_commands; // Agregar un campo para almacenar los comandos entre if y then
struct command *then_commands; // Agregar un campo para almacenar los comandos entre then y else o end
struct command *else_commands; // Agregar un campo para almacenar los comandos entre else y end
} command_t;
command_t *parse_commands(char *input);
#endif