Added Integrated.c for integrated commands
This commit is contained in:
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef INTEGRATED_H
|
||||||
|
#define INTEGRATED_H
|
||||||
|
|
||||||
|
void IntegratedCheck(char* command);
|
||||||
|
|
||||||
|
#endif
|
||||||
Executable
+14
@@ -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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user