diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | file.c | 12 | ||||
-rw-r--r-- | fm.h | 13 | ||||
-rw-r--r-- | main.c | 12 | ||||
-rw-r--r-- | rc.c | 3 |
5 files changed, 42 insertions, 10 deletions
@@ -1,5 +1,17 @@ 2001-11-16 Tsutomu Okada <okada@furuno.co.jp> + * file.c (HTMLtagproc1): [w3m-dev 02408] meta refresh + use MetaRefresh + add case refresh > 0 + * fm.h: + add MetaRefresh + move alarm related definition from main.c + * main.c: + move alarm releated definition to fm.h + (SigAlarm): alarm_once + * rc.c: + add CMT_META_REFRESH + * file.c (loadHTMLBuffer): [w3m-dev 02415] clean up temporary files @@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.5 2001/11/16 03:33:28 ukai Exp $ */ +/* $Id: file.c,v 1.6 2001/11/16 03:58:49 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -3589,10 +3589,18 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env) refresh, cur_hseq++, q, q); push_str(obuf, s_tmp->length, tmp, PC_ASCII); flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit); - if (!is_redisplay && refresh == 0) { + if (!is_redisplay && refresh == 0 && MetaRefresh) { pushEvent(FUNCNAME_goURL, s_tmp->ptr); /* pushEvent(deletePrevBuf,NULL); */ } +#ifdef USE_ALARM + else if (!is_redisplay && refresh > 0 && MetaRefresh) { + alarm_sec = refresh; + alarm_once = TRUE; + alarm_event.cmd = FUNCNAME_goURL; + alarm_event.user_data = s_tmp->ptr; + } +#endif } } return 1; @@ -1,4 +1,4 @@ -/* $Id: fm.h,v 1.3 2001/11/15 00:32:13 a-ito Exp $ */ +/* $Id: fm.h,v 1.4 2001/11/16 03:58:49 ukai Exp $ */ /* * w3m: WWW wo Miru utility * @@ -621,6 +621,7 @@ global char TargetSelf init(FALSE); global char PermitSaveToPipe init(FALSE); global char DecodeCTE init(FALSE); global char ArgvIsURL init(FALSE); +global char MetaRefresh init(FALSE); global char fmInitialized init(FALSE); @@ -847,6 +848,16 @@ int backend( void ); extern void deleteFiles(void); void w3m_exit( int i ); +typedef struct { + int cmd; + void *user_data; +} Event; +#ifdef USE_ALARM +global int alarm_sec init(0); +global short alarm_once init(0); +global Event alarm_event; +#endif + /* * Externals */ @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.4 2001/11/16 03:30:15 ukai Exp $ */ +/* $Id: main.c,v 1.5 2001/11/16 03:58:49 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -32,16 +32,10 @@ Hist *ShellHist; Hist *TextHist; #define N_EVENT_QUEUE 10 -typedef struct { - int cmd; - void *user_data; -} Event; static Event eventQueue[N_EVENT_QUEUE]; static int n_event_queue; #ifdef USE_ALARM -static int alarm_sec = 0; -static Event alarm_event; static MySignalHandler SigAlarm(SIGNAL_ARG); #endif @@ -4618,6 +4612,9 @@ SigAlarm(SIGNAL_ARG) CurrentMenuData = NULL; #endif w3mFuncList[alarm_event.cmd].func(); + onA(); + if (alarm_once) + alarm_sec = 0; signal(SIGALRM, SigAlarm); alarm(alarm_sec); } @@ -4647,6 +4644,7 @@ setAlarm(void) } if (cmd >= 0) { alarm_sec = sec; + alarm_once = FALSE; alarm_event.cmd = cmd; alarm_event.user_data = getQWord(&data); signal(SIGALRM, SigAlarm); @@ -143,6 +143,7 @@ static int rc_initialized = 0; #endif #define CMT_FOLLOW_REDIRECTION "従うリダイレクトの回数" +#define CMT_META_REFRESH "meta refresh に対応する" #else /* LANG != JA */ @@ -236,6 +237,7 @@ static int rc_initialized = 0; #define CMT_COOKIE_ACCEPT_DOMAINS "Domains from which should accept cookies" #endif #define CMT_FOLLOW_REDIRECTION "Follow this number of redirections" +#define CMT_META_REFRESH "Support meta refresh" #endif /* LANG != JA */ #define PI_TEXT 0 @@ -460,6 +462,7 @@ struct param_ptr params9[] = {"argv_is_url", P_CHARINT, PI_ONOFF, (void *) &ArgvIsURL, CMT_ARGV_IS_URL, NULL}, {"retry_http", P_INT, PI_ONOFF, (void *) &retryAsHttp, CMT_RETRY_HTTP, NULL}, {"follow_redirection", P_INT, PI_TEXT, &FollowRedirection, CMT_FOLLOW_REDIRECTION, NULL}, + {"meta_refresh", P_CHARINT, PI_ONOFF, (void *) &MetaRefresh, CMT_META_REFRESH, NULL}, #ifdef USE_SSL {"ssl_forbid_method", P_STRING, PI_TEXT, (void *) &ssl_forbid_method, CMT_SSL_FORBID_METHOD, NULL}, #endif /* USE_SSL */ |