[w3m-dev 02622]

From: Tsutomu Okada <okada@furuno.co.jp>
This commit is contained in:
Fumitoshi UKAI
2001-12-06 15:31:58 +00:00
parent ae3b8a0b9b
commit b7690e82bc
7 changed files with 54 additions and 18 deletions
+19
View File
@@ -1,3 +1,22 @@
2001-12-07 Tsutomu Okada <okada@furuno.co.jp>
* [w3m-dev 02622]
* tagtable.tab (noframes): added
* tagtable.tab (/noframes): added
* fm.h (RB_NOFRAMES): added
* html.h (HTML_NOFRAMES): added
* html.h (HTML_N_NOFRAMES): added
* html.c (ALST_NOFRAMES): added
* html.c (98 HTML_NOFRAMES): added
* html.c (99 HTML_N_NOFRAMES): added
* file.c (HTMLtagproc1): add HTML_NOFRAMES, HTML_N_NOFRAMES
* file.c (HTMLtagproc1): don't meta refresh if it is in noframes and
auto frame rendering
* main.c (MAIN): use setAlarmEvent()
* main.c (SigAlarm): ditto
* main.c (setAlarm): ditto
* main.c (setAlarmEvent): check if status == AL_UNSET
2001-12-06 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02619]
+18 -4
View File
@@ -1,4 +1,4 @@
/* $Id: file.c,v 1.26 2001/12/05 17:29:26 ukai Exp $ */
/* $Id: file.c,v 1.27 2001/12/06 15:31:58 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -3380,6 +3380,17 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
}
return 0;
case HTML_NOFRAMES:
CLOSE_P;
flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
obuf->flag |= (RB_NOFRAMES | RB_IGNORE_P);
/* istr = str; */
return 1;
case HTML_N_NOFRAMES:
CLOSE_P;
flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
obuf->flag &= ~RB_NOFRAMES;
return 1;
case HTML_FRAME:
q = r = NULL;
parsedtag_get_value(tag, ATTR_SRC, &q);
@@ -3711,19 +3722,22 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
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_interval == 0 && MetaRefresh) {
if (!is_redisplay && refresh_interval == 0 && MetaRefresh &&
!((obuf->flag & RB_NOFRAMES) && RenderFrame)) {
pushEvent(FUNCNAME_goURL, s_tmp->ptr);
/* pushEvent(deletePrevBuf,NULL); */
}
#ifdef USE_ALARM
else if (!is_redisplay && refresh_interval > 0 && MetaRefresh) {
else if (!is_redisplay && refresh_interval > 0 && MetaRefresh &&
!((obuf->flag & RB_NOFRAMES) && RenderFrame)) {
setAlarmEvent(refresh_interval, AL_IMPLICIT,
FUNCNAME_goURL, s_tmp->ptr);
}
#endif
}
#ifdef USE_ALARM
else if (!is_redisplay && refresh_interval > 0 && MetaRefresh) {
else if (!is_redisplay && refresh_interval > 0 && MetaRefresh &&
!((obuf->flag & RB_NOFRAMES) && RenderFrame)) {
tmp = Sprintf("Refresh (%d sec)", refresh_interval);
push_str(obuf, 0, tmp, PC_ASCII);
flushline(h_env, obuf, envs[h_env->envc].indent, 0,
+2 -1
View File
@@ -1,4 +1,4 @@
/* $Id: fm.h,v 1.25 2001/11/30 10:49:06 ukai Exp $ */
/* $Id: fm.h,v 1.26 2001/12/06 15:31:58 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -453,6 +453,7 @@ struct readbuffer {
#define RB_IGNORE_P 0x4000
#define RB_TITLE 0x8000
#define RB_NFLUSHED 0x10000
#define RB_NOFRAMES 0x20000
#ifdef FORMAT_NICE
#define RB_FILL 0x200000
+5 -3
View File
@@ -1,4 +1,4 @@
/* $Id: html.c,v 1.6 2001/11/27 18:23:33 ukai Exp $ */
/* $Id: html.c,v 1.7 2001/12/06 15:31:58 ukai Exp $ */
#include "html.h"
/* Define HTML Tag Infomation Table */
@@ -36,6 +36,8 @@ unsigned char ALST_FRAME[] = { ATTR_SRC, ATTR_NAME, ATTR_CORE };
#define MAXA_FRAME MAXA_CORE + 2
unsigned char ALST_FRAMESET[] = { ATTR_COLS, ATTR_ROWS, ATTR_CORE };
#define MAXA_FRAMESET MAXA_CORE + 2
unsigned char ALST_NOFRAMES[] = { ATTR_CORE };
#define MAXA_NOFRAMES MAXA_CORE
unsigned char ALST_FORM[] =
{ ATTR_METHOD, ATTR_ACTION, ATTR_CHARSET, ATTR_ACCEPT_CHARSET,
ATTR_ENCTYPE, ATTR_TARGET, ATTR_NAME, ATTR_CORE
@@ -196,9 +198,9 @@ TagInfo TagMAP[MAX_HTMLTAG] = {
{"head", NULL, 0, 0}, /* 95 HTML_HEAD */
{"/head", NULL, 0, TFLG_END}, /* 96 HTML_N_HEAD */
{"doctype", NULL, 0, 0}, /* 97 HTML_DOCTYPE */
{"noframes", ALST_NOFRAMES, MAXA_NOFRAMES, 0}, /* 98 HTML_NOFRAMES */
{"/noframes", NULL, 0, TFLG_END}, /* 99 HTML_N_NOFRAMES */
{NULL, NULL, 0, 0}, /* 98 Undefined */
{NULL, NULL, 0, 0}, /* 99 Undefined */
{NULL, NULL, 0, 0}, /* 100 Undefined */
{NULL, NULL, 0, 0}, /* 101 Undefined */
{NULL, NULL, 0, 0}, /* 102 Undefined */
+3 -1
View File
@@ -1,4 +1,4 @@
/* $Id: html.h,v 1.4 2001/11/24 02:01:26 ukai Exp $ */
/* $Id: html.h,v 1.5 2001/12/06 15:31:58 ukai Exp $ */
#ifndef _HTML_H
#define _HTML_H
#ifdef USE_SSL
@@ -180,6 +180,8 @@ typedef struct {
#define HTML_HEAD 95
#define HTML_N_HEAD 96
#define HTML_DOCTYPE 97
#define HTML_NOFRAMES 98
#define HTML_N_NOFRAMES 99
/* pseudo tag */
+5 -9
View File
@@ -1,4 +1,4 @@
/* $Id: main.c,v 1.32 2001/12/04 16:24:09 ukai Exp $ */
/* $Id: main.c,v 1.33 2001/12/06 15:31:58 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -858,8 +858,7 @@ MAIN(int argc, char **argv, char **envp)
}
else if (alarm_status == AL_IMPLICIT_DONE
&& alarm_buffer != Currentbuf) {
alarm_sec = 0;
alarm_status = AL_UNSET;
setAlarmEvent(0, AL_UNSET, FUNCNAME_nulcmd, NULL);
}
if (alarm_sec > 0) {
signal(SIGALRM, SigAlarm);
@@ -4686,8 +4685,7 @@ SigAlarm(SIGNAL_ARG)
}
else if (alarm_status == AL_IMPLICIT_DONE
&& alarm_buffer != Currentbuf) {
alarm_sec = 0;
alarm_status = AL_UNSET;
setAlarmEvent(0, AL_UNSET, FUNCNAME_nulcmd, NULL);
}
if (alarm_sec > 0) {
signal(SIGALRM, SigAlarm);
@@ -4722,7 +4720,7 @@ setAlarm(void)
setAlarmEvent(sec, AL_EXPLICIT, cmd, getQWord(&data));
}
else {
alarm_sec = 0;
setAlarmEvent(0, AL_UNSET, FUNCNAME_nulcmd, NULL);
}
displayBuffer(Currentbuf, B_NORMAL);
}
@@ -4730,14 +4728,12 @@ setAlarm(void)
void
setAlarmEvent(int sec, short status, int cmd, void *data)
{
if (status == AL_EXPLICIT
if (status == AL_UNSET || status == AL_EXPLICIT
|| (status == AL_IMPLICIT && alarm_status != AL_EXPLICIT)) {
alarm_sec = sec;
alarm_status = status;
alarm_event.cmd = cmd;
alarm_event.user_data = data;
signal(SIGALRM, SigAlarm);
alarm(alarm_sec);
}
}
#endif
+2
View File
@@ -75,6 +75,8 @@ meta HTML_META
frame HTML_FRAME
frameset HTML_FRAMESET
/frameset HTML_N_FRAMESET
noframes HTML_NOFRAMES
/noframes HTML_N_NOFRAMES
center HTML_CENTER
/center HTML_N_CENTER
font HTML_FONT