From 098d645eef7b829ef63b739fbecc4d06648df1bb Mon Sep 17 00:00:00 2001 From: TriantaTV Date: Wed, 19 Oct 2022 21:44:28 -0500 Subject: [PATCH] Added Integrated.c for integrated commands --- include/Integrated.h | 6 ++++++ src/Integrated.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 include/Integrated.h create mode 100755 src/Integrated.c diff --git a/include/Integrated.h b/include/Integrated.h new file mode 100755 index 0000000..fe2509b --- /dev/null +++ b/include/Integrated.h @@ -0,0 +1,6 @@ +#ifndef INTEGRATED_H +#define INTEGRATED_H + +void IntegratedCheck(char* command); + +#endif \ No newline at end of file diff --git a/src/Integrated.c b/src/Integrated.c new file mode 100755 index 0000000..00103c8 --- /dev/null +++ b/src/Integrated.c @@ -0,0 +1,14 @@ +#include +#include "Integrated.h" + +// Checks for commands that are built into Pish +void IntegratedCheck(char* command) +{ + if (command == "exit") + exit(0); + // If there is an argument, change to argument location + // Else, change to home directory + if (command[0] == 'c' && command[1] == 'd') + ; + return; +} \ No newline at end of file