--- lbbs/src/screen.c 2005/03/20 17:37:14 1.11 +++ lbbs/src/screen.c 2005/05/06 17:03:02 1.19 @@ -62,6 +62,13 @@ clrline (int line_begin, int line_end) } void +clrtobot (int line_begin) +{ + clrline (line_begin, screen_lines); + moveto (line_begin, 0); +} + +void clearscr () { prints ("\33[2J"); @@ -78,14 +85,12 @@ press_any_key () prints (" \033[1;33m°´ÈÎÒâ¼ü¼ÌÐø...\033[0;37m"); iflush (); - return igetch (); + return igetch_t (60); } void set_input_echo (int echo) { - char temp[256]; - if (echo) { outc ('\x83'); // ASCII code 131 @@ -96,22 +101,25 @@ set_input_echo (int echo) // outc ('\x85'); // ASCII code 133 prints ("\xff\xfb\x01\xff\xfb\x03"); iflush (); - igetch (); - igetch (); + igetch_t (60); + igetch_t (60); } } int -str_input (char *buffer, int buffer_length, int echo_mode) +_str_input (char *buffer, int buffer_length, int echo_mode) { char buf[256], ch; int c, offset = 0, len, loop = 1, i, hz = 0; - memset (buffer, '\0', buffer_length); + for (i=0; i