aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--oniguruma.h9
-rw-r--r--regcomp.c2
-rw-r--r--regexec.c14
4 files changed, 24 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 0647cbc98f..74292afc14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Sat Sep 23 20:54:28 2006 K.Kosako <sndgk393 AT ybb.ne.jp>
+
+ * oniguruma.h: Version 4.4.4
+
+ * regexec.c: ditto.
+
+ * regcomp.c ditto.
+
Sat Sep 23 08:35:53 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/rdoc/ri/ri_options.rb: prevent NameError. [ruby-dev:29597]
diff --git a/oniguruma.h b/oniguruma.h
index b1e8b38f74..a29e2e52c6 100644
--- a/oniguruma.h
+++ b/oniguruma.h
@@ -36,7 +36,7 @@ extern "C" {
#define ONIGURUMA
#define ONIGURUMA_VERSION_MAJOR 4
#define ONIGURUMA_VERSION_MINOR 4
-#define ONIGURUMA_VERSION_TEENY 0
+#define ONIGURUMA_VERSION_TEENY 4
#ifdef __cplusplus
# ifndef HAVE_PROTOTYPES
@@ -47,6 +47,13 @@ extern "C" {
# endif
#endif
+/* escape Mac OS X/Xcode 2.4/gcc 4.0.1 problem */
+#if defined(__APPLE__) && defined(__GNUC__) && __GNUC__ >= 4
+# ifndef HAVE_STDARG_PROTOTYPES
+# define HAVE_STDARG_PROTOTYPES 1
+# endif
+#endif
+
#ifndef P_
#if defined(__STDC__) || defined(_WIN32)
# define P_(args) args
diff --git a/regcomp.c b/regcomp.c
index 844f4f7ee2..9b862657d8 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3653,7 +3653,7 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env)
#define ALLOWED_ANCHOR_IN_LB \
( ANCHOR_LOOK_BEHIND | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION )
#define ALLOWED_ANCHOR_IN_LB_NOT \
-( ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION )
+( ANCHOR_LOOK_BEHIND | ANCHOR_LOOK_BEHIND_NOT | ANCHOR_BEGIN_LINE | ANCHOR_END_LINE | ANCHOR_BEGIN_BUF | ANCHOR_BEGIN_POSITION )
case ANCHOR_LOOK_BEHIND:
{
diff --git a/regexec.c b/regexec.c
index 1ba060f0ec..1a9567a3d0 100644
--- a/regexec.c
+++ b/regexec.c
@@ -3066,19 +3066,19 @@ bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end,
(int )text, (int )text_end, (int )text_range);
#endif
- tlen1 = (target_end - target) - 1;
- end = text_range + tlen1;
- if (end > text_end)
- end = text_end;
-
tail = target_end - 1;
+ tlen1 = tail - target;
+ end = text_range;
+ if (end + tlen1 > text_end)
+ end = text_end - tlen1;
+
s = text;
if (IS_NULL(reg->int_map)) {
while (s < end) {
p = se = s + tlen1;
t = tail;
- while (*p == *t && t >= target) {
+ while (t >= target && *p == *t) {
p--; t--;
}
if (t < target) return (UChar* )s;
@@ -3094,7 +3094,7 @@ bm_search_notrev(regex_t* reg, const UChar* target, const UChar* target_end,
while (s < end) {
p = se = s + tlen1;
t = tail;
- while (*p == *t && t >= target) {
+ while (t >= target && *p == *t) {
p--; t--;
}
if (t < target) return (UChar* )s;