diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-29 17:10:17 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2003-01-29 17:10:17 +0000 |
commit | b0a661730f022b85ef0dfd6244a7cef05357856d (patch) | |
tree | 1455f40baac66a86894f2f8eb969c93c62e2ff1e /url.c | |
parent | [w3m-dev 03707] Don't stop loading image when moving to next page. (diff) | |
download | w3m-b0a661730f022b85ef0dfd6244a7cef05357856d.tar.gz w3m-b0a661730f022b85ef0dfd6244a7cef05357856d.zip |
[w3m-dev 03708] Re: Don't stop loading image when moving to next page.
* config.h.dist (lstat): define ifndef HAVE_LSTAT
* configure (config.h) ditto
* display.c (fmTerm): new loadImage
(save_current_buf): only ifdef USE_BUFINFO
(displayBuffer): new loadImage
* etc.c (setup_child): TrapSignal
* file.c (loadGeneralFile): TRAP_OFF, TRAP_ON
(loadHTMLstream): ditto
(loadGopherDir): ditto
(loadBuffer): ditto
(loadImageBuffer): ditto
(getNextPage): ditto
(save2tmp): ditto
* fm.h (TrapSignal): added
(TRAP_ON): added
(TRAP_OFF): added
* form.c (HAVE_LSTAT): deleted
* frame.c (createFrameFile): TRAP_OFF, TRAP_ON
* image.c (image_buffer): added
(deleteImage): new loadImage
(getAllImage): initialize image_buffer
(loadImage): rewrite
* main.c (main): new loadImage
(checkDownloadList): remove ifdef HAVE_LSTAT
* news.c (loadNwesgroup): TRAP_ON, TRAP_OFF
* proto.h (loadImage): add buf arg
* url.c (openSocket): TRAP_ON, TRAP_OFF
(check_no_proxy): TRAP_ON, TRAP_OFF
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'url.c')
-rw-r--r-- | url.c | 27 |
1 files changed, 8 insertions, 19 deletions
@@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.69 2003/01/17 17:06:06 ukai Exp $ */ +/* $Id: url.c,v 1.70 2003/01/29 17:10:53 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include <sys/socket.h> @@ -457,7 +457,7 @@ openSocket(char *const hostname, int a1, a2, a3, a4; unsigned long adr; #endif /* not INET6 */ - MySignalHandler(*volatile trap) (SIGNAL_ARG) = NULL; + MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; if (fmInitialized) { message(Sprintf("Opening socket...")->ptr, 0, 0); @@ -471,9 +471,7 @@ openSocket(char *const hostname, close(sock); goto error; } - trap = signal(SIGINT, KeyAbort); - if (fmInitialized) - term_cbreak(); + TRAP_ON; if (hostname == NULL) { #ifdef SOCK_DEBUG sock_log("openSocket() failed. reason: Bad hostname \"%s\"\n", @@ -618,15 +616,10 @@ openSocket(char *const hostname, } #endif /* not INET6 */ - if (fmInitialized) - term_raw(); - signal(SIGINT, trap); + TRAP_OFF; return sock; error: - if (fmInitialized) - term_raw(); - signal(SIGINT, trap); - + TRAP_OFF; return -1; } @@ -1955,7 +1948,7 @@ check_no_proxy(char *domain) { TextListItem *tl; volatile int ret = 0; - MySignalHandler(*volatile trap) (SIGNAL_ARG) = NULL; + MySignalHandler(*volatile prevtrap) (SIGNAL_ARG) = NULL; if (NO_proxy_domains == NULL || NO_proxy_domains->nitem == 0 || domain == NULL) @@ -1974,9 +1967,7 @@ check_no_proxy(char *domain) ret = 0; goto end; } - trap = signal(SIGINT, KeyAbort); - if (fmInitialized) - term_cbreak(); + TRAP_ON; { #ifndef INET6 struct hostent *he; @@ -2053,9 +2044,7 @@ check_no_proxy(char *domain) #endif /* INET6 */ } end: - if (fmInitialized) - term_raw(); - signal(SIGINT, trap); + TRAP_OFF; return ret; } |