-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse.h
More file actions
27 lines (22 loc) · 748 Bytes
/
parse.h
File metadata and controls
27 lines (22 loc) · 748 Bytes
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
#define MAX_VAR_NUM 10
#define PIPE_MAX_NUM 10
#define FILE_MAX_SIZE 40
struct commandType {
char *command;
char *VarList[MAX_VAR_NUM];
int VarNum;
};
/* parsing information structure */
typedef struct {
int boolInfile; /* boolean value - infile specified */
int boolOutfile; /* boolean value - outfile specified */
int boolBackground; /* run the process in the background? */
struct commandType CommArray[PIPE_MAX_NUM];
int pipeNum;
char inFile[FILE_MAX_SIZE]; /* file to be piped from */
char outFile[FILE_MAX_SIZE]; /* file to be piped into */
} parseInfo;
/* the function prototypes */
parseInfo *parse(char *);
void free_info(parseInfo *);
void print_info(parseInfo *);