From 321d008781422b7d7137e9acc1ba0e84dec79ff1 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 22 Jul 2010 21:12:12 +0800 Subject: [PATCH] Misc changes, working on the VTerm's VT100 support and CLIShell's input --- Kernel/drv/vterm.c | 6 ++++++ Kernel/include/acess.h | 1 - Usermode/Applications/CLIShell_src/main.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index 5545da77..d8689232 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -800,6 +800,7 @@ int VT_int_ParseEscape(tVTerm *Term, char *Buffer) if( '0' <= c && c <= '9' ) { do { + if(c == ';') c = Buffer[j++]; while('0' <= c && c <= '9') { args[argc] *= 10; args[argc] += c-'0'; @@ -863,6 +864,11 @@ int VT_int_ParseEscape(tVTerm *Term, char *Buffer) break; } break; + // Set cursor position + case 'h': + Term->WritePos = args[0] + args[1]*Term->Width; + Log_Debug("VTerm", "args = {%i, %i}", args[0], args[1]); + break; // Set Font flags case 'm': for( ; argc--; ) diff --git a/Kernel/include/acess.h b/Kernel/include/acess.h index f355a78d..993aa1f6 100644 --- a/Kernel/include/acess.h +++ b/Kernel/include/acess.h @@ -9,7 +9,6 @@ #define PACKED __attribute__ ((packed)) #define offsetof(st, m) ((Uint)((char *)&((st *)(0))->m - (char *)0 )) - //#include #include #include diff --git a/Usermode/Applications/CLIShell_src/main.c b/Usermode/Applications/CLIShell_src/main.c index 579df881..50c95891 100644 --- a/Usermode/Applications/CLIShell_src/main.c +++ b/Usermode/Applications/CLIShell_src/main.c @@ -1,7 +1,7 @@ /* * AcessOS Shell Version 3 */ -#define USE_READLINE 0 +#define USE_READLINE 1 #include #include #include -- 2.20.1