quickly impl ^C
This commit is contained in:
parent
039d581c45
commit
a95a483710
1 changed files with 8 additions and 0 deletions
|
|
@ -18,6 +18,13 @@ MSH_ENTRY_POINT {
|
|||
msh_print_strings(msh_working_directory(), " %> ", 0);
|
||||
|
||||
while ((out = msh_read_input(buf, &sz, 2048)), out > 0) {
|
||||
switch (out) {
|
||||
/* Ctrl-C */
|
||||
case 0x3:
|
||||
msh_print_string("^C\n\r");
|
||||
goto end_loop;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (*buf != '\0') {
|
||||
|
|
@ -27,6 +34,7 @@ MSH_ENTRY_POINT {
|
|||
|
||||
// msh_execute(buf, args);
|
||||
|
||||
end_loop:
|
||||
msh_deallocate(buf);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue