1
1

* key.c: Remove support for BUGGY_CURSES.

Этот коммит содержится в:
Pavel Roskin 2001-09-03 03:12:22 +00:00
родитель f3a84ebc1a
Коммит ff7a2a0ceb
2 изменённых файлов: 2 добавлений и 24 удалений

Просмотреть файл

@ -1,5 +1,7 @@
2001-09-02 Pavel Roskin <proski@gnu.org> 2001-09-02 Pavel Roskin <proski@gnu.org>
* key.c: Remove support for BUGGY_CURSES.
* tty.h: Remove support for old curses and GNOME. * tty.h: Remove support for old curses and GNOME.
* global.h: Likewise. * global.h: Likewise.

Просмотреть файл

@ -481,19 +481,11 @@ int get_key_code (int no_delay)
nodelay_try_again: nodelay_try_again:
if (no_delay) { if (no_delay) {
#ifdef BUGGY_CURSES
wtimeout(stdscr, 500);
#else
nodelay (stdscr, TRUE); nodelay (stdscr, TRUE);
#endif
} }
c = xgetch (); c = xgetch ();
if (no_delay) { if (no_delay) {
#ifdef BUGGY_CURSES
notimeout (stdscr, TRUE);
#else
nodelay (stdscr, FALSE); nodelay (stdscr, FALSE);
#endif
if (c == ERR) { if (c == ERR) {
if (this != NULL && parent != NULL && if (this != NULL && parent != NULL &&
parent->action == MCKEY_ESCAPE && old_esc_mode) { parent->action == MCKEY_ESCAPE && old_esc_mode) {
@ -827,20 +819,12 @@ static int xgetch_second (void)
timeout.tv_sec = ESCMODE_TIMEOUT / 1000000; timeout.tv_sec = ESCMODE_TIMEOUT / 1000000;
timeout.tv_usec = ESCMODE_TIMEOUT % 1000000; timeout.tv_usec = ESCMODE_TIMEOUT % 1000000;
#ifdef BUGGY_CURSES
wtimeout(stdscr, 500);
#else
nodelay (stdscr, TRUE); nodelay (stdscr, TRUE);
#endif
FD_ZERO (&Read_FD_Set); FD_ZERO (&Read_FD_Set);
FD_SET (input_fd, &Read_FD_Set); FD_SET (input_fd, &Read_FD_Set);
select (FD_SETSIZE, &Read_FD_Set, NULL, NULL, &timeout); select (FD_SETSIZE, &Read_FD_Set, NULL, NULL, &timeout);
c = xgetch (); c = xgetch ();
#ifdef BUGGY_CURSES
notimeout (stdscr, TRUE);
#else
nodelay (stdscr, FALSE); nodelay (stdscr, FALSE);
#endif
return c; return c;
} }
@ -885,11 +869,7 @@ char *learn_key (void)
endtime.tv_usec -= 1000000; endtime.tv_usec -= 1000000;
endtime.tv_sec++; endtime.tv_sec++;
} }
#ifdef BUGGY_CURSES
wtimeout(stdscr, 500);
#else
nodelay (stdscr, TRUE); nodelay (stdscr, TRUE);
#endif
for (;;) { for (;;) {
while ((c = xgetch ()) == ERR) { while ((c = xgetch ()) == ERR) {
GET_TIME (timeout); GET_TIME (timeout);
@ -909,11 +889,7 @@ char *learn_key (void)
learn_store_key (buffer, &p, c); learn_store_key (buffer, &p, c);
} }
keypad(stdscr, TRUE); keypad(stdscr, TRUE);
#ifdef BUGGY_CURSES
notimeout (stdscr, TRUE);
#else
nodelay (stdscr, FALSE); nodelay (stdscr, FALSE);
#endif
*p = 0; *p = 0;
return g_strdup (buffer); return g_strdup (buffer);
} }