2002-01-11 Akinori Ito <aito@fw.ipsj.or.jp>
* [w3m-dev 02819] * regex.c (RegexMatch): loop condition changed (from < to <= ) * regex.c (regmatch_iter): end condition changed (from >= to >) * search.c (forwardSearch): next search fix
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2002-01-11 Akinori Ito <aito@fw.ipsj.or.jp>
|
||||||
|
|
||||||
|
* [w3m-dev 02819]
|
||||||
|
* regex.c (RegexMatch): loop condition changed (from < to <= )
|
||||||
|
* regex.c (regmatch_iter): end condition changed (from >= to >)
|
||||||
|
* search.c (forwardSearch): next search fix
|
||||||
|
|
||||||
2002-01-11 Fumitoshi UKAI <ukai@debian.or.jp>
|
2002-01-11 Fumitoshi UKAI <ukai@debian.or.jp>
|
||||||
|
|
||||||
* [w3m-dev 02818]
|
* [w3m-dev 02818]
|
||||||
@@ -1842,4 +1849,4 @@
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-0.2.1
|
* import w3m-0.2.1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.206 2002/01/10 16:11:32 ukai Exp $
|
$Id: ChangeLog,v 1.207 2002/01/11 02:24:13 a-ito Exp $
|
||||||
|
|||||||
6
regex.c
6
regex.c
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: regex.c,v 1.9 2002/01/10 16:11:32 ukai Exp $ */
|
/* $Id: regex.c,v 1.10 2002/01/11 02:24:13 a-ito Exp $ */
|
||||||
/*
|
/*
|
||||||
* regex: Regular expression pattern match library
|
* regex: Regular expression pattern match library
|
||||||
*
|
*
|
||||||
@@ -265,7 +265,7 @@ RegexMatch(Regex *re, char *str, int len, int firstp)
|
|||||||
len = strlen(str);
|
len = strlen(str);
|
||||||
re->position = NULL;
|
re->position = NULL;
|
||||||
ep = str + len;
|
ep = str + len;
|
||||||
for (p = str; p < ep; p++) {
|
for (p = str; p <= ep; p++) {
|
||||||
lpos = NULL;
|
lpos = NULL;
|
||||||
re->lposition = NULL;
|
re->lposition = NULL;
|
||||||
for (r = re; r != NULL; r = r->alt_regex) {
|
for (r = re; r != NULL; r = r->alt_regex) {
|
||||||
@@ -554,7 +554,7 @@ regmatch_iter(struct MatchingContext1 *c,
|
|||||||
c->re++;
|
c->re++;
|
||||||
c->firstp = 0;
|
c->firstp = 0;
|
||||||
}
|
}
|
||||||
if (c->str >= c->end_p) {
|
if (c->str > c->end_p) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5
search.c
5
search.c
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: search.c,v 1.5 2001/12/23 14:44:00 ukai Exp $ */
|
/* $Id: search.c,v 1.6 2002/01/11 02:24:13 a-ito Exp $ */
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include "regex.h"
|
#include "regex.h"
|
||||||
|
|
||||||
@@ -23,7 +23,8 @@ forwardSearch(Buffer *buf, char *str)
|
|||||||
if (l->propBuf[pos] & PC_KANJI2)
|
if (l->propBuf[pos] & PC_KANJI2)
|
||||||
pos++;
|
pos++;
|
||||||
#endif
|
#endif
|
||||||
if (regexMatch(&l->lineBuf[pos], l->len - pos, 0) == 1) {
|
if (pos < l->len &&
|
||||||
|
regexMatch(&l->lineBuf[pos], l->len - pos, 0) == 1) {
|
||||||
matchedPosition(&first, &last);
|
matchedPosition(&first, &last);
|
||||||
buf->pos = first - l->lineBuf;
|
buf->pos = first - l->lineBuf;
|
||||||
arrangeCursor(buf);
|
arrangeCursor(buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user