-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.c
More file actions
executable file
·48 lines (42 loc) · 824 Bytes
/
Main.c
File metadata and controls
executable file
·48 lines (42 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include"file.h"
int main (void)
{
char inputString[LineLength];
while (1)
{
PrintDir();
if (TakeInput(inputString)){
continue;
}
if(strcmp(inputString,"quit")!=0)
{
if(strcmp(inputString,"history")!=0)
{
if (IsItFile(inputString)==1)
{
FILE *fp=fopen(inputString,"r");
if (fp == NULL)
{
printf("File Not Found ");
}
else
{
DealWithFiles(fp);
}
}
else
{
Executing(inputString);
}
}
else
{
ShowHistory();
}
}
else
{
break;
}
}
}