aboutsummaryrefslogtreecommitdiffstats
path: root/terms.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-12-11 15:07:53 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-12-11 15:07:53 +0000
commit69d9bff2319d5e1952a988c38a44b5ef5562a027 (patch)
tree6981af521abb09a2498298179756e5d51c58105f /terms.c
parent[w3m-dev 03558] long title is displayed over tab region (diff)
downloadw3m-69d9bff2319d5e1952a988c38a44b5ef5562a027.tar.gz
w3m-69d9bff2319d5e1952a988c38a44b5ef5562a027.zip
[w3m-dev 03559] Re: use select instead of signal for loading images
* fm.h (Buffer): add image_loaded * image.c (W3M_SIGIMG): deleted (image_lock): deleted (need_load_image): deleted (load_image_handler): deleted (load_image_next): deleted (getAllImage): check image_loaded (loadImage): delete image_lock delete IMG_FLAG_NEXT * main.c (main): check image_loaded * proto.h (sleep_till_anykey): return int * terms.c (sleep_till_anykey): return int From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to '')
-rw-r--r--terms.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/terms.c b/terms.c
index 10cd44a..90f3bd1 100644
--- a/terms.c
+++ b/terms.c
@@ -1,4 +1,4 @@
-/* $Id: terms.c,v 1.40 2002/12/04 16:38:54 ukai Exp $ */
+/* $Id: terms.c,v 1.41 2002/12/11 15:07:53 ukai Exp $ */
/*
* An original curses library for EUC-kanji by Akinori ITO, December 1989
* revised by Akinori ITO, January 1995
@@ -1962,12 +1962,12 @@ skip_escseq(void)
}
}
-void
+int
sleep_till_anykey(int sec, int purge)
{
fd_set rfd;
struct timeval tim;
- int er, c;
+ int er, c, ret;
TerminalMode ioval;
TerminalGet(tty, &ioval);
@@ -1979,7 +1979,8 @@ sleep_till_anykey(int sec, int purge)
FD_ZERO(&rfd);
FD_SET(tty, &rfd);
- if (select(tty + 1, &rfd, 0, 0, &tim) > 0 && purge) {
+ ret = select(tty + 1, &rfd, 0, 0, &tim);
+ if (ret > 0 && purge) {
c = getch();
if (c == ESC_CODE)
skip_escseq();
@@ -1989,6 +1990,7 @@ sleep_till_anykey(int sec, int purge)
printf("Error occured: errno=%d\n", errno);
reset_exit(SIGNAL_ARGLIST);
}
+ return ret;
}
#ifdef USE_MOUSE