mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
updated to oniguruma to 5.9.5
This commit is contained in:
parent
8cde747336
commit
f5ebea91b0
@ -1,5 +1,24 @@
|
||||
History
|
||||
|
||||
2013/10/21: Version 5.9.5
|
||||
|
||||
2013/10/21: [impl] escape warnings for -Wall. (regparse.c)
|
||||
2013/10/21: [bug] fixes an issue on Windows x64. (thanks Anatoliy Belsky)
|
||||
The issue was discovered in PHP, see https://bugs.php.net/64769.
|
||||
2013/10/21: [impl] remove unused variable. (regcomp.c)
|
||||
|
||||
2013/04/04: Version 5.9.4
|
||||
|
||||
2013/04/04: [dev] remove Makefile.in from git repository.
|
||||
2013/04/04: [dist] add oniguruma.pc.in file. (for pkg-config)
|
||||
(thanks Giulio Paci)
|
||||
|
||||
2012/10/26: Version 5.9.3
|
||||
|
||||
2012/10/15: remove warnings "test: =: unary operator expected" in ./configure.
|
||||
(thanks t_okazaki)
|
||||
2012/10/15: fix print_tree ENCLOSE_OPTION bug. (thanks Suraj N. Kurapati)
|
||||
|
||||
2010/01/09: Version 5.9.2
|
||||
|
||||
2010/01/05: [bug] fix utf16be_code_to_mbc() and utf16le_code_to_mbc().
|
||||
@ -878,7 +897,7 @@ History
|
||||
2004/10/18: [impl] (thanks Imai Yasumasa)
|
||||
enclose #include <sys/types.h> by #ifndef __BORLANDC__.
|
||||
2004/10/18: [bug] (thanks Imai Yasumasa)
|
||||
memory access violation in select_opt_exact_info().
|
||||
memory acess violation in select_opt_exact_info().
|
||||
2004/09/25: [dist] fix doc/API and doc/API.ja.
|
||||
2004/09/25: [bug] fix OP_SEMI_END_BUF process in match_at() for
|
||||
the case USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE
|
||||
@ -1812,7 +1831,7 @@ History
|
||||
2003/01/31: [impl] rename TTRANS() to TOLOWER().
|
||||
2003/01/30: [bug] .c.o --> .c.obj in win32\Makefile.
|
||||
2003/01/30: [impl] add -DNOT_RUBY to Makefile.in.
|
||||
NOT_RUBY is referred in regint.h for escape double
|
||||
NOT_RUBY is refered in regint.h for escape double
|
||||
including config.h.
|
||||
2003/01/30: [impl] when string hasn't case ambiguity, don't compile
|
||||
to ignore case opcode.
|
||||
|
@ -57,6 +57,10 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
@ -72,21 +76,24 @@
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of a `short', as computed by sizeof. */
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
@ -101,8 +108,14 @@
|
||||
/* Define if combination explosion check */
|
||||
#undef USE_COMBINATION_EXPLOSION_CHECK
|
||||
|
||||
/* Define if enable CR+NL as line terminator */
|
||||
#undef USE_CRNL_AS_LINE_TERMINATOR
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
@ -8,7 +8,7 @@
|
||||
<h1>Oniguruma</h1> (<a href="index_ja.html">Japanese</a>)
|
||||
|
||||
<p>
|
||||
(c) K.Kosako, updated at: 2010/01/09
|
||||
(c) K.Kosako, updated at: 2013/10/21
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
@ -16,7 +16,7 @@
|
||||
<dt><b>What's new</b>
|
||||
</font>
|
||||
<ul>
|
||||
<li>2010/01/09: Version 5.9.2 released.</li>
|
||||
<li>2013/10/21: Version 5.9.5 released.</li>
|
||||
<li>2007/08/16: Version 4.7.1 released.</li>
|
||||
<li>2007/06/20: Version 2.5.9 released.</li>
|
||||
<li>2007/06/20: Maintainer of 2.x was changed.</li>
|
||||
@ -62,8 +62,8 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br>
|
||||
|
||||
<dt><b>Download:</b>
|
||||
<ul>
|
||||
<li> <a href="archive/onig-5.9.2.tar.gz">Latest release version 5.9.2</a> (2010/01/09) <a href="HISTORY_5X.txt">Change Log</a>
|
||||
<li> <a href="archive/onig-5.9.1.tar.gz">5.9.1</a> (2007/12/22)
|
||||
<li> <a href="archive/onig-5.9.5.tar.gz">Latest release version 5.9.5</a> (2013/10/21) <a href="HISTORY_5X.txt">Change Log</a>
|
||||
<li> <a href="archive/onig-5.9.4.tar.gz">5.9.4</a> (2013/04/04)
|
||||
<li> <a href="archive/onig-4.7.1.tar.gz">Latest release version 4.7.1</a> (2007/08/16) <a href="HISTORY_4X.txt">Change Log</a>
|
||||
<li> <a href="archive/onig-4.7.0.tar.gz">4.7.0</a> (2007/06/18)
|
||||
<li> <a href="archive/onigd2_5_9.tar.gz">Latest release version 2.5.9</a> (2007/06/20) <a href="HISTORY_2X.txt">Change Log</a>
|
||||
@ -78,7 +78,7 @@ About 2.x, please contact him.<br>
|
||||
* 2.x supports Ruby1.6/1.8.<br>
|
||||
|
||||
<br>
|
||||
<dt><b>Documents:</b> (version 5.9.2)
|
||||
<dt><b>Documents:</b> (version 5.9.5)
|
||||
<ul>
|
||||
<li> <a href="doc/RE.txt">Regular Expressions</a>
|
||||
<a href="doc/RE.ja.txt">(Japanese: EUC-JP)</a>
|
||||
@ -103,8 +103,11 @@ About 2.x, please contact him.<br>
|
||||
<br>
|
||||
<dt><b>Links:</b>
|
||||
<ul>
|
||||
<li> <a href="http://www.perzl.org/aix/index.php?n=Main.Oniguruma">AIX Open Source Packages</a>
|
||||
<li> <a href="https://aur.archlinux.org/packages/oniguruma/">Arch Linux Package</a>
|
||||
<li> <a href="http://homepage3.nifty.com/k-takata/mysoft/bregonig.html">bregonig.dll (Win32)</a> (Japanese page)
|
||||
<li> <a href="http://www.halbiz.com/osaru/cnregex.html">cnRegex 4D Plugin (Mac OS X)</a> (Japanese page)
|
||||
<li> <a href="http://limechat.net/cocoaoniguruma/">CocoaOniguruma</a>
|
||||
<li> <a href="http://kmaebashi.com/">crowbar</a> (Japanese page)
|
||||
<li> <a href="http://oniguruma5.darwinports.com">Darwin Ports (Mac OS X)</a>
|
||||
<li> <a href="http://homepage2.nifty.com/Km/onig.htm">Delphi interface (Win32)</a> (Japanese page)
|
||||
@ -121,7 +124,7 @@ About 2.x, please contact him.<br>
|
||||
<li> <a href="http://mongoose.jp/">mongoose</a> (Japanese page)
|
||||
<li> <a href="http://www.irori.org/tool/mregexp.html">mregexp</a> (Japanese page)
|
||||
<li> <a href="http://ochusha.sourceforge.jp/">Ochusha</a> (Japanese page)
|
||||
<li> <a href="http://www8.ocn.ne.jp/%7esonoisa/OgreKit/index.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (Japanese page)
|
||||
<li> <a href="http://sonoisa.github.com/ogrekit/About_%28English%29.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (Japanese page)
|
||||
<li> <a href="http://www.kanetaka.net/4dapi/wiki4d.dll/4dcgi/wiki.cgi?plugins-oniguruma">OnigRegexp</a> (Japanese page)
|
||||
<li> <a href="http://rubyforge.org/projects/oniguruma">Oniguruma for Ruby</a>
|
||||
<li> <a href="http://openspace.timedia.co.jp/~yasuyuki/wiliki/wiliki.cgi?Oniguruma-mysqld&l=jp">Oniguruma-mysqld</a>
|
||||
@ -140,6 +143,7 @@ About 2.x, please contact him.<br>
|
||||
<li> <a href="http://sourceforge.jp/projects/ttssh2/">TeraTerm (Win32)</a>
|
||||
<li> <a href="http://www8.ocn.ne.jp/~sonoisa/TiddlyWikiPod/">TiddlyWikiPod (Mac OS X)</a>
|
||||
<li> <a href="http://www.cyanworks.net/mac.html">TunesTEXT (Mac OS X)</a>
|
||||
<li> <a href="https://code.google.com/p/oniguruma-visualworks/">oniguruma-visualworks</a>
|
||||
<li> <a href="http://sourceforge.jp/projects/frogger/">XML parser</a>
|
||||
<li> <a href="http://www.yokkasoft.net/">YokkaSoft (Win32)</a> (Japanese page)
|
||||
<li> <a href="http://www.hi-ho.ne.jp/kuze/tool.htm">Zed (Win32)</a> (Japanese page)
|
||||
|
@ -8,7 +8,7 @@
|
||||
<h1>鬼車</h1>
|
||||
|
||||
<p>
|
||||
(c) K.Kosako, 最終更新: 2010/01/09
|
||||
(c) K.Kosako, 最終更新: 2013/04/04
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
@ -16,7 +16,7 @@
|
||||
<dt><b>更新情報</b>
|
||||
</font>
|
||||
<ul>
|
||||
<li>2010/01/09: Version 5.9.2 リリース</li>
|
||||
<li>2013/10/21: Version 5.9.5 リリース</li>
|
||||
<li>2007/08/16: Version 4.7.1 リリース</li>
|
||||
<li>2007/06/20: Version 2.5.9 リリース</li>
|
||||
<li>2007/06/20: 2.xの保守担当者を変更</li>
|
||||
@ -62,8 +62,8 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br>
|
||||
|
||||
<dt><b>ダウンロード:</b>
|
||||
<ul>
|
||||
<li> <a href="archive/onig-5.9.2.tar.gz">5.9.2 最新版</a> (2010/01/09) <a href="HISTORY_5X.txt">更新履歴</a>
|
||||
<li> <a href="archive/onig-5.9.1.tar.gz">5.9.1</a> (2007/12/22)
|
||||
<li> <a href="archive/onig-5.9.5.tar.gz">5.9.5 最新版</a> (2013/10/21) <a href="HISTORY_5X.txt">更新履歴</a>
|
||||
<li> <a href="archive/onig-5.9.4.tar.gz">5.9.4</a> (2013/04/04)
|
||||
<li> <a href="archive/onig-4.7.1.tar.gz">4.7.1 最新版</a> (2007/08/16) <a href="HISTORY_4X.txt">更新履歴</a>
|
||||
<li> <a href="archive/onig-4.7.0.tar.gz">4.7.0</a> (2007/06/18)
|
||||
<li> <a href="archive/onigd2_5_9.tar.gz">2.5.9 最新版</a> (2007/06/20) <a href="HISTORY_2X.txt">更新履歴</a>
|
||||
@ -78,7 +78,7 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br>
|
||||
* 2.xはRuby1.6/1.8組込みライブラリとして動作する。 (2006年末で保守を終了)<br>
|
||||
|
||||
<br>
|
||||
<dt><b>ドキュメント:</b> (version 5.9.2)
|
||||
<dt><b>ドキュメント:</b> (version 5.9.5)
|
||||
<ul>
|
||||
<li> <a href="doc/RE.txt">正規表現</a>
|
||||
<a href="doc/RE.ja.txt">(日本語: EUC-JP)</a>
|
||||
@ -103,8 +103,11 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br>
|
||||
<br>
|
||||
<dt><b>リンク:</b>
|
||||
<ul>
|
||||
<li> <a href="http://www.perzl.org/aix/index.php?n=Main.Oniguruma">AIX Open Source Packages</a>
|
||||
<li> <a href="https://aur.archlinux.org/packages/oniguruma/">Arch Linux Package</a>
|
||||
<li> <a href="http://homepage3.nifty.com/k-takata/mysoft/bregonig.html">bregonig.dll (Win32)</a> (日本語)
|
||||
<li> <a href="http://www.halbiz.com/osaru/cnregex.html">cnRegex 4D Plugin (Mac OS X)</a> (日本語)
|
||||
<li> <a href="http://limechat.net/cocoaoniguruma/index_ja.html">CocoaOniguruma</a> (日本語)
|
||||
<li> <a href="http://kmaebashi.com/">crowbar</a> (日本語)
|
||||
<li> <a href="http://oniguruma5.darwinports.com">Darwin Ports (Mac OS X)</a>
|
||||
<li> <a href="http://homepage2.nifty.com/Km/onig.htm">Delphi interface (Win32)</a> (日本語)
|
||||
@ -121,7 +124,7 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br>
|
||||
<li> <a href="http://mongoose.jp/">mongoose</a> (日本語)
|
||||
<li> <a href="http://www.irori.org/tool/mregexp.html">mregexp</a> (日本語)
|
||||
<li> <a href="http://ochusha.sourceforge.jp/">おちゅ〜しゃ</a> (日本語)
|
||||
<li> <a href="http://www8.ocn.ne.jp/%7esonoisa/OgreKit/index.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (日本語)
|
||||
<li> <a href="http://sonoisa.github.com/ogrekit/About.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (日本語)
|
||||
<li> <a href="http://www.kanetaka.net/4dapi/wiki4d.dll/4dcgi/wiki.cgi?plugins-oniguruma">OnigRegexp</a> (日本語)
|
||||
<li> <a href="http://rubyforge.org/projects/oniguruma">Oniguruma for Ruby</a>
|
||||
<li> <a href="http://openspace.timedia.co.jp/~yasuyuki/wiliki/wiliki.cgi?Oniguruma-mysqld&l=jp">Oniguruma-mysqld</a>
|
||||
@ -140,6 +143,7 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br>
|
||||
<li> <a href="http://sourceforge.jp/projects/ttssh2/">TeraTerm (Win32)</a>
|
||||
<li> <a href="http://www8.ocn.ne.jp/~sonoisa/TiddlyWikiPod/">TiddlyWikiPod (Mac OS X)</a>
|
||||
<li> <a href="http://www.cyanworks.net/mac.html">TunesTEXT (Mac OS X)</a>
|
||||
<li> <a href="https://code.google.com/p/oniguruma-visualworks/">oniguruma-visualworks</a>
|
||||
<li> <a href="http://sourceforge.jp/projects/frogger/">XML parser</a>
|
||||
<li> <a href="http://www.yokkasoft.net/">YokkaSoft (Win32)</a> (日本語)
|
||||
<li> <a href="http://www.hi-ho.ne.jp/kuze/tool.htm">Zed (Win32)</a> (日本語)
|
||||
|
@ -1,310 +0,0 @@
|
||||
/**********************************************************************
|
||||
|
||||
onigcmpt200.h - Oniguruma (regular expression library)
|
||||
|
||||
Copyright (C) 2004 K.Kosako (kosako@sofnec.co.jp)
|
||||
|
||||
**********************************************************************/
|
||||
#ifndef ONIGCMPT200_H
|
||||
#define ONIGCMPT200_H
|
||||
|
||||
/* constants */
|
||||
#define REG_MAX_ERROR_MESSAGE_LEN ONIG_MAX_ERROR_MESSAGE_LEN
|
||||
|
||||
#define RegCharEncoding OnigEncoding
|
||||
|
||||
#define REG_ENCODING_ASCII ONIG_ENCODING_ASCII
|
||||
#define REG_ENCODING_ISO_8859_1 ONIG_ENCODING_ISO_8859_1
|
||||
#define REG_ENCODING_ISO_8859_15 ONIG_ENCODING_ISO_8859_15
|
||||
#define REG_ENCODING_UTF8 ONIG_ENCODING_UTF8
|
||||
#define REG_ENCODING_EUC_JP ONIG_ENCODING_EUC_JP
|
||||
#define REG_ENCODING_SJIS ONIG_ENCODING_SJIS
|
||||
#define REG_ENCODING_BIG5 ONIG_ENCODING_BIG5
|
||||
#define REG_ENCODING_UNDEF ONIG_ENCODING_UNDEF
|
||||
|
||||
/* Don't use REGCODE_XXXX. (obsoleted) */
|
||||
#define REGCODE_UNDEF REG_ENCODING_UNDEF
|
||||
#define REGCODE_ASCII REG_ENCODING_ASCII
|
||||
#define REGCODE_UTF8 REG_ENCODING_UTF8
|
||||
#define REGCODE_EUCJP REG_ENCODING_EUC_JP
|
||||
#define REGCODE_SJIS REG_ENCODING_SJIS
|
||||
|
||||
/* Don't use REGCODE_XXXX. (obsoleted) */
|
||||
#define MBCTYPE_ASCII RE_MBCTYPE_ASCII
|
||||
#define MBCTYPE_EUC RE_MBCTYPE_EUC
|
||||
#define MBCTYPE_SJIS RE_MBCTYPE_SJIS
|
||||
#define MBCTYPE_UTF8 RE_MBCTYPE_UTF8
|
||||
|
||||
typedef unsigned char* RegTransTableType;
|
||||
#define RegOptionType OnigOptionType
|
||||
#define RegDistance OnigDistance
|
||||
|
||||
#define REG_OPTION_DEFAULT ONIG_OPTION_DEFAULT
|
||||
|
||||
/* options */
|
||||
#define REG_OPTION_NONE ONIG_OPTION_NONE
|
||||
#define REG_OPTION_SINGLELINE ONIG_OPTION_SINGLELINE
|
||||
#define REG_OPTION_MULTILINE ONIG_OPTION_MULTILINE
|
||||
#define REG_OPTION_IGNORECASE ONIG_OPTION_IGNORECASE
|
||||
#define REG_OPTION_EXTEND ONIG_OPTION_EXTEND
|
||||
#define REG_OPTION_FIND_LONGEST ONIG_OPTION_FIND_LONGEST
|
||||
#define REG_OPTION_FIND_NOT_EMPTY ONIG_OPTION_FIND_NOT_EMPTY
|
||||
#define REG_OPTION_NEGATE_SINGLELINE ONIG_OPTION_NEGATE_SINGLELINE
|
||||
#define REG_OPTION_DONT_CAPTURE_GROUP ONIG_OPTION_DONT_CAPTURE_GROUP
|
||||
#define REG_OPTION_CAPTURE_GROUP ONIG_OPTION_CAPTURE_GROUP
|
||||
#define REG_OPTION_NOTBOL ONIG_OPTION_NOTBOL
|
||||
#define REG_OPTION_NOTEOL ONIG_OPTION_NOTEOL
|
||||
#define REG_OPTION_POSIX_REGION ONIG_OPTION_POSIX_REGION
|
||||
|
||||
#define REG_OPTION_ON ONIG_OPTION_ON
|
||||
#define REG_OPTION_OFF ONIG_OPTION_OFF
|
||||
#define IS_REG_OPTION_ON ONIG_IS_OPTION_ON
|
||||
|
||||
/* syntax */
|
||||
#define RegSyntaxType OnigSyntaxType
|
||||
|
||||
#define RegSyntaxPosixBasic OnigSyntaxPosixBasic
|
||||
#define RegSyntaxPosixExtended OnigSyntaxPosixExtended
|
||||
#define RegSyntaxEmacs OnigSyntaxEmacs
|
||||
#define RegSyntaxGrep OnigSyntaxGrep
|
||||
#define RegSyntaxGnuRegex OnigSyntaxGnuRegex
|
||||
#define RegSyntaxJava OnigSyntaxJava
|
||||
#define RegSyntaxPerl OnigSyntaxPerl
|
||||
#define RegSyntaxRuby OnigSyntaxRuby
|
||||
|
||||
#define REG_SYNTAX_POSIX_BASIC ONIG_SYNTAX_POSIX_BASIC
|
||||
#define REG_SYNTAX_POSIX_EXTENDED ONIG_SYNTAX_POSIX_EXTENDED
|
||||
#define REG_SYNTAX_EMACS ONIG_SYNTAX_EMACS
|
||||
#define REG_SYNTAX_GREP ONIG_SYNTAX_GREP
|
||||
#define REG_SYNTAX_GNU_REGEX ONIG_SYNTAX_GNU_REGEX
|
||||
#define REG_SYNTAX_JAVA ONIG_SYNTAX_JAVA
|
||||
#define REG_SYNTAX_PERL ONIG_SYNTAX_PERL
|
||||
#define REG_SYNTAX_RUBY ONIG_SYNTAX_RUBY
|
||||
|
||||
#define REG_SYNTAX_DEFAULT ONIG_SYNTAX_DEFAULT
|
||||
#define RegDefaultSyntax OnigDefaultSyntax
|
||||
|
||||
/* syntax (operators) */
|
||||
#define REG_SYN_OP_VARIABLE_META_CHARACTERS \
|
||||
ONIG_SYN_OP_VARIABLE_META_CHARACTERS
|
||||
#define REG_SYN_OP_DOT_ANYCHAR \
|
||||
ONIG_SYN_OP_DOT_ANYCHAR
|
||||
#define REG_SYN_OP_ASTERISK_ZERO_INF \
|
||||
ONIG_SYN_OP_ASTERISK_ZERO_INF
|
||||
#define REG_SYN_OP_ESC_ASTERISK_ZERO_INF \
|
||||
ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF
|
||||
#define REG_SYN_OP_PLUS_ONE_INF \
|
||||
ONIG_SYN_OP_PLUS_ONE_INF
|
||||
#define REG_SYN_OP_ESC_PLUS_ONE_INF \
|
||||
ONIG_SYN_OP_ESC_PLUS_ONE_INF
|
||||
#define REG_SYN_OP_QMARK_ZERO_ONE \
|
||||
ONIG_SYN_OP_QMARK_ZERO_ONE
|
||||
#define REG_SYN_OP_ESC_QMARK_ZERO_ONE \
|
||||
ONIG_SYN_OP_ESC_QMARK_ZERO_ONE
|
||||
#define REG_SYN_OP_BRACE_INTERVAL \
|
||||
ONIG_SYN_OP_BRACE_INTERVAL
|
||||
#define REG_SYN_OP_ESC_BRACE_INTERVAL \
|
||||
ONIG_SYN_OP_ESC_BRACE_INTERVAL
|
||||
#define REG_SYN_OP_VBAR_ALT \
|
||||
ONIG_SYN_OP_VBAR_ALT
|
||||
#define REG_SYN_OP_ESC_VBAR_ALT \
|
||||
ONIG_SYN_OP_ESC_VBAR_ALT
|
||||
#define REG_SYN_OP_LPAREN_SUBEXP \
|
||||
ONIG_SYN_OP_LPAREN_SUBEXP
|
||||
#define REG_SYN_OP_ESC_LPAREN_SUBEXP \
|
||||
ONIG_SYN_OP_ESC_LPAREN_SUBEXP
|
||||
#define REG_SYN_OP_ESC_AZ_BUF_ANCHOR \
|
||||
ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR
|
||||
#define REG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR \
|
||||
ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR
|
||||
#define REG_SYN_OP_DECIMAL_BACKREF \
|
||||
ONIG_SYN_OP_DECIMAL_BACKREF
|
||||
#define REG_SYN_OP_BRACKET_CC \
|
||||
ONIG_SYN_OP_BRACKET_CC
|
||||
#define REG_SYN_OP_ESC_W_WORD \
|
||||
ONIG_SYN_OP_ESC_W_WORD
|
||||
#define REG_SYN_OP_ESC_LTGT_WORD_BEGIN_END \
|
||||
ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END
|
||||
#define REG_SYN_OP_ESC_B_WORD_BOUND \
|
||||
ONIG_SYN_OP_ESC_B_WORD_BOUND
|
||||
#define REG_SYN_OP_ESC_S_WHITE_SPACE \
|
||||
ONIG_SYN_OP_ESC_S_WHITE_SPACE
|
||||
#define REG_SYN_OP_ESC_D_DIGIT \
|
||||
ONIG_SYN_OP_ESC_D_DIGIT
|
||||
#define REG_SYN_OP_LINE_ANCHOR \
|
||||
ONIG_SYN_OP_LINE_ANCHOR
|
||||
#define REG_SYN_OP_POSIX_BRACKET \
|
||||
ONIG_SYN_OP_POSIX_BRACKET
|
||||
#define REG_SYN_OP_QMARK_NON_GREEDY \
|
||||
ONIG_SYN_OP_QMARK_NON_GREEDY
|
||||
#define REG_SYN_OP_ESC_CONTROL_CHARS \
|
||||
ONIG_SYN_OP_ESC_CONTROL_CHARS
|
||||
#define REG_SYN_OP_ESC_C_CONTROL \
|
||||
ONIG_SYN_OP_ESC_C_CONTROL
|
||||
#define REG_SYN_OP_ESC_OCTAL3 \
|
||||
ONIG_SYN_OP_ESC_OCTAL3
|
||||
#define REG_SYN_OP_ESC_X_HEX2 \
|
||||
ONIG_SYN_OP_ESC_X_HEX2
|
||||
#define REG_SYN_OP_ESC_X_BRACE_HEX8 \
|
||||
ONIG_SYN_OP_ESC_X_BRACE_HEX8
|
||||
|
||||
#define REG_SYN_OP2_ESC_CAPITAL_Q_QUOTE \
|
||||
ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE
|
||||
#define REG_SYN_OP2_QMARK_GROUP_EFFECT \
|
||||
ONIG_SYN_OP2_QMARK_GROUP_EFFECT
|
||||
#define REG_SYN_OP2_OPTION_PERL \
|
||||
ONIG_SYN_OP2_OPTION_PERL
|
||||
#define REG_SYN_OP2_OPTION_RUBY \
|
||||
ONIG_SYN_OP2_OPTION_RUBY
|
||||
#define REG_SYN_OP2_PLUS_POSSESSIVE_REPEAT \
|
||||
ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT
|
||||
#define REG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL \
|
||||
ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL
|
||||
#define REG_SYN_OP2_CCLASS_SET_OP \
|
||||
ONIG_SYN_OP2_CCLASS_SET_OP
|
||||
#define REG_SYN_OP2_QMARK_LT_NAMED_GROUP \
|
||||
ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP
|
||||
#define REG_SYN_OP2_ESC_K_NAMED_BACKREF \
|
||||
ONIG_SYN_OP2_ESC_K_NAMED_BACKREF
|
||||
#define REG_SYN_OP2_ESC_G_SUBEXP_CALL \
|
||||
ONIG_SYN_OP2_ESC_G_SUBEXP_CALL
|
||||
#define REG_SYN_OP2_ATMARK_CAPTURE_HISTORY \
|
||||
ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY
|
||||
#define REG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL \
|
||||
ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL
|
||||
#define REG_SYN_OP2_ESC_CAPITAL_M_BAR_META \
|
||||
ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META
|
||||
#define REG_SYN_OP2_ESC_V_VTAB \
|
||||
ONIG_SYN_OP2_ESC_V_VTAB
|
||||
#define REG_SYN_OP2_ESC_U_HEX4 \
|
||||
ONIG_SYN_OP2_ESC_U_HEX4
|
||||
#define REG_SYN_OP2_ESC_GNU_BUF_ANCHOR \
|
||||
ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR
|
||||
|
||||
#define REG_SYN_CONTEXT_INDEP_ANCHORS \
|
||||
ONIG_SYN_CONTEXT_INDEP_ANCHORS
|
||||
#define REG_SYN_CONTEXT_INDEP_REPEAT_OPS \
|
||||
ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS
|
||||
#define REG_SYN_CONTEXT_INVALID_REPEAT_OPS \
|
||||
ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS
|
||||
#define REG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP \
|
||||
ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP
|
||||
#define REG_SYN_ALLOW_INVALID_INTERVAL \
|
||||
ONIG_SYN_ALLOW_INVALID_INTERVAL
|
||||
#define REG_SYN_STRICT_CHECK_BACKREF \
|
||||
ONIG_SYN_STRICT_CHECK_BACKREF
|
||||
#define REG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND \
|
||||
ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND
|
||||
#define REG_SYN_CAPTURE_ONLY_NAMED_GROUP \
|
||||
ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP
|
||||
#define REG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME \
|
||||
ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME
|
||||
|
||||
#define REG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC \
|
||||
ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC
|
||||
#define REG_SYN_BACKSLASH_ESCAPE_IN_CC \
|
||||
ONIG_SYN_BACKSLASH_ESCAPE_IN_CC
|
||||
#define REG_SYN_ALLOW_EMPTY_RANGE_IN_CC \
|
||||
ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC
|
||||
#define REG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC \
|
||||
ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC
|
||||
#define REG_SYN_WARN_CC_OP_NOT_ESCAPED \
|
||||
ONIG_SYN_WARN_CC_OP_NOT_ESCAPED
|
||||
#define REG_SYN_WARN_REDUNDANT_NESTED_REPEAT \
|
||||
ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT
|
||||
|
||||
/* meta character specifiers (regex_set_meta_char()) */
|
||||
#define REG_META_CHAR_ESCAPE ONIG_META_CHAR_ESCAPE
|
||||
#define REG_META_CHAR_ANYCHAR ONIG_META_CHAR_ANYCHAR
|
||||
#define REG_META_CHAR_ANYTIME ONIG_META_CHAR_ANYTIME
|
||||
#define REG_META_CHAR_ZERO_OR_ONE_TIME ONIG_META_CHAR_ZERO_OR_ONE_TIME
|
||||
#define REG_META_CHAR_ONE_OR_MORE_TIME ONIG_META_CHAR_ONE_OR_MORE_TIME
|
||||
#define REG_META_CHAR_ANYCHAR_ANYTIME ONIG_META_CHAR_ANYCHAR_ANYTIME
|
||||
|
||||
#define REG_INEFFECTIVE_META_CHAR ONIG_INEFFECTIVE_META_CHAR
|
||||
|
||||
/* error codes */
|
||||
#define REG_IS_PATTERN_ERROR ONIG_IS_PATTERN_ERROR
|
||||
/* normal return */
|
||||
#define REG_NORMAL ONIG_NORMAL
|
||||
#define REG_MISMATCH ONIG_MISMATCH
|
||||
#define REG_NO_SUPPORT_CONFIG ONIG_NO_SUPPORT_CONFIG
|
||||
/* internal error */
|
||||
#define REGERR_MEMORY ONIGERR_MEMORY
|
||||
#define REGERR_MATCH_STACK_LIMIT_OVER ONIGERR_MATCH_STACK_LIMIT_OVER
|
||||
#define REGERR_TYPE_BUG ONIGERR_TYPE_BUG
|
||||
#define REGERR_PARSER_BUG ONIGERR_PARSER_BUG
|
||||
#define REGERR_STACK_BUG ONIGERR_STACK_BUG
|
||||
#define REGERR_UNDEFINED_BYTECODE ONIGERR_UNDEFINED_BYTECODE
|
||||
#define REGERR_UNEXPECTED_BYTECODE ONIGERR_UNEXPECTED_BYTECODE
|
||||
#define REGERR_DEFAULT_ENCODING_IS_NOT_SETTED \
|
||||
ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED
|
||||
#define REGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR \
|
||||
ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR
|
||||
/* general error */
|
||||
#define REGERR_INVALID_ARGUMENT ONIGERR_INVALID_ARGUMENT
|
||||
/* errors related to thread */
|
||||
#define REGERR_OVER_THREAD_PASS_LIMIT_COUNT \
|
||||
ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT
|
||||
|
||||
|
||||
/* must be smaller than BIT_STATUS_BITS_NUM (unsigned int * 8) */
|
||||
#define REG_MAX_CAPTURE_HISTORY_GROUP ONIG_MAX_CAPTURE_HISTORY_GROUP
|
||||
#define REG_IS_CAPTURE_HISTORY_GROUP ONIG_IS_CAPTURE_HISTORY_GROUP
|
||||
|
||||
#define REG_REGION_NOTPOS ONIG_REGION_NOTPOS
|
||||
|
||||
#define RegRegion OnigRegion
|
||||
#define RegErrorInfo OnigErrorInfo
|
||||
#define RegRepeatRange OnigRepeatRange
|
||||
|
||||
#define RegWarnFunc OnigWarnFunc
|
||||
#define regex_null_warn onig_null_warn
|
||||
#define REG_NULL_WARN ONIG_NULL_WARN
|
||||
|
||||
/* regex_t state */
|
||||
#define REG_STATE_NORMAL ONIG_STATE_NORMAL
|
||||
#define REG_STATE_SEARCHING ONIG_STATE_SEARCHING
|
||||
#define REG_STATE_COMPILING ONIG_STATE_COMPILING
|
||||
#define REG_STATE_MODIFY ONIG_STATE_MODIFY
|
||||
|
||||
#define REG_STATE ONIG_STATE
|
||||
|
||||
/* Oniguruma Native API */
|
||||
#define regex_init onig_init
|
||||
#define regex_error_code_to_str onig_error_code_to_str
|
||||
#define regex_set_warn_func onig_set_warn_func
|
||||
#define regex_set_verb_warn_func onig_set_verb_warn_func
|
||||
#define regex_new onig_new
|
||||
#define regex_free onig_free
|
||||
#define regex_recompile onig_recompile
|
||||
#define regex_search onig_search
|
||||
#define regex_match onig_match
|
||||
#define regex_region_new onig_region_new
|
||||
#define regex_region_free onig_region_free
|
||||
#define regex_region_copy onig_region_copy
|
||||
#define regex_region_clear onig_region_clear
|
||||
#define regex_region_resize onig_region_resize
|
||||
#define regex_name_to_group_numbers onig_name_to_group_numbers
|
||||
#define regex_name_to_backref_number onig_name_to_backref_number
|
||||
#define regex_foreach_name onig_foreach_name
|
||||
#define regex_number_of_names onig_number_of_names
|
||||
#define regex_get_encoding onig_get_encoding
|
||||
#define regex_get_options onig_get_options
|
||||
#define regex_get_syntax onig_get_syntax
|
||||
#define regex_set_default_syntax onig_set_default_syntax
|
||||
#define regex_copy_syntax onig_copy_syntax
|
||||
#define regex_set_meta_char onig_set_meta_char
|
||||
#define regex_end onig_end
|
||||
#define regex_version onig_version
|
||||
|
||||
/* encoding API */
|
||||
#define enc_get_prev_char_head onigenc_get_prev_char_head
|
||||
#define enc_get_left_adjust_char_head onigenc_get_left_adjust_char_head
|
||||
#define enc_get_right_adjust_char_head onigenc_get_right_adjust_char_head
|
||||
/* obsoleted API */
|
||||
#define regex_get_prev_char_head onigenc_get_prev_char_head
|
||||
#define regex_get_left_adjust_char_head onigenc_get_left_adjust_char_head
|
||||
#define regex_get_right_adjust_char_head onigenc_get_right_adjust_char_head
|
||||
|
||||
#endif /* ONIGCMPT200_H */
|
@ -36,7 +36,7 @@ extern "C" {
|
||||
#define ONIGURUMA
|
||||
#define ONIGURUMA_VERSION_MAJOR 5
|
||||
#define ONIGURUMA_VERSION_MINOR 9
|
||||
#define ONIGURUMA_VERSION_TEENY 2
|
||||
#define ONIGURUMA_VERSION_TEENY 5
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifndef HAVE_PROTOTYPES
|
||||
|
@ -2399,7 +2399,7 @@ is_not_included(Node* x, Node* y, regex_t* reg)
|
||||
{
|
||||
int i, len;
|
||||
OnigCodePoint code;
|
||||
UChar *p, c;
|
||||
UChar *p;
|
||||
int ytype;
|
||||
|
||||
retry:
|
||||
@ -2513,7 +2513,7 @@ is_not_included(Node* x, Node* y, regex_t* reg)
|
||||
if (NSTRING_LEN(x) == 0)
|
||||
break;
|
||||
|
||||
c = *(xs->s);
|
||||
//c = *(xs->s);
|
||||
switch (ytype) {
|
||||
case NT_CTYPE:
|
||||
switch (NCTYPE(y)->ctype) {
|
||||
@ -3189,7 +3189,7 @@ next_setup(Node* node, Node* next_node, regex_t* reg)
|
||||
static int
|
||||
update_string_node_case_fold(regex_t* reg, Node *node)
|
||||
{
|
||||
UChar *p, *q, *end, buf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
|
||||
UChar *p, *end, buf[ONIGENC_MBC_CASE_FOLD_MAXLEN];
|
||||
UChar *sbuf, *ebuf, *sp;
|
||||
int r, i, len, sbuf_size;
|
||||
StrNode* sn = NSTR(node);
|
||||
@ -3204,7 +3204,6 @@ update_string_node_case_fold(regex_t* reg, Node *node)
|
||||
p = sn->s;
|
||||
while (p < end) {
|
||||
len = ONIGENC_MBC_CASE_FOLD(reg->enc, reg->case_fold_flag, &p, end, buf);
|
||||
q = buf;
|
||||
for (i = 0; i < len; i++) {
|
||||
if (sp >= ebuf) {
|
||||
sbuf = (UChar* )xrealloc(sbuf, sbuf_size * 2);
|
||||
@ -6216,8 +6215,7 @@ print_indent_tree(FILE* f, Node* node, int indent)
|
||||
fprintf(f, "<enclose:%x> ", (int )node);
|
||||
switch (NENCLOSE(node)->type) {
|
||||
case ENCLOSE_OPTION:
|
||||
fprintf(f, "option:%d\n", NENCLOSE(node)->option);
|
||||
print_indent_tree(f, NENCLOSE(node)->target, indent + add);
|
||||
fprintf(f, "option:%d", NENCLOSE(node)->option);
|
||||
break;
|
||||
case ENCLOSE_MEMORY:
|
||||
fprintf(f, "memory:%d", NENCLOSE(node)->regnum);
|
||||
|
@ -262,6 +262,14 @@ strdup_with_null(OnigEncoding enc, UChar* s, UChar* end)
|
||||
p += ONIGENC_MBC_ENC_LEN(enc, p); \
|
||||
} while (0)
|
||||
|
||||
#define PINC_S do { \
|
||||
p += ONIGENC_MBC_ENC_LEN(enc, p); \
|
||||
} while (0)
|
||||
#define PFETCH_S(c) do { \
|
||||
c = ONIGENC_MBC_TO_CODE(enc, p, end); \
|
||||
p += ONIGENC_MBC_ENC_LEN(enc, p); \
|
||||
} while (0)
|
||||
|
||||
#define PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE)
|
||||
#define PPEEK_IS(c) (PPEEK == (OnigCodePoint )c)
|
||||
|
||||
@ -2404,19 +2412,18 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env)
|
||||
OnigCodePoint c;
|
||||
OnigEncoding enc = env->enc;
|
||||
UChar* p = *src;
|
||||
PFETCH_READY;
|
||||
|
||||
if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE;
|
||||
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
switch (c) {
|
||||
case 'M':
|
||||
if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META)) {
|
||||
if (PEND) return ONIGERR_END_PATTERN_AT_META;
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c != '-') return ONIGERR_META_CODE_SYNTAX;
|
||||
if (PEND) return ONIGERR_END_PATTERN_AT_META;
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c == MC_ESC(env->syntax)) {
|
||||
v = fetch_escaped_value(&p, end, env);
|
||||
if (v < 0) return v;
|
||||
@ -2431,7 +2438,7 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env)
|
||||
case 'C':
|
||||
if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL)) {
|
||||
if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c != '-') return ONIGERR_CONTROL_CODE_SYNTAX;
|
||||
goto control;
|
||||
}
|
||||
@ -2442,7 +2449,7 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env)
|
||||
if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_C_CONTROL)) {
|
||||
control:
|
||||
if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL;
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c == '?') {
|
||||
c = 0177;
|
||||
}
|
||||
@ -2617,7 +2624,6 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
|
||||
UChar *name_end;
|
||||
UChar *pnum_head;
|
||||
UChar *p = *src;
|
||||
PFETCH_READY;
|
||||
|
||||
*rback_num = 0;
|
||||
|
||||
@ -2632,7 +2638,7 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
|
||||
return ONIGERR_EMPTY_GROUP_NAME;
|
||||
}
|
||||
else {
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c == end_code)
|
||||
return ONIGERR_EMPTY_GROUP_NAME;
|
||||
|
||||
@ -2663,7 +2669,7 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
|
||||
if (r == 0) {
|
||||
while (!PEND) {
|
||||
name_end = p;
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c == end_code || c == ')') {
|
||||
if (is_num == 2) r = ONIGERR_INVALID_GROUP_NAME;
|
||||
break;
|
||||
@ -2678,7 +2684,6 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
|
||||
r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME;
|
||||
else
|
||||
r = ONIGERR_INVALID_GROUP_NAME;
|
||||
|
||||
is_num = 0;
|
||||
}
|
||||
}
|
||||
@ -2712,7 +2717,7 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
|
||||
else {
|
||||
while (!PEND) {
|
||||
name_end = p;
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c == end_code || c == ')')
|
||||
break;
|
||||
}
|
||||
@ -3935,10 +3940,9 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env)
|
||||
OnigCodePoint c;
|
||||
OnigEncoding enc = env->enc;
|
||||
UChar *p = *src;
|
||||
PFETCH_READY;
|
||||
|
||||
if (PPEEK_IS('^')) {
|
||||
PINC;
|
||||
PINC_S;
|
||||
not = 1;
|
||||
}
|
||||
else
|
||||
@ -3956,7 +3960,7 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env)
|
||||
r = add_ctype_to_cc(cc, pb->ctype, not, env);
|
||||
if (r != 0) return r;
|
||||
|
||||
PINC; PINC;
|
||||
PINC_S; PINC_S;
|
||||
*src = p;
|
||||
return 0;
|
||||
}
|
||||
@ -3966,13 +3970,13 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env)
|
||||
c = 0;
|
||||
i = 0;
|
||||
while (!PEND && ((c = PPEEK) != ':') && c != ']') {
|
||||
PINC;
|
||||
PINC_S;
|
||||
if (++i > POSIX_BRACKET_CHECK_LIMIT_LENGTH) break;
|
||||
}
|
||||
if (c == ':' && ! PEND) {
|
||||
PINC;
|
||||
PINC_S;
|
||||
if (! PEND) {
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c == ']')
|
||||
return ONIGERR_INVALID_POSIX_BRACKET_TYPE;
|
||||
}
|
||||
@ -3988,14 +3992,13 @@ fetch_char_property_to_ctype(UChar** src, UChar* end, ScanEnv* env)
|
||||
OnigCodePoint c;
|
||||
OnigEncoding enc = env->enc;
|
||||
UChar *prev, *start, *p = *src;
|
||||
PFETCH_READY;
|
||||
|
||||
r = 0;
|
||||
start = prev = p;
|
||||
|
||||
while (!PEND) {
|
||||
prev = p;
|
||||
PFETCH(c);
|
||||
PFETCH_S(c);
|
||||
if (c == '}') {
|
||||
r = ONIGENC_PROPERTY_NAME_TO_CTYPE(enc, start, prev);
|
||||
if (r < 0) break;
|
||||
@ -4153,7 +4156,6 @@ code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped,
|
||||
OnigCodePoint code;
|
||||
OnigEncoding enc = env->enc;
|
||||
UChar* p = from;
|
||||
PFETCH_READY;
|
||||
|
||||
in_esc = 0;
|
||||
while (! PEND) {
|
||||
@ -4161,7 +4163,7 @@ code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped,
|
||||
in_esc = 0;
|
||||
}
|
||||
else {
|
||||
PFETCH(code);
|
||||
PFETCH_S(code);
|
||||
if (code == c) return 1;
|
||||
if (code == MC_ESC(env->syntax)) in_esc = 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user