aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-12-06 15:31:58 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-12-06 15:31:58 +0000
commitb7690e82bcaeb2a89279768c4e204f2954d63e0d (patch)
tree7297ef1937432deb3b3ff8a0074bbd5e0f70168f
parent[w3m-dev 02619] (diff)
downloadw3m-b7690e82bcaeb2a89279768c4e204f2954d63e0d.tar.gz
w3m-b7690e82bcaeb2a89279768c4e204f2954d63e0d.zip
[w3m-dev 02622]
From: Tsutomu Okada <okada@furuno.co.jp>
Diffstat (limited to '')
-rw-r--r--ChangeLog19
-rw-r--r--file.c22
-rw-r--r--fm.h3
-rw-r--r--html.c8
-rw-r--r--html.h4
-rw-r--r--main.c14
-rw-r--r--tagtable.tab2
7 files changed, 54 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 491cfbb..7633092 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
diff --git a/file.c b/file.c
index 8245865..2cdb9e8 100644
--- a/file.c
+++ b/file.c
@@ -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,
diff --git a/fm.h b/fm.h
index a36c613..8ee16db 100644
--- a/fm.h
+++ b/fm.h
@@ -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
diff --git a/html.c b/html.c
index 7b5253c..8e82f33 100644
--- a/html.c
+++ b/html.c
@@ -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 */
diff --git a/html.h b/html.h
index b83b769..da35af9 100644
--- a/html.h
+++ b/html.h
@@ -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 */
diff --git a/main.c b/main.c
index 90b0f38..76a7a9d 100644
--- a/main.c
+++ b/main.c
@@ -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
diff --git a/tagtable.tab b/tagtable.tab
index 8954857..9cbb8e3 100644
--- a/tagtable.tab
+++ b/tagtable.tab
@@ -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