Update to w3m-0.2.1-inu-1.6.

This commit is contained in:
Akinori Ito
2001-11-15 00:32:13 +00:00
parent 6c63633545
commit 85da7ee692
82 changed files with 10900 additions and 217 deletions

22
regex.c
View File

@@ -210,6 +210,7 @@ regmatch(regexchar * re, char *str, int len, int firstp, char **lastpos)
char *lpos, *llpos = NULL;
longchar k;
*lastpos = NULL;
#ifdef REGEX_DEBUG
debugre(re, str);
#endif /* REGEX_DEBUG */
@@ -220,21 +221,16 @@ regmatch(regexchar * re, char *str, int len, int firstp, char **lastpos)
re++;
}
else if (re->mode & RE_ANYTIME) {
short matched = 0, ok = 0;
do {
short matched, ok = 0;
for (;;) {
matched = 0;
if (regmatch(re + 1, p, ep - p, firstp, &lpos) == 1) {
llpos = lpos;
matched = 1;
}
else if (matched) {
ok = 1;
break;
}
if (p >= ep) {
if (matched)
ok = 1;
if (p >= ep)
break;
}
#ifdef JP_CHARSET
if (IS_KANJI1(*p)) {
k = RE_KANJI(p);
@@ -243,8 +239,6 @@ regmatch(regexchar * re, char *str, int len, int firstp, char **lastpos)
*lastpos = llpos;
p += 2;
}
else if (matched)
ok = 1;
else
break;
}
@@ -257,12 +251,10 @@ regmatch(regexchar * re, char *str, int len, int firstp, char **lastpos)
if (lastpos != NULL)
*lastpos = llpos;
}
else if (matched)
ok = 1;
else
break;
break;
}
} while (!ok);
}
if (lastpos != NULL)
*lastpos = llpos;
return ok;