--- lbbs/src/screen.c 2025/04/28 03:31:00 1.21 +++ lbbs/src/screen.c 2025/04/30 09:18:20 1.24 @@ -17,7 +17,11 @@ #include "bbs.h" #include "common.h" +#include "log.h" #include "io.h" +#include "screen.h" +#include +#include #include #include #include @@ -66,7 +70,7 @@ void clrtobot(int line_begin) void clearscr() { - prints("\33[2J"); + prints("\033[2J"); moveto(0, 0); iflush(); } @@ -99,7 +103,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 +116,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)