From a95a4837106266495f2585cc06f35b84a70e4930 Mon Sep 17 00:00:00 2001 From: IoIxD Date: Tue, 20 Jan 2026 17:26:16 -0700 Subject: [PATCH] quickly impl ^C --- src/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.c b/src/main.c index 62c7bb7..9e3351f 100644 --- a/src/main.c +++ b/src/main.c @@ -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); }