mirror of
https://github.com/Leonmmcoset/cleonos.git
synced 2026-04-21 18:44:01 +00:00
动态链接库+修复神秘光标问题
This commit is contained in:
@@ -1215,11 +1215,11 @@ void clks_tty_write_char(char ch) {
|
||||
clks_tty_reset_blink_timer();
|
||||
}
|
||||
|
||||
void clks_tty_write(const char *text) {
|
||||
void clks_tty_write_n(const char *text, usize len) {
|
||||
usize i = 0U;
|
||||
u32 tty_index;
|
||||
|
||||
if (clks_tty_is_ready == CLKS_FALSE || text == CLKS_NULL) {
|
||||
if (clks_tty_is_ready == CLKS_FALSE || text == CLKS_NULL || len == 0U) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1231,7 +1231,7 @@ void clks_tty_write(const char *text) {
|
||||
clks_tty_redraw_active();
|
||||
}
|
||||
|
||||
while (text[i] != '\0') {
|
||||
while (i < len) {
|
||||
if (clks_tty_ansi_process_byte(tty_index, text[i]) == CLKS_FALSE) {
|
||||
clks_tty_put_char_raw(tty_index, text[i]);
|
||||
}
|
||||
@@ -1244,6 +1244,14 @@ void clks_tty_write(const char *text) {
|
||||
clks_tty_reset_blink_timer();
|
||||
}
|
||||
|
||||
void clks_tty_write(const char *text) {
|
||||
if (text == CLKS_NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
clks_tty_write_n(text, clks_strlen(text));
|
||||
}
|
||||
|
||||
void clks_tty_switch(u32 tty_index) {
|
||||
if (clks_tty_is_ready == CLKS_FALSE) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user