-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecl.h
17 lines (15 loc) · 951 Bytes
/
decl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// utility functions
void printarray(char *argsarr[]);
int prompt();
void freeSpares(char *argsarr[], int start, int end);
void reallocArray(char *argsarr[]);
void splitArray(char *argsarr[],char *argsarr2[], int taskSignPos);
int getArgsForExec(char args[], char *argsarr[], int *taskSignPos, int *waitFlag, int *taskFlag, char hisargs[]);
int getArgs(char *args1, char *argsarr[], int * taskSignPos, int *waitFlag, int * recent);
void getArgsAndFlags(char args[], char *argsarr[], int *taskFlag, int *taskSignPos, int *waitFlag, int *recent);
// Function to run commands
void comExec(char *argsarr[], int waitFlag, int taskFlag, int taskSignPos);
void comExecNormal(char *argsarr[], int waitFlag);
void comExecRedirect(char *argsarr[], char *argsarr2[] , int waitFlag, int taskFlag,int taskSignPos);
void comExecPipe(char *argsarr[], char *argsarr2[], int waitFlag, int taskSignPos);
int execPipe(char *argsarr[], char *argsarr2[], int waitFlag);