aboutsummaryrefslogtreecommitdiffstats
path: root/main.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 /main.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--main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/main.c b/main.c
index 32078d6..da48229 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.166 2002/12/10 15:53:03 ukai Exp $ */
+/* $Id: main.c,v 1.167 2002/12/11 15:07:53 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -1039,14 +1039,14 @@ main(int argc, char **argv, char **envp)
signal(SIGWINCH, resize_handler);
#endif
#ifdef USE_IMAGE
- if (activeImage && displayImage)
- loadImage(IMG_FLAG_NEXT);
+ if (activeImage && displayImage && Currentbuf->img &&
+ !Currentbuf->image_loaded) {
+ do {
+ loadImage(IMG_FLAG_NEXT);
+ } while (sleep_till_anykey(1, 0) <= 0);
+ }
#endif
c = getch();
-#ifdef USE_IMAGE
- if (activeImage && displayImage)
- loadImage(IMG_FLAG_START);
-#endif
#ifdef SIGWINCH
signal(SIGWINCH, resize_hook);
#endif