--- lbbs/src/screen.c 2005/03/20 17:37:14 1.11 +++ lbbs/src/screen.c 2005/03/22 08:19:11 1.13 @@ -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,10 +107,10 @@ str_input (char *buffer, int buffer_leng memset (buffer, '\0', buffer_length); - while (c = igetch ()) + while (c = igetch_t (60)) { - if (c == CR) - break; + if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) + break; if (c == LF) continue; if (c == BACKSPACE) @@ -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) { @@ -279,7 +277,7 @@ display_file_ex (const char *filename, i } break; case KEY_RIGHT: - case KEY_PGDOWN: + case KEY_PGDN: case Ctrl ('F'): case KEY_SPACE: c_line_begin += (screen_lines - begin_line - 1); @@ -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':