--- lbbs/src/screen.c 2005/03/21 17:08:21 1.12 +++ lbbs/src/screen.c 2005/03/22 13:36:13 1.14 @@ -78,14 +78,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,8 +94,8 @@ 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); } } @@ -109,9 +107,9 @@ str_input (char *buffer, int buffer_leng memset (buffer, '\0', buffer_length); - while (c = igetch ()) + while (c = igetch_t (60)) { - if (c == CR) + if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) break; if (c == LF) continue; @@ -233,7 +231,7 @@ display_file_ex (const char *filename, i input_ok = 0; while (!input_ok) { - ch = igetch (); + ch = igetch_t (MAX_DELAY_TIME); input_ok = 1; switch (ch) { @@ -294,6 +292,8 @@ display_file_ex (const char *filename, i goto exit; } break; + case KEY_NULL: + case KEY_TIMEOUT: case KEY_LEFT: case 'q': case 'Q':