aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-01-23 17:19:47 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-01-23 17:19:47 +0000
commit316998e06ad1b3fba1831ff77a46305ed5d10dc5 (patch)
treeaf093e7c7143d57124d02195263609dafe824b04
parent[w3m-dev 02889] fix scripts/multipart/multipart.cgi.in (diff)
downloadw3m-316998e06ad1b3fba1831ff77a46305ed5d10dc5.tar.gz
w3m-316998e06ad1b3fba1831ff77a46305ed5d10dc5.zip
[w3m-dev 02894] Re: goURL
* file.c (HTMLtagproc1): s/goURL/gorURL/ * keybind.c (EscKeymap): M-u = GOTO_RELATIVE * keybind_lynx.c (EscKeymap): ditto * doc/keymap.default: ditto * doc/keymap.lynx: ditto * doc-jp/keymap.default: ditto * doc-jp/keymap.lynx: ditto * main.c (MAIN): add $HTTP_HOME or $WWW_HOME to history * main.c (MAIN): add history even if it is local file or local cgi * main.c (goURL0): change args, def_url -> current * main.c (goURL0): delete ParsedURL *b_url * main.c (goURL0): add Buffer *cur_buf * main.c (goURL0): if current is supplied, use its URL as default * main.c (goURL0): add URL to history if loadURL succeeded * main.c (goURL): change args for goURL0() * main.c (gorURL): ditto From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
-rw-r--r--ChangeLog22
-rw-r--r--doc-jp/keymap.default1
-rw-r--r--doc-jp/keymap.lynx1
-rw-r--r--doc/keymap.default1
-rw-r--r--doc/keymap.lynx1
-rw-r--r--file.c6
-rw-r--r--keybind.c4
-rw-r--r--keybind_lynx.c4
-rw-r--r--main.c31
9 files changed, 47 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 3bbe299..318a171 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2002-01-24 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 02894] Re: goURL
+ * file.c (HTMLtagproc1): s/goURL/gorURL/
+ * keybind.c (EscKeymap): M-u = GOTO_RELATIVE
+ * keybind_lynx.c (EscKeymap): ditto
+ * doc/keymap.default: ditto
+ * doc/keymap.lynx: ditto
+ * doc-jp/keymap.default: ditto
+ * doc-jp/keymap.lynx: ditto
+ * main.c (MAIN): add $HTTP_HOME or $WWW_HOME to history
+ * main.c (MAIN): add history even if it is local file or local cgi
+ * main.c (goURL0): change args, def_url -> current
+ * main.c (goURL0): delete ParsedURL *b_url
+ * main.c (goURL0): add Buffer *cur_buf
+ * main.c (goURL0): if current is supplied, use its URL as default
+ * main.c (goURL0): add URL to history if loadURL succeeded
+ * main.c (goURL): change args for goURL0()
+ * main.c (gorURL): ditto
+
2002-01-23 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 02889] fix scripts/multipart/multipart.cgi.in
@@ -2217,4 +2237,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.253 2002/01/22 17:34:13 ukai Exp $
+$Id: ChangeLog,v 1.254 2002/01/23 17:19:47 ukai Exp $
diff --git a/doc-jp/keymap.default b/doc-jp/keymap.default
index 2dad146..2e6c54a 100644
--- a/doc-jp/keymap.default
+++ b/doc-jp/keymap.default
@@ -100,6 +100,7 @@ keymap M-g GOTO_LINE
keymap M-n NEXT_MARK
keymap M-p PREV_MARK
keymap M-s SAVE
+keymap M-u GOTO_RELATIVE
keymap M-v PREV_PAGE
keymap M-w DICT_WORD
diff --git a/doc-jp/keymap.lynx b/doc-jp/keymap.lynx
index 095a1ab..c811e94 100644
--- a/doc-jp/keymap.lynx
+++ b/doc-jp/keymap.lynx
@@ -94,6 +94,7 @@ keymap M-a ADD_BOOKMARK
keymap M-b BOOKMARK
keymap M-e EDIT_SCREEN
keymap M-s SAVE
+keymap M-u GOTO_RELATIVE
keymap M-v PREV_PAGE
keymap UP PREV_LINK
diff --git a/doc/keymap.default b/doc/keymap.default
index 2dad146..2e6c54a 100644
--- a/doc/keymap.default
+++ b/doc/keymap.default
@@ -100,6 +100,7 @@ keymap M-g GOTO_LINE
keymap M-n NEXT_MARK
keymap M-p PREV_MARK
keymap M-s SAVE
+keymap M-u GOTO_RELATIVE
keymap M-v PREV_PAGE
keymap M-w DICT_WORD
diff --git a/doc/keymap.lynx b/doc/keymap.lynx
index 095a1ab..c811e94 100644
--- a/doc/keymap.lynx
+++ b/doc/keymap.lynx
@@ -94,6 +94,7 @@ keymap M-a ADD_BOOKMARK
keymap M-b BOOKMARK
keymap M-e EDIT_SCREEN
keymap M-s SAVE
+keymap M-u GOTO_RELATIVE
keymap M-v PREV_PAGE
keymap UP PREV_LINK
diff --git a/file.c b/file.c
index 9b0399b..b5ccba4 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.45 2002/01/21 17:57:28 ukai Exp $ */
+/* $Id: file.c,v 1.46 2002/01/23 17:19:47 ukai Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -3769,14 +3769,14 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
h_env->limit);
if (!is_redisplay && refresh_interval == 0 && MetaRefresh &&
!((obuf->flag & RB_NOFRAMES) && RenderFrame)) {
- pushEvent(FUNCNAME_goURL, s_tmp->ptr);
+ pushEvent(FUNCNAME_gorURL, s_tmp->ptr);
/* pushEvent(deletePrevBuf,NULL); */
}
#ifdef USE_ALARM
else if (!is_redisplay && refresh_interval > 0 && MetaRefresh
&& !((obuf->flag & RB_NOFRAMES) && RenderFrame)) {
setAlarmEvent(refresh_interval, AL_IMPLICIT,
- FUNCNAME_goURL, s_tmp->ptr);
+ FUNCNAME_gorURL, s_tmp->ptr);
}
#endif
}
diff --git a/keybind.c b/keybind.c
index 175e8f2..4d8a5bf 100644
--- a/keybind.c
+++ b/keybind.c
@@ -1,4 +1,4 @@
-/* $Id: keybind.c,v 1.5 2001/12/25 13:43:51 ukai Exp $ */
+/* $Id: keybind.c,v 1.6 2002/01/23 17:19:47 ukai Exp $ */
#include "funcname2.h"
char GlobalKeymap[128] = {
@@ -70,7 +70,7 @@ char EscKeymap[128] = {
/* h i j k l m n o */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nextMk, nulcmd,
/* p q r s t u v w */
- prevMk, nulcmd, nulcmd, svSrc, nulcmd, nulcmd, pgBack, dictword,
+ prevMk, nulcmd, nulcmd, svSrc, nulcmd, gorURL, pgBack, dictword,
/* x y z { | } ~ DEL */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
};
diff --git a/keybind_lynx.c b/keybind_lynx.c
index 415030e..8e8bc4e 100644
--- a/keybind_lynx.c
+++ b/keybind_lynx.c
@@ -1,4 +1,4 @@
-/* $Id: keybind_lynx.c,v 1.4 2001/11/24 02:01:26 ukai Exp $ */
+/* $Id: keybind_lynx.c,v 1.5 2002/01/23 17:19:47 ukai Exp $ */
/*
* Lynx-like key binding.
*
@@ -78,7 +78,7 @@ char EscKeymap[128] = {
/* h i j k l m n o */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
/* p q r s t u v w */
- nulcmd, nulcmd, nulcmd, svSrc, nulcmd, nulcmd, pgBack, nulcmd,
+ nulcmd, nulcmd, nulcmd, svSrc, nulcmd, gorURL, pgBack, nulcmd,
/* x y z { | } ~ DEL */
nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
};
diff --git a/main.c b/main.c
index 8bfb53a..65e0756 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.69 2002/01/22 16:59:11 ukai Exp $ */
+/* $Id: main.c,v 1.70 2002/01/23 17:19:47 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -762,6 +762,8 @@ MAIN(int argc, char **argv, char **envp)
newbuf = loadGeneralFile(p, NULL, NO_REFERER, 0, NULL);
if (newbuf == NULL)
Strcat(err_msg, Sprintf("w3m: Can't load %s.\n", p));
+ else if (newbuf != NO_BUFFER)
+ pushHashHist(URLHist, parsedURL2Str(&newbuf->currentURL)->ptr);
}
else {
if (fmInitialized)
@@ -840,7 +842,6 @@ MAIN(int argc, char **argv, char **envp)
case SCM_LOCAL:
case SCM_LOCAL_CGI:
unshiftHist(LoadHist, conv_from_system(load_argv[i]));
- break;
default:
pushHashHist(URLHist, parsedURL2Str(&newbuf->currentURL)->ptr);
break;
@@ -3612,23 +3613,19 @@ cmd_loadURL(char *url, ParsedURL *current)
/* go to specified URL */
static void
-goURL0(char *prompt, char *def_url)
+goURL0(char *prompt, ParsedURL *current)
{
char *url;
ParsedURL p_url;
- ParsedURL *b_url;
+ Buffer *cur_buf = Currentbuf;
- b_url = baseURL(Currentbuf);
url = searchKeyData();
if (url == NULL) {
- if (!(Currentbuf->bufferprop & BP_INTERNAL))
- pushHashHist(URLHist, parsedURL2Str(&Currentbuf->currentURL)->ptr);
- url = inputLineHist(prompt, def_url, IN_URL, URLHist);
- if (url != NULL) {
+ if (current)
+ url = parsedURL2Str(current)->ptr;
+ url = inputLineHist(prompt, url, IN_URL, URLHist);
+ if (url != NULL)
SKIP_BLANKS(url);
- if (def_url != NULL)
- b_url = NULL; /* XXX: for retryAsHttp */
- }
}
#ifdef JP_CHARSET
if (url != NULL) {
@@ -3646,21 +3643,23 @@ goURL0(char *prompt, char *def_url)
gotoLabel(url + 1);
return;
}
- parseURL2(url, &p_url, baseURL(Currentbuf));
+ parseURL2(url, &p_url, current);
pushHashHist(URLHist, parsedURL2Str(&p_url)->ptr);
- cmd_loadURL(url, b_url);
+ cmd_loadURL(url, current);
+ if (Currentbuf != cur_buf) /* success */
+ pushHashHist(URLHist, parsedURL2Str(&Currentbuf->currentURL)->ptr);
}
void
goURL(void)
{
- goURL0("Goto URL: ", parsedURL2Str(&Currentbuf->currentURL)->ptr);
+ goURL0("Goto URL: ", NULL);
}
void
gorURL(void)
{
- goURL0("Goto relative URL: ", NULL);
+ goURL0("Goto relative URL: ", baseURL(Currentbuf));
}
static void