mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
case 'K'
This commit is contained in:
parent
66ec1f6320
commit
ee9bf4feaa
1 changed files with 29 additions and 16 deletions
|
@ -567,22 +567,21 @@ U0 ANSIParse()
|
||||||
break;
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
// TODO: I have no idea if this actually works
|
// TODO: I have no idea if this actually works
|
||||||
SysLog("K code\n");
|
|
||||||
// Erase in Line
|
|
||||||
// CDocEntry *cur_entry = Fs->display_doc->cur_entry;
|
|
||||||
// CDocEntry *next_entry = cur_entry->next;
|
|
||||||
|
|
||||||
// // Delete the current entry
|
|
||||||
// if (!(cur_entry->de_flags & (DOCEF_HOLD | DOCEF_FILTER_SKIP))) {
|
|
||||||
// Fs->display_doc->cur_entry = next_entry;
|
|
||||||
// Fs->display_doc->cur_col = next_entry->min_col;
|
|
||||||
// DocEntryDel(Fs->display_doc, cur_entry);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Create a new entry (line) in its place
|
if (ansi_param_count == 0 || ansi_code[0] == 0) {
|
||||||
// CDocEntry *new_entry = DocEntryNewTag(Fs->display_doc, cur_entry, "");
|
// Erase from cursor to end of line
|
||||||
// DocInsEntry(Fs->display_doc, new_entry);
|
// I'm not calculating current_row properly yet so it wont work as expected.
|
||||||
|
SysLog("K code 0, cur: %d\n", term.doc->cur_entry->y);
|
||||||
|
DocDelToNum(term.doc, term.doc->cur_entry->y);
|
||||||
|
} else if (ansi_code[0] == 1) {
|
||||||
|
// Erase from cursor to beginning of line
|
||||||
|
SysLog("K code 1, cur: %d\n", term.doc->cur_entry->y);
|
||||||
|
DocDelToEntry(term.doc, term.doc->cur_entry, TRUE);
|
||||||
|
} else if (ansi_code[0] == 2) {
|
||||||
|
// Erase entire line
|
||||||
|
SysLog("K code 2, cur: %d\n", term.doc->cur_entry->y);
|
||||||
|
DocDelEntry(term.doc, term.doc->cur_entry);
|
||||||
|
}
|
||||||
ptr++;
|
ptr++;
|
||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
|
@ -940,6 +939,11 @@ init_connection:
|
||||||
LFBFlush;
|
LFBFlush;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case CH_CTRLU:
|
||||||
|
if(term.sock_ready) TCPSocketSendString(term.sock, "\x15");
|
||||||
|
break;
|
||||||
|
// case CH_CTRLP:
|
||||||
|
// DocFlagsToggle(doc, DOCF_PLAIN_TEXT);
|
||||||
case CH_CTRLL:
|
case CH_CTRLL:
|
||||||
PopUpOk("\n\n Not all BBS will work perfectly (yet). \n\n You can load ANSi artwork with Ctrl+O","\n\n\n\t\tMade by y4my4m\n\n");
|
PopUpOk("\n\n Not all BBS will work perfectly (yet). \n\n You can load ANSi artwork with Ctrl+O","\n\n\n\t\tMade by y4my4m\n\n");
|
||||||
break;
|
break;
|
||||||
|
@ -971,4 +975,13 @@ init_connection:
|
||||||
|
|
||||||
// dev server
|
// dev server
|
||||||
// Telnet("localhost", 8888);
|
// Telnet("localhost", 8888);
|
||||||
Telnet;
|
Telnet;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO:
|
||||||
|
- refactor ANSIParser's TCPSocketSends to send everything to a "TelnetSend" function
|
||||||
|
- TelnetSend will handle whether there's a connection or not
|
||||||
|
- This will make easier to transform this software into an ANSI viewer / Telnet client/ general purpose Term.
|
||||||
|
- There's a lot more to fix, but this is a good start.
|
||||||
|
*/
|
Loading…
Reference in a new issue