[w3m-dev 02414] stable SIGINT handling in HTMLlineproc0()
From: Tsutomu Okada <okada@furuno.co.jp>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: file.c,v 1.3 2001/11/15 00:32:13 a-ito Exp $ */
|
/* $Id: file.c,v 1.4 2001/11/16 03:32:18 ukai Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "myctype.h"
|
#include "myctype.h"
|
||||||
@@ -4823,15 +4823,6 @@ loadHTMLstream(URLFile * f, Buffer * newBuf, FILE * src, int internal)
|
|||||||
struct readbuffer obuf;
|
struct readbuffer obuf;
|
||||||
MySignalHandler(*prevtrap) ();
|
MySignalHandler(*prevtrap) ();
|
||||||
|
|
||||||
if (SETJMP(AbortLoading) != 0) {
|
|
||||||
HTMLlineproc1("<br>Transfer Interrupted!<br>", &htmlenv1);
|
|
||||||
goto phase2;
|
|
||||||
}
|
|
||||||
if (fmInitialized) {
|
|
||||||
prevtrap = signal(SIGINT, KeyAbort);
|
|
||||||
term_cbreak();
|
|
||||||
}
|
|
||||||
|
|
||||||
n_textarea = 0;
|
n_textarea = 0;
|
||||||
cur_textarea = NULL;
|
cur_textarea = NULL;
|
||||||
max_textarea = MAX_TEXTAREA;
|
max_textarea = MAX_TEXTAREA;
|
||||||
@@ -4869,6 +4860,15 @@ loadHTMLstream(URLFile * f, Buffer * newBuf, FILE * src, int internal)
|
|||||||
else
|
else
|
||||||
htmlenv1.buf = newTextLineList();
|
htmlenv1.buf = newTextLineList();
|
||||||
|
|
||||||
|
if (SETJMP(AbortLoading) != 0) {
|
||||||
|
HTMLlineproc1("<br>Transfer Interrupted!<br>", &htmlenv1);
|
||||||
|
goto phase2;
|
||||||
|
}
|
||||||
|
if (fmInitialized) {
|
||||||
|
prevtrap = signal(SIGINT, KeyAbort);
|
||||||
|
term_cbreak();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef JP_CHARSET
|
#ifdef JP_CHARSET
|
||||||
if (newBuf != NULL && newBuf->document_code != '\0')
|
if (newBuf != NULL && newBuf->document_code != '\0')
|
||||||
code = newBuf->document_code;
|
code = newBuf->document_code;
|
||||||
|
|||||||
Reference in New Issue
Block a user