[w3m-dev 03160] Re: "ttp:" is marked instead of "http:" by MARL_URL

* NEWS:
* anchor.c (reAnchorAny): check MarkAllPages
* fm.h (MarkAllPages): added
* rc.c (CMT_MARK_ALL_PAGES): added
	(mark_all_pages): added
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-03-29 16:39:37 +00:00
parent 3f67a7d3d6
commit c6b76b9c87
5 changed files with 22 additions and 5 deletions

View File

@@ -1,3 +1,12 @@
2002-03-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03160] Re: "ttp:" is marked instead of "http:" by MARL_URL
* NEWS:
* anchor.c (reAnchorAny): check MarkAllPages
* fm.h (MarkAllPages): added
* rc.c (CMT_MARK_ALL_PAGES): added
(mark_all_pages): added
2002-03-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp> 2002-03-30 Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03159] "ttp:" is marked instead of "http:" by MARL_URL * [w3m-dev 03159] "ttp:" is marked instead of "http:" by MARL_URL
@@ -3308,4 +3317,4 @@
* release-0-2-1 * release-0-2-1
* import w3m-0.2.1 * import w3m-0.2.1
$Id: ChangeLog,v 1.364 2002/03/29 16:32:00 ukai Exp $ $Id: ChangeLog,v 1.365 2002/03/29 16:39:37 ukai Exp $

1
NEWS
View File

@@ -1,5 +1,6 @@
w3m 0.4? w3m 0.4?
* rc: mark_all_pages
* configure: -mandir * configure: -mandir
* func: COMMAND * func: COMMAND
* -title option: set buffer name to terminal title * -title option: set buffer name to terminal title

View File

@@ -1,4 +1,4 @@
/* $Id: anchor.c,v 1.9 2002/01/31 18:28:24 ukai Exp $ */ /* $Id: anchor.c,v 1.10 2002/03/29 16:39:37 ukai Exp $ */
#include "fm.h" #include "fm.h"
#include "myctype.h" #include "myctype.h"
#include "regex.h" #include "regex.h"
@@ -295,7 +295,9 @@ reAnchorAny(Buffer *buf, char *re,
if ((re = regexCompile(re, 1)) != NULL) { if ((re = regexCompile(re, 1)) != NULL) {
return re; return re;
} }
for (l = buf->firstLine; l != NULL; l = l->next) { for (l = MarkAllPages ? buf->firstLine : buf->topLine; l != NULL &&
(MarkAllPages || l->linenumber < buf->topLine->linenumber + LASTLINE);
l = l->next) {
p = l->lineBuf; p = l->lineBuf;
for (;;) { for (;;) {
if (regexMatch(p, &l->lineBuf[l->len] - p, p == l->lineBuf) == 1) { if (regexMatch(p, &l->lineBuf[l->len] - p, p == l->lineBuf) == 1) {

3
fm.h
View File

@@ -1,4 +1,4 @@
/* $Id: fm.h,v 1.57 2002/03/19 16:06:52 ukai Exp $ */ /* $Id: fm.h,v 1.58 2002/03/29 16:39:37 ukai Exp $ */
/* /*
* w3m: WWW wo Miru utility * w3m: WWW wo Miru utility
* *
@@ -866,6 +866,7 @@ global int FoldTextarea init(FALSE);
#define DEFAULT_URL_CURRENT 1 #define DEFAULT_URL_CURRENT 1
#define DEFAULT_URL_LINK 2 #define DEFAULT_URL_LINK 2
global int DefaultURLString init(DEFAULT_URL_EMPTY); global int DefaultURLString init(DEFAULT_URL_EMPTY);
global int MarkAllPages init(FALSE);
#ifdef USE_MIGEMO #ifdef USE_MIGEMO
global int use_migemo init(FALSE); global int use_migemo init(FALSE);

6
rc.c
View File

@@ -1,4 +1,4 @@
/* $Id: rc.c,v 1.40 2002/02/19 15:25:19 ukai Exp $ */ /* $Id: rc.c,v 1.41 2002/03/29 16:39:37 ukai Exp $ */
/* /*
* Initialization file etc. * Initialization file etc.
*/ */
@@ -138,6 +138,7 @@ static char *config_file = NULL;
#define CMT_ACCEPTLANG "<22><><EFBFBD><EFBFBD><EFBFBD>Ĥ<EFBFBD><C4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Accept-Language:)" #define CMT_ACCEPTLANG "<22><><EFBFBD><EFBFBD><EFBFBD>Ĥ<EFBFBD><C4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Accept-Language:)"
#define CMT_DOCUMENTCODE "ʸ<><CAB8><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" #define CMT_DOCUMENTCODE "ʸ<><CAB8><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#define CMT_SYSTEMCODE "<22><><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" #define CMT_SYSTEMCODE "<22><><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
#define CMT_MARK_ALL_PAGES "<22><><EFBFBD>ƤΥڡ<CEA5><DAA1><EFBFBD><EFBFBD><EFBFBD>URL<52><4C><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>󥯤ˤ<F3A5AFA4><CBA4><EFBFBD>"
#define CMT_WRAP "<22>ޤ<EFBFBD><DEA4>֤<EFBFBD><D6A4><EFBFBD><EFBFBD><EFBFBD>" #define CMT_WRAP "<22>ޤ<EFBFBD><DEA4>֤<EFBFBD><D6A4><EFBFBD><EFBFBD><EFBFBD>"
#define CMT_VIEW_UNSEENOBJECTS "<22>طʲ<D8B7><CAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؤΥ<D8A4><CEA5>󥯤<EFBFBD><F3A5AFA4><EFBFBD><EFBFBD><EFBFBD>" #define CMT_VIEW_UNSEENOBJECTS "<22>طʲ<D8B7><CAB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؤΥ<D8A4><CEA5>󥯤<EFBFBD><F3A5AFA4><EFBFBD><EFBFBD><EFBFBD>"
#ifdef __EMX__ #ifdef __EMX__
@@ -272,6 +273,7 @@ static char *config_file = NULL;
#define CMT_ACCEPTLANG "Accept-Language" #define CMT_ACCEPTLANG "Accept-Language"
/* #define CMT_DOCUMENTCODE "Document Charset" */ /* #define CMT_DOCUMENTCODE "Document Charset" */
/* #define CMT_SYSTEMCODE "System Kanji Code" */ /* #define CMT_SYSTEMCODE "System Kanji Code" */
#define CMT_MARK_ALL_PAGES "Mark URL-like strings as anchors in all pages"
#define CMT_WRAP "Wrap search" #define CMT_WRAP "Wrap search"
#define CMT_VIEW_UNSEENOBJECTS "Display unseenobjects (e.g. bgimage) tag" #define CMT_VIEW_UNSEENOBJECTS "Display unseenobjects (e.g. bgimage) tag"
#ifdef __EMX__ #ifdef __EMX__
@@ -539,6 +541,8 @@ struct param_ptr params3[] = {
{"vi_prec_num", P_INT, PI_ONOFF, (void *)&vi_prec_num, CMT_VI_PREC_NUM, {"vi_prec_num", P_INT, PI_ONOFF, (void *)&vi_prec_num, CMT_VI_PREC_NUM,
NULL}, NULL},
#endif #endif
{"mark_all_pages", P_INT, PI_ONOFF, (void *)&MarkAllPages,
CMT_MARK_ALL_PAGES, NULL},
{"wrap_search", P_INT, PI_ONOFF, (void *)&WrapDefault, CMT_WRAP, NULL}, {"wrap_search", P_INT, PI_ONOFF, (void *)&WrapDefault, CMT_WRAP, NULL},
{"ignorecase_search", P_INT, PI_ONOFF, (void *)&IgnoreCase, {"ignorecase_search", P_INT, PI_ONOFF, (void *)&IgnoreCase,
CMT_IGNORE_CASE, NULL}, CMT_IGNORE_CASE, NULL},