Commit 1da9edea1cf435cd6f4093a19118fc608dbd23cb
1 parent
196c33d4
no message
Showing
1 changed file
with
12 additions
and
2 deletions
Show diff stats
anubis_dev/shell/src/main.cpp
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | void Welcome(void); |
| 13 | 13 | void ExecuteAnb(char * args); |
| 14 | 14 | void ExecuteProcess(char * process, char ** args); |
| 15 | - | |
| 15 | +void ShowPrompt(void); | |
| 16 | 16 | |
| 17 | 17 | int main(int argc, char ** argv) |
| 18 | 18 | { |
| ... | ... | @@ -24,6 +24,7 @@ int ch; |
| 24 | 24 | Welcome(); |
| 25 | 25 | while (quit == false) |
| 26 | 26 | { |
| 27 | + ShowPrompt(); | |
| 27 | 28 | do |
| 28 | 29 | { |
| 29 | 30 | ch = getc(stdin); |
| ... | ... | @@ -58,7 +59,7 @@ char searchPath1[1024]; |
| 58 | 59 | char seps[] = " \t\n"; |
| 59 | 60 | char *token; |
| 60 | 61 | char *argv[40]; |
| 61 | -int argc = 0; | |
| 62 | +int argc = 1; | |
| 62 | 63 | |
| 63 | 64 | modulesPath = getenv("MY_ANUBIS"); |
| 64 | 65 | |
| ... | ... | @@ -97,11 +98,20 @@ void ExecuteProcess(char * process, char ** args) |
| 97 | 98 | { |
| 98 | 99 | char *VMPath; |
| 99 | 100 | char VM[2048]; |
| 101 | +char VM1[2048]; | |
| 100 | 102 | |
| 101 | 103 | VMPath = getenv("ANUBIS"); |
| 102 | 104 | |
| 103 | 105 | #ifdef WIN32 |
| 104 | 106 | sprintf(VM,"%s/anbexec.exe", VMPath); |
| 107 | + sprintf(VM1,"\"%s\"", VM); | |
| 108 | + args[0] = VM1; | |
| 105 | 109 | _spawnv(_P_WAIT, VM, args); |
| 106 | 110 | #endif |
| 107 | 111 | } |
| 112 | + | |
| 113 | + | |
| 114 | +void ShowPrompt(void) | |
| 115 | +{ | |
| 116 | + printf(">"); | |
| 117 | +} | |
| 108 | 118 | \ No newline at end of file | ... | ... |