[w3m-dev 03939] next/prev visited link
* funcname.tab (NEXT_VISITED): added (PREV_VISITED): added * main.c (_nextA): added (_prevA): added (nextVA): added (prevVA): added * proto.h (nextVA): added (prevVA): added * doc/README.func (NEXT_VISITED): added (PREV_VISITED): added * doc-jp/README.func (NEXT_VISITED): added (PREV_VISITED): added * NEWS: func: NEXT_VISITED, PREV_VISITED From: Yoshinobu Sakane <sakane@d4.bsd.nes.nec.co.jp>
This commit is contained in:
@@ -1,3 +1,21 @@
|
|||||||
|
2003-07-23 Yoshinobu Sakane <sakane@d4.bsd.nes.nec.co.jp>
|
||||||
|
|
||||||
|
* [w3m-dev 03939] next/prev visited link
|
||||||
|
* funcname.tab (NEXT_VISITED): added
|
||||||
|
(PREV_VISITED): added
|
||||||
|
* main.c (_nextA): added
|
||||||
|
(_prevA): added
|
||||||
|
(nextVA): added
|
||||||
|
(prevVA): added
|
||||||
|
* proto.h (nextVA): added
|
||||||
|
(prevVA): added
|
||||||
|
* doc/README.func (NEXT_VISITED): added
|
||||||
|
(PREV_VISITED): added
|
||||||
|
* doc-jp/README.func (NEXT_VISITED): added
|
||||||
|
(PREV_VISITED): added
|
||||||
|
* NEWS: func: NEXT_VISITED, PREV_VISITED
|
||||||
|
|
||||||
|
|
||||||
2003-07-14 Hiroyuki Ito <hito@crl.go.jp>
|
2003-07-14 Hiroyuki Ito <hito@crl.go.jp>
|
||||||
|
|
||||||
* [w3m-dev 03938] clear region margin
|
* [w3m-dev 03938] clear region margin
|
||||||
@@ -7933,4 +7951,4 @@ a * [w3m-dev 03276] compile error on EWS4800
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-0.2.1
|
* import w3m-0.2.1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.852 2003/07/13 16:19:09 ukai Exp $
|
$Id: ChangeLog,v 1.853 2003/07/22 17:24:49 ukai Exp $
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
w3m 0.5 or 1.0?
|
w3m 0.5 or 1.0?
|
||||||
|
|
||||||
|
* func: NEXT_VISITED, PREV_VISITED
|
||||||
* autoconfiscate
|
* autoconfiscate
|
||||||
* rc: use_history
|
* rc: use_history
|
||||||
|
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ NEXT_RIGHT
|
|||||||
NEXT_RIGHT_DOWN カーソルの右側(無ければ次行以降)にあるリンクに移動します
|
NEXT_RIGHT_DOWN カーソルの右側(無ければ次行以降)にあるリンクに移動します
|
||||||
NEXT_TAB 次のタブに移動します
|
NEXT_TAB 次のタブに移動します
|
||||||
NEXT_UP カーソルの上側にあるリンクに移動します
|
NEXT_UP カーソルの上側にあるリンクに移動します
|
||||||
|
NEXT_VISITED 次の訪れたことのあるリンクに移動します
|
||||||
NEXT_WORD 次の単語に移動します
|
NEXT_WORD 次の単語に移動します
|
||||||
NOTHING 何もしません
|
NOTHING 何もしません
|
||||||
NULL 何もしません
|
NULL 何もしません
|
||||||
@@ -93,6 +94,7 @@ PREV_LINK
|
|||||||
PREV_MARK 一つ前のマークに移動します
|
PREV_MARK 一つ前のマークに移動します
|
||||||
PREV_PAGE 前のページを表示します
|
PREV_PAGE 前のページを表示します
|
||||||
PREV_TAB 前のタブに移動します
|
PREV_TAB 前のタブに移動します
|
||||||
|
PREV_VISITED 前の訪れたことのあるリンクに移動します
|
||||||
PREV_WORD 前の単語に移動します
|
PREV_WORD 前の単語に移動します
|
||||||
PRINT バッファの表示内容をファイルに保存します
|
PRINT バッファの表示内容をファイルに保存します
|
||||||
QUIT w3mを終了します
|
QUIT w3mを終了します
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ NEXT_RIGHT Move to next right link
|
|||||||
NEXT_RIGHT_DOWN Move to next right (or downward) link
|
NEXT_RIGHT_DOWN Move to next right (or downward) link
|
||||||
NEXT_TAB Move to next tab
|
NEXT_TAB Move to next tab
|
||||||
NEXT_UP Move to next upward link
|
NEXT_UP Move to next upward link
|
||||||
|
NEXT_VISITED Move to next visited link
|
||||||
NEXT_WORD Move to next word
|
NEXT_WORD Move to next word
|
||||||
NOTHING Do nothing
|
NOTHING Do nothing
|
||||||
NULL Do nothing
|
NULL Do nothing
|
||||||
@@ -93,6 +94,7 @@ PREV_LINK Move to previous link
|
|||||||
PREV_MARK Move to previous mark
|
PREV_MARK Move to previous mark
|
||||||
PREV_PAGE Move to previous page
|
PREV_PAGE Move to previous page
|
||||||
PREV_TAB Move to previous tab
|
PREV_TAB Move to previous tab
|
||||||
|
PREV_VISITED Move to previous visited link
|
||||||
PREV_WORD Move to previous word
|
PREV_WORD Move to previous word
|
||||||
PRINT Save buffer to file
|
PRINT Save buffer to file
|
||||||
QUIT Quit w3m
|
QUIT Quit w3m
|
||||||
|
|||||||
+3
-1
@@ -1,4 +1,4 @@
|
|||||||
# $Id: funcname.tab,v 1.20 2003/01/23 18:37:21 ukai Exp $
|
# $Id: funcname.tab,v 1.21 2003/07/22 17:24:49 ukai Exp $
|
||||||
# macro name function name
|
# macro name function name
|
||||||
#----------------------------
|
#----------------------------
|
||||||
@@@ nulcmd
|
@@@ nulcmd
|
||||||
@@ -147,3 +147,5 @@ VIEW_BOOKMARK ldBmark
|
|||||||
VIEW_IMAGE followI
|
VIEW_IMAGE followI
|
||||||
WHEREIS srchfor
|
WHEREIS srchfor
|
||||||
WRAP_TOGGLE wrapToggle
|
WRAP_TOGGLE wrapToggle
|
||||||
|
NEXT_VISITED nextVA
|
||||||
|
PREV_VISITED prevVA
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: main.c,v 1.226 2003/05/12 16:34:12 ukai Exp $ */
|
/* $Id: main.c,v 1.227 2003/07/22 17:24:49 ukai Exp $ */
|
||||||
#define MAINPROGRAM
|
#define MAINPROGRAM
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -94,6 +94,8 @@ static void _goLine(char *);
|
|||||||
static void _newT(void);
|
static void _newT(void);
|
||||||
static void followTab(TabBuffer * tab);
|
static void followTab(TabBuffer * tab);
|
||||||
static void moveTab(TabBuffer * t, TabBuffer * t2, int right);
|
static void moveTab(TabBuffer * t, TabBuffer * t2, int right);
|
||||||
|
static void _nextA(int);
|
||||||
|
static void _prevA(int);
|
||||||
static int check_target = TRUE;
|
static int check_target = TRUE;
|
||||||
#define PREC_NUM (prec_num ? prec_num : 1)
|
#define PREC_NUM (prec_num ? prec_num : 1)
|
||||||
#define PREC_LIMIT 10000
|
#define PREC_LIMIT 10000
|
||||||
@@ -3450,11 +3452,40 @@ lastA(void)
|
|||||||
/* go to the next anchor */
|
/* go to the next anchor */
|
||||||
void
|
void
|
||||||
nextA(void)
|
nextA(void)
|
||||||
|
{
|
||||||
|
_nextA(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* go to the previous anchor */
|
||||||
|
void
|
||||||
|
prevA(void)
|
||||||
|
{
|
||||||
|
_prevA(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* go to the next visited anchor */
|
||||||
|
void
|
||||||
|
nextVA(void)
|
||||||
|
{
|
||||||
|
_nextA(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* go to the previous visited anchor */
|
||||||
|
void
|
||||||
|
prevVA(void)
|
||||||
|
{
|
||||||
|
_prevA(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* go to the next [visited] anchor */
|
||||||
|
static void
|
||||||
|
_nextA(int visited)
|
||||||
{
|
{
|
||||||
HmarkerList *hl = Currentbuf->hmarklist;
|
HmarkerList *hl = Currentbuf->hmarklist;
|
||||||
BufferPoint *po;
|
BufferPoint *po;
|
||||||
Anchor *an, *pan;
|
Anchor *an, *pan;
|
||||||
int i, x, y, n = searchKeyNum();
|
int i, x, y, n = searchKeyNum();
|
||||||
|
ParsedURL url;
|
||||||
|
|
||||||
if (Currentbuf->firstLine == NULL)
|
if (Currentbuf->firstLine == NULL)
|
||||||
return;
|
return;
|
||||||
@@ -3462,40 +3493,63 @@ nextA(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
an = retrieveCurrentAnchor(Currentbuf);
|
an = retrieveCurrentAnchor(Currentbuf);
|
||||||
if (an == NULL)
|
if (visited != TRUE && an == NULL)
|
||||||
an = retrieveCurrentForm(Currentbuf);
|
an = retrieveCurrentForm(Currentbuf);
|
||||||
|
|
||||||
y = Currentbuf->currentLine->linenumber;
|
y = Currentbuf->currentLine->linenumber;
|
||||||
x = Currentbuf->pos;
|
x = Currentbuf->pos;
|
||||||
|
|
||||||
|
if (visited == TRUE) {
|
||||||
|
n = hl->nmark;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
pan = an;
|
pan = an;
|
||||||
if (an && an->hseq >= 0) {
|
if (an && an->hseq >= 0) {
|
||||||
int hseq = an->hseq + 1;
|
int hseq = an->hseq + 1;
|
||||||
do {
|
do {
|
||||||
if (hseq >= hl->nmark) {
|
if (hseq >= hl->nmark) {
|
||||||
|
if (visited == TRUE)
|
||||||
|
return;
|
||||||
an = pan;
|
an = pan;
|
||||||
goto _end;
|
goto _end;
|
||||||
}
|
}
|
||||||
po = &hl->marks[hseq];
|
po = &hl->marks[hseq];
|
||||||
an = retrieveAnchor(Currentbuf->href, po->line, po->pos);
|
an = retrieveAnchor(Currentbuf->href, po->line, po->pos);
|
||||||
if (an == NULL)
|
if (visited != TRUE && an == NULL)
|
||||||
an = retrieveAnchor(Currentbuf->formitem, po->line,
|
an = retrieveAnchor(Currentbuf->formitem, po->line,
|
||||||
po->pos);
|
po->pos);
|
||||||
hseq++;
|
hseq++;
|
||||||
|
if (visited == TRUE && an) {
|
||||||
|
parseURL2(an->url, &url, baseURL(Currentbuf));
|
||||||
|
if (getHashHist(URLHist, parsedURL2Str(&url)->ptr)) {
|
||||||
|
goto _end;
|
||||||
|
}
|
||||||
|
}
|
||||||
} while (an == NULL || an == pan);
|
} while (an == NULL || an == pan);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
an = closest_next_anchor(Currentbuf->href, NULL, x, y);
|
an = closest_next_anchor(Currentbuf->href, NULL, x, y);
|
||||||
|
if (visited != TRUE)
|
||||||
an = closest_next_anchor(Currentbuf->formitem, an, x, y);
|
an = closest_next_anchor(Currentbuf->formitem, an, x, y);
|
||||||
if (an == NULL) {
|
if (an == NULL) {
|
||||||
|
if (visited == TRUE)
|
||||||
|
return;
|
||||||
an = pan;
|
an = pan;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
x = an->start.pos;
|
x = an->start.pos;
|
||||||
y = an->start.line;
|
y = an->start.line;
|
||||||
|
if (visited == TRUE) {
|
||||||
|
parseURL2(an->url, &url, baseURL(Currentbuf));
|
||||||
|
if (getHashHist(URLHist, parsedURL2Str(&url)->ptr)) {
|
||||||
|
goto _end;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (visited == TRUE)
|
||||||
|
return;
|
||||||
|
|
||||||
_end:
|
_end:
|
||||||
if (an == NULL || an->hseq < 0)
|
if (an == NULL || an->hseq < 0)
|
||||||
@@ -3508,13 +3562,14 @@ nextA(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* go to the previous anchor */
|
/* go to the previous anchor */
|
||||||
void
|
static void
|
||||||
prevA(void)
|
_prevA(int visited)
|
||||||
{
|
{
|
||||||
HmarkerList *hl = Currentbuf->hmarklist;
|
HmarkerList *hl = Currentbuf->hmarklist;
|
||||||
BufferPoint *po;
|
BufferPoint *po;
|
||||||
Anchor *an, *pan;
|
Anchor *an, *pan;
|
||||||
int i, x, y, n = searchKeyNum();
|
int i, x, y, n = searchKeyNum();
|
||||||
|
ParsedURL url;
|
||||||
|
|
||||||
if (Currentbuf->firstLine == NULL)
|
if (Currentbuf->firstLine == NULL)
|
||||||
return;
|
return;
|
||||||
@@ -3522,40 +3577,63 @@ prevA(void)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
an = retrieveCurrentAnchor(Currentbuf);
|
an = retrieveCurrentAnchor(Currentbuf);
|
||||||
if (an == NULL)
|
if (visited != TRUE && an == NULL)
|
||||||
an = retrieveCurrentForm(Currentbuf);
|
an = retrieveCurrentForm(Currentbuf);
|
||||||
|
|
||||||
y = Currentbuf->currentLine->linenumber;
|
y = Currentbuf->currentLine->linenumber;
|
||||||
x = Currentbuf->pos;
|
x = Currentbuf->pos;
|
||||||
|
|
||||||
|
if (visited == TRUE) {
|
||||||
|
n = hl->nmark;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
pan = an;
|
pan = an;
|
||||||
if (an && an->hseq >= 0) {
|
if (an && an->hseq >= 0) {
|
||||||
int hseq = an->hseq - 1;
|
int hseq = an->hseq - 1;
|
||||||
do {
|
do {
|
||||||
if (hseq < 0) {
|
if (hseq < 0) {
|
||||||
|
if (visited == TRUE)
|
||||||
|
return;
|
||||||
an = pan;
|
an = pan;
|
||||||
goto _end;
|
goto _end;
|
||||||
}
|
}
|
||||||
po = hl->marks + hseq;
|
po = hl->marks + hseq;
|
||||||
an = retrieveAnchor(Currentbuf->href, po->line, po->pos);
|
an = retrieveAnchor(Currentbuf->href, po->line, po->pos);
|
||||||
if (an == NULL)
|
if (visited != TRUE && an == NULL)
|
||||||
an = retrieveAnchor(Currentbuf->formitem, po->line,
|
an = retrieveAnchor(Currentbuf->formitem, po->line,
|
||||||
po->pos);
|
po->pos);
|
||||||
hseq--;
|
hseq--;
|
||||||
|
if (visited == TRUE && an) {
|
||||||
|
parseURL2(an->url, &url, baseURL(Currentbuf));
|
||||||
|
if (getHashHist(URLHist, parsedURL2Str(&url)->ptr)) {
|
||||||
|
goto _end;
|
||||||
|
}
|
||||||
|
}
|
||||||
} while (an == NULL || an == pan);
|
} while (an == NULL || an == pan);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
an = closest_prev_anchor(Currentbuf->href, NULL, x, y);
|
an = closest_prev_anchor(Currentbuf->href, NULL, x, y);
|
||||||
|
if (visited != TRUE)
|
||||||
an = closest_prev_anchor(Currentbuf->formitem, an, x, y);
|
an = closest_prev_anchor(Currentbuf->formitem, an, x, y);
|
||||||
if (an == NULL) {
|
if (an == NULL) {
|
||||||
|
if (visited == TRUE)
|
||||||
|
return;
|
||||||
an = pan;
|
an = pan;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
x = an->start.pos;
|
x = an->start.pos;
|
||||||
y = an->start.line;
|
y = an->start.line;
|
||||||
|
if (visited == TRUE && an) {
|
||||||
|
parseURL2(an->url, &url, baseURL(Currentbuf));
|
||||||
|
if (getHashHist(URLHist, parsedURL2Str(&url)->ptr)) {
|
||||||
|
goto _end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (visited == TRUE)
|
||||||
|
return;
|
||||||
|
|
||||||
_end:
|
_end:
|
||||||
if (an == NULL || an->hseq < 0)
|
if (an == NULL || an->hseq < 0)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: proto.h,v 1.92 2003/04/08 16:01:40 ukai Exp $ */
|
/* $Id: proto.h,v 1.93 2003/07/22 17:24:49 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.
|
||||||
@@ -65,6 +65,8 @@ extern void onA(void);
|
|||||||
|
|
||||||
extern void nextA(void);
|
extern void nextA(void);
|
||||||
extern void prevA(void);
|
extern void prevA(void);
|
||||||
|
extern void nextVA(void);
|
||||||
|
extern void prevVA(void);
|
||||||
extern void nextL(void);
|
extern void nextL(void);
|
||||||
extern void nextLU(void);
|
extern void nextLU(void);
|
||||||
extern void nextR(void);
|
extern void nextR(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user