aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-10-30 15:46:27 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-10-30 15:46:27 +0000
commitf585f05db2776c15e8f46ea424a2f3e1b8b05c4a (patch)
treef4dc0e722a570293cab111bb921fbd28c1297c03
parent[w3m-dev 03362] Re: support for http://user:pass@www.url.com (diff)
downloadw3m-f585f05db2776c15e8f46ea424a2f3e1b8b05c4a.tar.gz
w3m-f585f05db2776c15e8f46ea424a2f3e1b8b05c4a.zip
[w3m-dev 03363] refresh download
* file.c (HTMLtagproc1): alarm is implicit once * fm.h (AL_IMPLICIT_ONCE): added * main.c (searchKeyData): reset CurrentKeyData, CurrentCmdData (SigAlarm): CurrentCmdData is saved to data message displayed on AL_EXPLICIT clear alarm when AL_IMPLICIT_ONCE (setAlarmEvent): AL_IMPLICIT_ONCE From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
-rw-r--r--ChangeLog13
-rw-r--r--file.c4
-rw-r--r--fm.h3
-rw-r--r--main.c24
4 files changed, 32 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 603b24c..a151883 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2002-10-31 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+ * [w3m-dev 03363] refresh download
+ * file.c (HTMLtagproc1): alarm is implicit once
+ * fm.h (AL_IMPLICIT_ONCE): added
+ * main.c (searchKeyData): reset CurrentKeyData, CurrentCmdData
+ (SigAlarm): CurrentCmdData is saved to data
+ message displayed on AL_EXPLICIT
+ clear alarm when AL_IMPLICIT_ONCE
+ (setAlarmEvent): AL_IMPLICIT_ONCE
+
+2002-10-31 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
* [w3m-dev 03362] Re: support for http://user:pass@www.url.com
* etc.c (loadPasswd): accept host, passwd
@@ -4048,4 +4059,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.460 2002/10/30 15:41:51 ukai Exp $
+$Id: ChangeLog,v 1.461 2002/10/30 15:46:27 ukai Exp $
diff --git a/file.c b/file.c
index bc705fd..bbd2fc4 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.107 2002/10/30 15:39:41 ukai Exp $ */
+/* $Id: file.c,v 1.108 2002/10/30 15:46:28 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -4602,7 +4602,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
#ifdef USE_ALARM
else if (!is_redisplay && refresh_interval > 0 && MetaRefresh
&& !((obuf->flag & RB_NOFRAMES) && RenderFrame)) {
- setAlarmEvent(refresh_interval, AL_IMPLICIT,
+ setAlarmEvent(refresh_interval, AL_IMPLICIT_ONCE,
FUNCNAME_gorURL, s_tmp->ptr);
}
#endif
diff --git a/fm.h b/fm.h
index ff8994f..b539e77 100644
--- a/fm.h
+++ b/fm.h
@@ -1,4 +1,4 @@
-/* $Id: fm.h,v 1.66 2002/10/26 11:19:47 ukai Exp $ */
+/* $Id: fm.h,v 1.67 2002/10/30 15:46:29 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -1016,6 +1016,7 @@ void w3m_exit(int i);
#define AL_EXPLICIT 1
#define AL_IMPLICIT 2
#define AL_IMPLICIT_DONE 3
+#define AL_IMPLICIT_ONCE 4
#endif
/*
diff --git a/main.c b/main.c
index 060f4b9..9bdff59 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.114 2002/09/28 16:32:49 ukai Exp $ */
+/* $Id: main.c,v 1.115 2002/10/30 15:46:29 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -4992,6 +4992,8 @@ searchKeyData(void)
data = CurrentCmdData;
else if (CurrentKey >= 0)
data = getKeyData(CurrentKey);
+ CurrentKeyData = NULL;
+ CurrentCmdData = NULL;
if (data == NULL || *data == '\0')
return NULL;
return allocStr(data, -1);
@@ -5084,10 +5086,12 @@ execCmd(void)
static MySignalHandler
SigAlarm(SIGNAL_ARG)
{
+ char *data;
+
if (alarm_sec > 0) {
CurrentKey = -1;
CurrentKeyData = NULL;
- CurrentCmdData = (char *)alarm_event.user_data;
+ CurrentCmdData = data = (char *)alarm_event.user_data;
#ifdef USE_MOUSE
if (use_mouse)
mouse_inactive();
@@ -5099,15 +5103,18 @@ SigAlarm(SIGNAL_ARG)
#endif
CurrentCmdData = NULL;
onA();
- disp_message_nsec(Sprintf("%s %s", w3mFuncList[alarm_event.cmd].id,
- CurrentCmdData ? CurrentCmdData : "")->ptr,
- FALSE, alarm_sec - 1, FALSE, TRUE);
- if (alarm_status == AL_IMPLICIT) {
+ if (alarm_status == AL_EXPLICIT) {
+ disp_message_nsec(Sprintf("%s %s", w3mFuncList[alarm_event.cmd].id,
+ data ? data : "")->ptr,
+ FALSE, alarm_sec - 1, FALSE, TRUE);
+ }
+ else if (alarm_status == AL_IMPLICIT) {
alarm_buffer = Currentbuf;
alarm_status = AL_IMPLICIT_DONE;
}
- else if (alarm_status == AL_IMPLICIT_DONE
- && alarm_buffer != Currentbuf) {
+ else if ((alarm_status == AL_IMPLICIT_DONE
+ && alarm_buffer != Currentbuf)
+ || alarm_status == AL_IMPLICIT_ONCE) {
setAlarmEvent(0, AL_UNSET, FUNCNAME_nulcmd, NULL);
}
if (alarm_sec > 0) {
@@ -5154,6 +5161,7 @@ void
setAlarmEvent(int sec, short status, int cmd, void *data)
{
if (status == AL_UNSET || status == AL_EXPLICIT
+ || status == AL_IMPLICIT_ONCE
|| (status == AL_IMPLICIT && alarm_status != AL_EXPLICIT)) {
alarm_sec = sec;
alarm_status = status;