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