diff options
author | kosako <kosako@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-23 12:01:58 +0000 |
---|---|---|
committer | kosako <kosako@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-23 12:01:58 +0000 |
commit | d5a00279f44dcb9dcd37c767bcd2c51a5101431d (patch) | |
tree | b1e293d0baac3b58f50d661354250fdd4f56ebbf | |
parent | b6ec2b7c6de88f457d480e9a6892b84c133bd92c (diff) |
merge Oniguruma 4.4.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | oniguruma.h | 9 | ||||
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | regexec.c | 14 |
4 files changed, 24 insertions, 9 deletions
@@ -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 <[email protected]> * 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 @@ -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: { @@ -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; |