mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
cursor movement
This commit is contained in:
parent
f212ff574a
commit
c8279797c3
1 changed files with 19 additions and 20 deletions
|
@ -122,15 +122,14 @@ U0 HandleControlCodes(U8 ch) {
|
||||||
}
|
}
|
||||||
|
|
||||||
U0 HandleMCICode(U8 *ptr, I64 *index) {
|
U0 HandleMCICode(U8 *ptr, I64 *index) {
|
||||||
// U8 code[4];
|
U8 code[4];
|
||||||
// MemCopy(code, ptr + *index, 3);
|
MemCopy(code, ptr + *index, 3);
|
||||||
// *index += 3;
|
*index += 3;
|
||||||
|
|
||||||
// if (StrCompare(code, "ET1") == 0) {
|
if (StrCompare(code, "ET1") == 0) {
|
||||||
// // Handle ET1 MCI code here
|
// Handle ET1 MCI code here
|
||||||
// }
|
}
|
||||||
// SysLog("MCI code: %s\n", code);
|
SysLog("MCI code: %s\n", code);
|
||||||
SysLog("MCI Code not implemented\n");
|
|
||||||
// Add support for other MCI codes if needed
|
// Add support for other MCI codes if needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,8 +265,10 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
||||||
ptr++;
|
ptr++;
|
||||||
break;
|
break;
|
||||||
} else if (*ptr == 'C') {
|
} else if (*ptr == 'C') {
|
||||||
// Custom 'C' escape code for centering text
|
I64 i;
|
||||||
// TODO: Handle the centering here
|
for (i = 0; i < ansi_code; i++) {
|
||||||
|
Print(" ");
|
||||||
|
}
|
||||||
ptr++;
|
ptr++;
|
||||||
break;
|
break;
|
||||||
} else if (*ptr == '?') {
|
} else if (*ptr == '?') {
|
||||||
|
@ -282,16 +283,14 @@ U0 Telnet(U8 *host, U16 port=TELNET_PORT) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*ptr == ';') {
|
|
||||||
SysLog("; event\n");
|
|
||||||
ptr++;
|
|
||||||
}
|
}
|
||||||
} else if (*ptr == '%' || *ptr == '|') {
|
else if (*ptr == '%' || *ptr == '|') {
|
||||||
// MCI code detected
|
// MCI code detected
|
||||||
ptr++;
|
|
||||||
HandleMCICode(ptr, &ptr);
|
HandleMCICode(ptr, &ptr);
|
||||||
ptr++;
|
ptr++;
|
||||||
} else {
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
// Print the received character
|
// Print the received character
|
||||||
HandleControlCodes(*ptr);
|
HandleControlCodes(*ptr);
|
||||||
ptr++;
|
ptr++;
|
||||||
|
@ -400,7 +399,7 @@ U0 TelnetPrompt() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dev auto-connect to test server
|
// Dev auto-connect to test server
|
||||||
Telnet("mbrserver.com");
|
// Telnet("mbrserver.com");
|
||||||
// Telnet("freechess.org");
|
// Telnet("freechess.org");
|
||||||
// Telnet("dura-bbs.net", 6359);
|
// Telnet("dura-bbs.net", 6359);
|
||||||
// Telnet("darkrealms.ca");
|
// Telnet("darkrealms.ca");
|
||||||
|
@ -409,4 +408,4 @@ Telnet("mbrserver.com");
|
||||||
// Telnet("20forbeers.com", 1337);
|
// Telnet("20forbeers.com", 1337);
|
||||||
|
|
||||||
// ZealBBS dev server
|
// ZealBBS dev server
|
||||||
// Telnet("localhost", 8888);
|
Telnet("localhost", 8888);
|
Loading…
Reference in a new issue