forked from sruthi2498/MyShell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
40 lines (32 loc) · 737 Bytes
/
main.c
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
#include "all_include.h"
int main(){
StackInit();
InitCommand();
printf("Initialized from main.c\n\n");
Prompt=malloc(sizeof(char)*PROMPT_SIZE);
strcpy(Prompt,"hash:~");
prompt();
// int a=0;
// while(a!=-1){
// a=pressed_arrow();
// if(HistoryPointer==0){
// printf("no command");
// }
// else{
// if(a==1){
// //up
// HistoryPointer--;
// //printf("HistoryPointer %d stackelem %s",HistoryPointer,stack[HistoryPointer].command);
// }
// else if(a==2){
// //down
// HistoryPointer++;
// //printf("HistoryPointer %d stackelem %s",HistoryPointer,stack[HistoryPointer].command);
// }
// }
// yyparse();
// }
if(!yyparse()){
//printf("\nParsed Successfully\n");
}
}