[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 From: Fumitoshi UKAI <ukai@debian.or.jp>
This commit is contained in:
@@ -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>
|
2002-01-22 Fumitoshi UKAI <ukai@debian.or.jp>
|
||||||
|
|
||||||
* [w3m-dev-en 00670] GOTO behavior change
|
* [w3m-dev-en 00670] GOTO behavior change
|
||||||
@@ -2199,4 +2212,4 @@
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-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 $
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ FRAME <FRAME>
|
|||||||
GOTO URLを指定して開きます
|
GOTO URLを指定して開きます
|
||||||
GOTO_LINE 画面下で行番号を入力し,そこで指定した行に移動します
|
GOTO_LINE 画面下で行番号を入力し,そこで指定した行に移動します
|
||||||
GOTO_LINK リンクが指す先の文書を読みこみます
|
GOTO_LINK リンクが指す先の文書を読みこみます
|
||||||
|
GOTO_RELATIVE 相対URLを指定して開きます
|
||||||
HELP ヘルプファイルを表示します
|
HELP ヘルプファイルを表示します
|
||||||
HISTORY URL履歴を表示します
|
HISTORY URL履歴を表示します
|
||||||
INFO 現在の文書に関する情報を表示します
|
INFO 現在の文書に関する情報を表示します
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ FRAME Render frame
|
|||||||
GOTO Go to URL
|
GOTO Go to URL
|
||||||
GOTO_LINE Go to specified line
|
GOTO_LINE Go to specified line
|
||||||
GOTO_LINK Go to current link
|
GOTO_LINK Go to current link
|
||||||
|
GOTO_RELATIVE Go to relative URL
|
||||||
HELP View help
|
HELP View help
|
||||||
HISTORY View history of URL
|
HISTORY View history of URL
|
||||||
INFO View info of current document
|
INFO View info of current document
|
||||||
|
|||||||
+2
-1
@@ -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
|
# macro name function name
|
||||||
#----------------------------
|
#----------------------------
|
||||||
@@@ nulcmd
|
@@@ nulcmd
|
||||||
@@ -29,6 +29,7 @@ FRAME rFrame
|
|||||||
GOTO goURL
|
GOTO goURL
|
||||||
GOTO_LINE goLine
|
GOTO_LINE goLine
|
||||||
GOTO_LINK followA
|
GOTO_LINK followA
|
||||||
|
GOTO_RELATIVE gorURL
|
||||||
HELP ldhelp
|
HELP ldhelp
|
||||||
HISTORY ldHist
|
HISTORY ldHist
|
||||||
INFO pginfo
|
INFO pginfo
|
||||||
|
|||||||
@@ -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
|
#define MAINPROGRAM
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -3611,28 +3611,23 @@ cmd_loadURL(char *url, ParsedURL *current)
|
|||||||
|
|
||||||
|
|
||||||
/* go to specified URL */
|
/* go to specified URL */
|
||||||
void
|
static void
|
||||||
goURL(void)
|
goURL0(char *prompt, char *def_url)
|
||||||
{
|
{
|
||||||
char *url;
|
char *url;
|
||||||
ParsedURL p_url;
|
ParsedURL p_url;
|
||||||
|
ParsedURL *b_url;
|
||||||
|
|
||||||
|
b_url = baseURL(Currentbuf);
|
||||||
url = searchKeyData();
|
url = searchKeyData();
|
||||||
if (url == NULL) {
|
if (url == NULL) {
|
||||||
Str cur_url = parsedURL2Str(&Currentbuf->currentURL);
|
|
||||||
ParsedURL pu;
|
|
||||||
if (!(Currentbuf->bufferprop & BP_INTERNAL))
|
if (!(Currentbuf->bufferprop & BP_INTERNAL))
|
||||||
pushHashHist(URLHist, cur_url->ptr);
|
pushHashHist(URLHist, parsedURL2Str(&Currentbuf->currentURL)->ptr);
|
||||||
url = inputLineHist("Goto URL: ", cur_url->ptr, IN_URL, URLHist);
|
url = inputLineHist(prompt, def_url, IN_URL, URLHist);
|
||||||
if (url != NULL) {
|
if (url != NULL) {
|
||||||
SKIP_BLANKS(url);
|
SKIP_BLANKS(url);
|
||||||
parseURL(url, &pu, NULL);
|
if (def_url != NULL)
|
||||||
if (retryAsHttp) {
|
b_url = NULL; /* XXX: for retryAsHttp */
|
||||||
if ((pu.scheme == SCM_MISSING)
|
|
||||||
|| ((pu.scheme == SCM_LOCAL)
|
|
||||||
&& (strncmp(url, "file:", 5) != 0)))
|
|
||||||
url = Sprintf("http://%s", url)->ptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef JP_CHARSET
|
#ifdef JP_CHARSET
|
||||||
@@ -3653,7 +3648,19 @@ goURL(void)
|
|||||||
}
|
}
|
||||||
parseURL2(url, &p_url, baseURL(Currentbuf));
|
parseURL2(url, &p_url, baseURL(Currentbuf));
|
||||||
pushHashHist(URLHist, parsedURL2Str(&p_url)->ptr);
|
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
|
static void
|
||||||
|
|||||||
@@ -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.
|
* This file was automatically generated by version 1.7 of cextract.
|
||||||
* Manual editing not recommended.
|
* Manual editing not recommended.
|
||||||
@@ -74,6 +74,7 @@ extern void nextU(void);
|
|||||||
extern void backBf(void);
|
extern void backBf(void);
|
||||||
extern void deletePrevBuf(void);
|
extern void deletePrevBuf(void);
|
||||||
extern void goURL(void);
|
extern void goURL(void);
|
||||||
|
extern void gorURL(void);
|
||||||
extern void ldBmark(void);
|
extern void ldBmark(void);
|
||||||
extern void adBmark(void);
|
extern void adBmark(void);
|
||||||
extern void ldOpt(void);
|
extern void ldOpt(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user