mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Hf case
This commit is contained in:
parent
55ab8473fa
commit
c820e5b726
1 changed files with 15 additions and 12 deletions
|
@ -271,7 +271,7 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
||||||
}
|
}
|
||||||
else if (ansi_code[m] >= 30 && ansi_code[m] <= 37) {
|
else if (ansi_code[m] >= 30 && ansi_code[m] <= 37) {
|
||||||
// Set foreground color
|
// Set foreground color
|
||||||
SysLog("ansi_code[%d] = %d\n", m, ansi_code[m]);
|
// SysLog("ansi_code[%d] = %d\n", m, ansi_code[m]);
|
||||||
switch (ansi_code[m]) {
|
switch (ansi_code[m]) {
|
||||||
case 30: "$$BLACK$$"; break;
|
case 30: "$$BLACK$$"; break;
|
||||||
case 31: "$$RED$$"; break;
|
case 31: "$$RED$$"; break;
|
||||||
|
@ -289,7 +289,7 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
||||||
// until we properly catch the `;` it will stay fucked
|
// until we properly catch the `;` it will stay fucked
|
||||||
else if (ansi_code[m] >= 40 && ansi_code[m] <= 47) {
|
else if (ansi_code[m] >= 40 && ansi_code[m] <= 47) {
|
||||||
// Set background color
|
// Set background color
|
||||||
SysLog("ansi_code[%d] = %d\n", m, ansi_code[m]);
|
// SysLog("ansi_code[%d] = %d\n", m, ansi_code[m]);
|
||||||
switch (ansi_code[m]) {
|
switch (ansi_code[m]) {
|
||||||
case 40: "$$BG,BLACK$$"; break;
|
case 40: "$$BG,BLACK$$"; break;
|
||||||
case 41: "$$BG,RED$$"; break;
|
case 41: "$$BG,RED$$"; break;
|
||||||
|
@ -329,7 +329,7 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
// Cursor Left
|
// Cursor Left
|
||||||
SysLog("Cursor Left\n");
|
// SysLog("Cursor Left\n");
|
||||||
// "$$CM+TY,-%d,0$$", ansi_code[0];
|
// "$$CM+TY,-%d,0$$", ansi_code[0];
|
||||||
"$$CM,-%d,0$$", ansi_code[0];
|
"$$CM,-%d,0$$", ansi_code[0];
|
||||||
ptr++;
|
ptr++;
|
||||||
|
@ -358,21 +358,24 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
||||||
case 'H':
|
case 'H':
|
||||||
case 'f':
|
case 'f':
|
||||||
I64 row = 1, col = 1; // default values
|
I64 row = 1, col = 1; // default values
|
||||||
|
|
||||||
// Parse the row number
|
// Parse the row number
|
||||||
// if(ansi_code[0] != 0)
|
if(ansi_code[0] != 1)
|
||||||
// row = ansi_code[0];
|
row = ansi_code[0];
|
||||||
// if(ansi_code[1] != 0)
|
if(ansi_code[1] != 1)
|
||||||
// col = ansi_code[1];
|
col = ansi_code[1];
|
||||||
|
|
||||||
// SysLog("H or f row:%d, col:%d\n", row, col);
|
// Not sure if really should do -1...
|
||||||
// "$$CM,%d,%d$$", row, col;
|
if (row > window_height)
|
||||||
|
row = window_heigh-1;
|
||||||
|
if (col > window_width)
|
||||||
|
col = window_width-1;
|
||||||
|
|
||||||
// "$$CM,LE=%d,RE=%d$$", col, row;
|
// SysLog("H or f AFTER row:%d, col:%d, cnt:%d\n", row, col, ansi_param_count);
|
||||||
|
"$$CM,%d,%d$$", row, col;
|
||||||
ptr++;
|
ptr++;
|
||||||
break;
|
break;
|
||||||
case 'J':
|
case 'J':
|
||||||
SysLog("J code\n");
|
// SysLog("J code\n");
|
||||||
// Erase in Display
|
// Erase in Display
|
||||||
if (ansi_code[0] == 0) {
|
if (ansi_code[0] == 0) {
|
||||||
// Erase from cursor to end of display
|
// Erase from cursor to end of display
|
||||||
|
|
Loading…
Reference in a new issue