aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog15
-rw-r--r--doc-jp/README.func1
-rw-r--r--doc/README.func1
-rw-r--r--funcname.tab3
-rw-r--r--main.c37
-rw-r--r--proto.h3
6 files changed, 42 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d314e6..cad1172 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2002-01-23 Fumitoshi UKAI <ukai@debian.or.jp>
+
+ * [w3m-dev 02885] Re: goURL
+ * funcname.tab (GOTO_RELATIVE): added
+ * main.c (goURL0): renamed from goURL
+ don't add http:// here, if base URL is NULL, cmd_loadURL()
+ will add http:// when necessary
+ * main.c (goURL): go to URL with current URL
+ * main.c (gorURL): go to relative URL
+ * proto.h (gorURL): added
+ * doc/README.func (GOTO_RELATIVE): added
+ * doc-jp/README.func (GOTO_RELATIVE): ditto
+
2002-01-22 Fumitoshi UKAI <ukai@debian.or.jp>
* [w3m-dev-en 00670] GOTO behavior change
@@ -2199,4 +2212,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.251 2002/01/22 10:45:14 ukai Exp $
+$Id: ChangeLog,v 1.252 2002/01/22 16:59:11 ukai Exp $
diff --git a/doc-jp/README.func b/doc-jp/README.func
index 84e8dd4..3987058 100644
--- a/doc-jp/README.func
+++ b/doc-jp/README.func
@@ -23,6 +23,7 @@ FRAME <FRAME>タグの指す文書を1つの文書に変換して表示します
GOTO URLを指定して開きます
GOTO_LINE 画面下で行番号を入力し,そこで指定した行に移動します
GOTO_LINK リンクが指す先の文書を読みこみます
+GOTO_RELATIVE 相対URLを指定して開きます
HELP ヘルプファイルを表示します
HISTORY URL履歴を表示します
INFO 現在の文書に関する情報を表示します
diff --git a/doc/README.func b/doc/README.func
index be3b09c..23a2f3e 100644
--- a/doc/README.func
+++ b/doc/README.func
@@ -23,6 +23,7 @@ FRAME Render frame
GOTO Go to URL
GOTO_LINE Go to specified line
GOTO_LINK Go to current link
+GOTO_RELATIVE Go to relative URL
HELP View help
HISTORY View history of URL
INFO View info of current document
diff --git a/funcname.tab b/funcname.tab
index 8478572..19daadc 100644
--- a/funcname.tab
+++ b/funcname.tab
@@ -1,4 +1,4 @@
-# $Id: funcname.tab,v 1.5 2001/12/25 13:43:51 ukai Exp $
+# $Id: funcname.tab,v 1.6 2002/01/22 16:59:11 ukai Exp $
# macro name function name
#----------------------------
@@@ nulcmd
@@ -29,6 +29,7 @@ FRAME rFrame
GOTO goURL
GOTO_LINE goLine
GOTO_LINK followA
+GOTO_RELATIVE gorURL
HELP ldhelp
HISTORY ldHist
INFO pginfo
diff --git a/main.c b/main.c
index e2a320f..8bfb53a 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.68 2002/01/22 10:45:14 ukai Exp $ */
+/* $Id: main.c,v 1.69 2002/01/22 16:59:11 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -3611,28 +3611,23 @@ cmd_loadURL(char *url, ParsedURL *current)
/* go to specified URL */
-void
-goURL(void)
+static void
+goURL0(char *prompt, char *def_url)
{
char *url;
ParsedURL p_url;
+ ParsedURL *b_url;
+ b_url = baseURL(Currentbuf);
url = searchKeyData();
if (url == NULL) {
- Str cur_url = parsedURL2Str(&Currentbuf->currentURL);
- ParsedURL pu;
if (!(Currentbuf->bufferprop & BP_INTERNAL))
- pushHashHist(URLHist, cur_url->ptr);
- url = inputLineHist("Goto URL: ", cur_url->ptr, IN_URL, URLHist);
+ pushHashHist(URLHist, parsedURL2Str(&Currentbuf->currentURL)->ptr);
+ url = inputLineHist(prompt, def_url, IN_URL, URLHist);
if (url != NULL) {
SKIP_BLANKS(url);
- parseURL(url, &pu, NULL);
- if (retryAsHttp) {
- if ((pu.scheme == SCM_MISSING)
- || ((pu.scheme == SCM_LOCAL)
- && (strncmp(url, "file:", 5) != 0)))
- url = Sprintf("http://%s", url)->ptr;
- }
+ if (def_url != NULL)
+ b_url = NULL; /* XXX: for retryAsHttp */
}
}
#ifdef JP_CHARSET
@@ -3653,7 +3648,19 @@ goURL(void)
}
parseURL2(url, &p_url, baseURL(Currentbuf));
pushHashHist(URLHist, parsedURL2Str(&p_url)->ptr);
- cmd_loadURL(url, baseURL(Currentbuf));
+ cmd_loadURL(url, b_url);
+}
+
+void
+goURL(void)
+{
+ goURL0("Goto URL: ", parsedURL2Str(&Currentbuf->currentURL)->ptr);
+}
+
+void
+gorURL(void)
+{
+ goURL0("Goto relative URL: ", NULL);
}
static void
diff --git a/proto.h b/proto.h
index 02283ca..2d36b47 100644
--- a/proto.h
+++ b/proto.h
@@ -1,4 +1,4 @@
-/* $Id: proto.h,v 1.28 2002/01/21 17:57:28 ukai Exp $ */
+/* $Id: proto.h,v 1.29 2002/01/22 16:59:11 ukai Exp $ */
/*
* This file was automatically generated by version 1.7 of cextract.
* Manual editing not recommended.
@@ -74,6 +74,7 @@ extern void nextU(void);
extern void backBf(void);
extern void deletePrevBuf(void);
extern void goURL(void);
+extern void gorURL(void);
extern void ldBmark(void);
extern void adBmark(void);
extern void ldOpt(void);