--- lbbs/src/screen.c 2025/04/28 03:31:00 1.21 +++ lbbs/src/screen.c 2025/04/30 12:54:41 1.25 @@ -17,7 +17,11 @@ #include "bbs.h" #include "common.h" +#include "log.h" #include "io.h" +#include "screen.h" +#include +#include #include #include #include @@ -60,13 +64,18 @@ void clrline(int line_begin, int line_en void clrtobot(int line_begin) { - clrline(line_begin, screen_lines); + //clrline(line_begin, screen_lines); moveto(line_begin, 0); + prints("\033[J"); + + moveto(line_begin, 0); + + iflush(); } void clearscr() { - prints("\33[2J"); + prints("\033[2J"); moveto(0, 0); iflush(); } @@ -99,7 +108,7 @@ void set_input_echo(int echo) } } -int _str_input(char *buffer, int buffer_length, int echo_mode) +static int _str_input(char *buffer, int buffer_length, int echo_mode) { char buf[256], ch; int c, offset = 0, len, loop = 1, i, hz = 0; @@ -112,9 +121,13 @@ int _str_input(char *buffer, int buffer_ while (c = igetch_t(60)) { if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) + { break; + } if (c == LF) + { continue; + } if (c == BACKSPACE) { if (offset > 0)