w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit b66905e3b6eea629030db94db15e30c18f96d8c2
parent e2aab8f364728b15935a1d508ca066469407cb66
Author: ukai <ukai>
Date:   Wed, 23 Jan 2002 17:19:47 +0000

[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>

Diffstat:
MChangeLog | 20++++++++++++++++++++
Mdoc-jp/keymap.default | 1+
Mdoc-jp/keymap.lynx | 1+
Mdoc/keymap.default | 1+
Mdoc/keymap.lynx | 1+
Mfile.c | 4++--
Mkeybind.c | 2+-
Mkeybind_lynx.c | 2+-
Mmain.c | 29++++++++++++++---------------
9 files changed, 42 insertions(+), 19 deletions(-)

diff --git 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 diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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