-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparser.h
More file actions
25 lines (21 loc) · 851 Bytes
/
parser.h
File metadata and controls
25 lines (21 loc) · 851 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
#ifndef PARSER_H
#define PARSER_H
typedef struct cmdstruct {
int count;
char* inputFile;
char* outputFile;
int inputFlag; //if any non zero or neg # then it means there is a flag
int outputFlag; //if any non zero or neg # then it means there is a flag
int doubleOutputFlag; //if any non zero or neg # then it means there is a flag
int ampersandFlag; //if 0 no ampersand found if 1 means ampersand found
int pipeFlag; //if 0 no pipe found if 1 pipe found
char** parseArray;
int errorFlag; //if this flag is any non zero integer it means that the cmdLine when parsed picked up on an error and running cmdLine would result in an error
} CMDstruct;
typedef struct countIndex {
int count;
CMDstruct* cmdLineArray;
} Count;
Count parseInput(char* cmdLine);
CMDstruct parseSingleCmd (char* cmdLine);
#endif