Added Integrated.c for integrated commands

This commit is contained in:
TriantaTV 2022-10-19 21:44:28 -05:00
parent 0e2f915c50
commit 098d645eef
2 changed files with 20 additions and 0 deletions

6
include/Integrated.h Executable file
View File

@ -0,0 +1,6 @@
#ifndef INTEGRATED_H
#define INTEGRATED_H
void IntegratedCheck(char* command);
#endif

14
src/Integrated.c Executable file
View File

@ -0,0 +1,14 @@
#include <stdlib.h>
#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;
}