Big commit: Setup outline for piping, piping has errors still, cleaned code
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
const char* GetHomeDir(void);
|
||||
|
||||
typedef struct CommandStruct {
|
||||
char* argv[100]; // Max 100 commands
|
||||
int argc;
|
||||
} CommandStruct;
|
||||
|
||||
void CopyCommandStruct(CommandStruct* oldCommand, CommandStruct* newCommand, int start, int end);
|
||||
void ResetCommandStruct(CommandStruct* command);
|
||||
|
||||
#endif
|
||||
@@ -3,16 +3,16 @@
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
const char* GetHomeDir(void);
|
||||
void CheckRedirection(CommandStruct* command);
|
||||
int CheckSymbol(CommandStruct* command, char symbol, int start);
|
||||
int IntegratedCheck(CommandStruct* command);
|
||||
void GetInput(char* inputString);
|
||||
void append(char *input, char *file);
|
||||
void input(char *command);
|
||||
void ExecPipe();
|
||||
int ExecPipe(CommandStruct* commandParent, CommandStruct* commandChild, int* pipefd);
|
||||
void output(char *command);
|
||||
void SplitInput(char* inputString, CommandStruct* command);
|
||||
void ParseInput(char* inputString, CommandStruct* command, char *symbol);
|
||||
void ReadPishrc(CommandStruct* command, char* inputString);
|
||||
void ParseInput(char* inputString, CommandStruct* command, char* symbol);
|
||||
void RunChild(CommandStruct* commandChild, int* pipefd);
|
||||
void ioRedirection(CommandStruct* command);
|
||||
#endif
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
#include "Common.h"
|
||||
|
||||
void Pish(void);
|
||||
void ReadPishrc(CommandStruct* commandParent, CommandStruct *commandChild, char* inputString);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user