]> granicus.if.org Git - onig/commitdiff
Convert CRLF line endings to LF
authorPeter Kokot <peterkokot@gmail.com>
Mon, 1 Oct 2018 00:46:26 +0000 (02:46 +0200)
committerK.Kosako <kkosako0@gmail.com>
Mon, 1 Oct 2018 04:31:50 +0000 (13:31 +0900)
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
git ls-files --eol

Git additionally provides .gitattributes file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF lineendings in all files in working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index with LF end of lines.

src/Makefile.windows
src/config.h.win32
src/config.h.win64
src/config.h.windows.in
windows/testc.c

index 8044edac6a1c1376773f27ea5e17e6502e0fc85c..762cf07b419fb5579342452da2121e176c010723 100644 (file)
-# Oniguruma Makefile for Windows\r
-\r
-product_name = oniguruma\r
-\r
-CPPFLAGS =\r
-CFLAGS = -O2 -nologo /W3\r
-LDFLAGS =\r
-LOADLIBES =\r
-ARLIB = lib\r
-ARLIB_FLAGS = -nologo\r
-ARDLL = cl\r
-ARDLL_FLAGS = -nologo -LD $(LINKFLAGS) -dll\r
-LINKFLAGS = -link -incremental:no -pdb:none\r
-\r
-INSTALL = install -c\r
-CP      = copy\r
-CC = cl\r
-DEFS = -DHAVE_CONFIG_H\r
-\r
-subdirs =\r
-\r
-libbase   = onig\r
-libname   = $(libbase)_s.lib\r
-dllname   = $(libbase).dll\r
-dlllib    = $(libbase).lib\r
-\r
-!IF defined(ENABLE_POSIX_API) && "$(ENABLE_POSIX_API)" == "NO"\r
-posixobjs =\r
-!ELSE\r
-posixobjs = $(BUILD_DIR)/regposix.obj $(BUILD_DIR)/regposerr.obj\r
-!ENDIF\r
-\r
-onigheaders  = $(ONIG_DIR)/oniguruma.h $(ONIG_DIR)/regint.h $(ONIG_DIR)/regparse.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/st.h\r
-posixheaders = $(ONIG_DIR)/onigposix.h\r
-headers      = $(posixheaders) $(onigheaders)\r
-\r
-onigobjs     = $(BUILD_DIR)/reggnu.obj $(BUILD_DIR)/regerror.obj $(BUILD_DIR)/regparse.obj $(BUILD_DIR)/regext.obj $(BUILD_DIR)/regcomp.obj \\r
-              $(BUILD_DIR)/regexec.obj $(BUILD_DIR)/regenc.obj $(BUILD_DIR)/regsyntax.obj $(BUILD_DIR)/regtrav.obj \\r
-              $(BUILD_DIR)/regversion.obj $(BUILD_DIR)/st.obj $(BUILD_DIR)/onig_init.obj\r
-libobjs      = $(onigobjs) $(posixobjs)\r
-\r
-jp_objs      =  $(BUILD_DIR)/euc_jp.obj $(BUILD_DIR)/sjis.obj\r
-iso8859_objs =  $(BUILD_DIR)/iso8859_1.obj  $(BUILD_DIR)/iso8859_2.obj \\r
-               $(BUILD_DIR)/iso8859_3.obj  $(BUILD_DIR)/iso8859_4.obj \\r
-               $(BUILD_DIR)/iso8859_5.obj  $(BUILD_DIR)/iso8859_6.obj \\r
-               $(BUILD_DIR)/iso8859_7.obj  $(BUILD_DIR)/iso8859_8.obj \\r
-               $(BUILD_DIR)/iso8859_9.obj  $(BUILD_DIR)/iso8859_10.obj \\r
-               $(BUILD_DIR)/iso8859_11.obj $(BUILD_DIR)/iso8859_13.obj \\r
-               $(BUILD_DIR)/iso8859_14.obj $(BUILD_DIR)/iso8859_15.obj \\r
-               $(BUILD_DIR)/iso8859_16.obj\r
-\r
-encobjs = $(BUILD_DIR)/ascii.obj $(BUILD_DIR)/utf8.obj \\r
-               $(BUILD_DIR)/unicode.obj \\r
-               $(BUILD_DIR)/utf16_be.obj $(BUILD_DIR)/utf16_le.obj \\r
-               $(BUILD_DIR)/utf32_be.obj $(BUILD_DIR)/utf32_le.obj \\r
-               $(jp_objs) $(iso8859_objs) \\r
-               $(BUILD_DIR)/euc_tw.obj $(BUILD_DIR)/euc_kr.obj $(BUILD_DIR)/big5.obj \\r
-               $(BUILD_DIR)/gb18030.obj \\r
-               $(BUILD_DIR)/koi8_r.obj  \\r
-               $(BUILD_DIR)/cp1251.obj \\r
-               $(BUILD_DIR)/euc_jp_prop.obj $(BUILD_DIR)/sjis_prop.obj \\r
-               $(BUILD_DIR)/unicode_unfold_key.obj $(BUILD_DIR)/unicode_fold1_key.obj \\r
-               $(BUILD_DIR)/unicode_fold2_key.obj $(BUILD_DIR)/unicode_fold3_key.obj   # $(BUILD_DIR)/koi8.obj\r
-\r
-onigsources  = $(ONIG_DIR)/regerror.c $(ONIG_DIR)/regparse.c $(ONIG_DIR)/regext.c $(ONIG_DIR)/regcomp.c $(ONIG_DIR)/regexec.c $(ONIG_DIR)/regenc.c \\r
-              $(ONIG_DIR)/regsyntax.c $(ONIG_DIR)/regtrav.c $(ONIG_DIR)/regversion.c $(ONIG_DIR)/reggnu.c $(ONIG_DIR)/st.c\r
-posixsources = $(ONIG_DIR)/regposix.c $(ONIG_DIR)/regposerr.c\r
-libsources   = $(posixsources) $(onigsources)\r
-\r
-patchfiles   = re.c.168.patch re.c.181.patch\r
-distfiles    = README COPYING HISTORY \\r
-               Makefile.in configure.in config.h.in configure \\r
-               $(headers) $(libsources) $(patchfiles) \\r
-               test.rb testconv.rb\r
-testc        = testc\r
-testp        = testp\r
-\r
-makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)'\r
-\r
-.SUFFIXES:\r
-.SUFFIXES: .obj .c .h .ps .dvi .info .texinfo\r
-\r
-{$(ONIG_DIR)}.c{$(BUILD_DIR)}.obj:\r
-       $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) /I. /I.. /Fo$@ /c $<\r
-\r
-# targets\r
-default: all\r
-\r
-setup:\r
-       $(CP) ..\win32\config.h config.h\r
-       $(CP) ..\win32\testc.c  testc.c\r
-\r
-\r
-all: $(libname) $(dllname)\r
-\r
-$(libname): $(libobjs) $(encobjs)\r
-       $(ARLIB) $(ARLIB_FLAGS) -out:$@ $(libobjs) $(encobjs)\r
-\r
-$(dllname): $(libobjs) $(encobjs)\r
-       $(ARDLL) $(libobjs) $(encobjs) -Fe$@ $(ARDLL_FLAGS)\r
-\r
-$(BUILD_DIR)/regparse.obj:  $(ONIG_DIR)/regparse.c $(onigheaders) $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regext.obj:    $(ONIG_DIR)/regext.c   $(onigheaders) $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regtrav.obj:   $(ONIG_DIR)/regtrav.c  $(onigheaders) $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regcomp.obj:   $(ONIG_DIR)/regcomp.c  $(onigheaders) $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regexec.obj:   $(ONIG_DIR)/regexec.c  $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/reggnu.obj:    $(ONIG_DIR)/reggnu.c   $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h $(ONIG_DIR)/oniggnu.h\r
-$(BUILD_DIR)/regerror.obj:  $(ONIG_DIR)/regerror.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regenc.obj:    $(ONIG_DIR)/regenc.c   $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regsyntax.obj: $(ONIG_DIR)/regsyntax.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regversion.obj: $(ONIG_DIR)/regversion.c $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regposix.obj:  $(ONIG_DIR)/regposix.c $(posixheaders) $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/regposerr.obj: $(ONIG_DIR)/regposerr.c $(posixheaders) $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/st.obj:        $(ONIG_DIR)/st.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h $(ONIG_DIR)/st.h\r
-$(BUILD_DIR)/onig_init.obj: $(ONIG_DIR)/onig_init.c $(ONIG_DIR)/oniguruma.h\r
-\r
-$(BUILD_DIR)/ascii.obj:      $(ONIG_DIR)/ascii.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/unicode.obj:    $(ONIG_DIR)/unicode.c $(ONIG_DIR)/unicode_fold_data.c $(ONIG_DIR)/unicode_property_data.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/utf8.obj:       $(ONIG_DIR)/utf8.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/utf16_be.obj:   $(ONIG_DIR)/utf16_be.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/utf16_le.obj:   $(ONIG_DIR)/utf16_le.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/utf32_be.obj:   $(ONIG_DIR)/utf32_be.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/utf32_le.obj:   $(ONIG_DIR)/utf32_le.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/euc_jp.obj:     $(ONIG_DIR)/euc_jp.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/euc_tw.obj:     $(ONIG_DIR)/euc_tw.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/euc_kr.obj:     $(ONIG_DIR)/euc_kr.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/sjis.obj:       $(ONIG_DIR)/sjis.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_1.obj:  $(ONIG_DIR)/iso8859_1.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_2.obj:  $(ONIG_DIR)/iso8859_2.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_3.obj:  $(ONIG_DIR)/iso8859_3.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_4.obj:  $(ONIG_DIR)/iso8859_4.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_5.obj:  $(ONIG_DIR)/iso8859_5.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_6.obj:  $(ONIG_DIR)/iso8859_6.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_7.obj:  $(ONIG_DIR)/iso8859_7.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_8.obj:  $(ONIG_DIR)/iso8859_8.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_9.obj:  $(ONIG_DIR)/iso8859_9.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_10.obj: $(ONIG_DIR)/iso8859_10.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_11.obj: $(ONIG_DIR)/iso8859_11.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_13.obj: $(ONIG_DIR)/iso8859_13.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_14.obj: $(ONIG_DIR)/iso8859_14.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_15.obj: $(ONIG_DIR)/iso8859_15.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/iso8859_16.obj: $(ONIG_DIR)/iso8859_16.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/koi8.obj:       $(ONIG_DIR)/koi8.c   $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/koi8_r.obj:     $(ONIG_DIR)/koi8_r.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/cp1251.obj:     $(ONIG_DIR)/cp1251.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/big5.obj:       $(ONIG_DIR)/big5.c   $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/gb18030.obj:    $(ONIG_DIR)/gb18030.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/euc_jp_prop.obj:  $(ONIG_DIR)/euc_jp_prop.c $(ONIG_DIR)/regenc.h\r
-$(BUILD_DIR)/sjis_prop.obj:    $(ONIG_DIR)/sjis_prop.c $(ONIG_DIR)/regenc.h\r
-$(BUILD_DIR)/unicode_unfold_key.obj: $(ONIG_DIR)/unicode_unfold_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/unicode_fold1_key.obj: $(ONIG_DIR)/unicode_fold1_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/unicode_fold2_key.obj: $(ONIG_DIR)/unicode_fold2_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-$(BUILD_DIR)/unicode_fold3_key.obj: $(ONIG_DIR)/unicode_fold3_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h\r
-\r
-# C library test\r
-ctest: $(testc)\r
-       .\$(testc)\r
-\r
-# POSIX C library test\r
-ptest: $(testp)\r
-       .\$(testp)\r
-\r
-$(testc): $(testc).c $(libname)\r
-       $(CC) -nologo /Fe:$(testc) -DONIG_EXTERN=extern $(testc).c $(libname)\r
-\r
-$(testp): $(testc).c $(dlllib)\r
-       $(CC) -nologo -DPOSIX_TEST /Fe:$(testp) $(testc).c $(dlllib)\r
-\r
-$(testc)u: $(testc)u.c $(libname)\r
-       $(CC) -nologo /Fe:$(testc)u -DONIG_EXTERN=extern $(testc)u.c $(libname)\r
-\r
-clean:\r
-       del $(BUILD_DIR)\*.obj $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.exp $(BUILD_DIR)\*.dll $(BUILD_DIR)\$(testp).exe $(BUILD_DIR)\$(testc).exe $(BUILD_DIR)\$(testc).obj\r
-\r
-\r
-samples: all\r
-       $(CC) $(CFLAGS) -I. /Fe:simple  $(ONIG_DIR)\sample\simple.c  $(dlllib)\r
-       $(CC) $(CFLAGS) -I. /Fe:posix   $(ONIG_DIR)\sample\posix.c   $(dlllib)\r
-       $(CC) $(CFLAGS) -I. /Fe:names   $(ONIG_DIR)\sample\names.c   $(dlllib)\r
-       $(CC) $(CFLAGS) -I. /Fe:listcap $(ONIG_DIR)\sample\listcap.c $(dlllib)\r
-       $(CC) $(CFLAGS) -I. /Fe:sql     $(ONIG_DIR)\sample\sql.c     $(dlllib)\r
-       $(CC) $(CFLAGS) -I. /Fe:encode  $(ONIG_DIR)\sample\encode.c  $(dlllib)\r
-       $(CC) $(CFLAGS) -I. /Fe:syntax  $(ONIG_DIR)\sample\syntax.c  $(dlllib)\r
+# Oniguruma Makefile for Windows
+
+product_name = oniguruma
+
+CPPFLAGS =
+CFLAGS = -O2 -nologo /W3
+LDFLAGS =
+LOADLIBES =
+ARLIB = lib
+ARLIB_FLAGS = -nologo
+ARDLL = cl
+ARDLL_FLAGS = -nologo -LD $(LINKFLAGS) -dll
+LINKFLAGS = -link -incremental:no -pdb:none
+
+INSTALL = install -c
+CP      = copy
+CC = cl
+DEFS = -DHAVE_CONFIG_H
+
+subdirs =
+
+libbase   = onig
+libname   = $(libbase)_s.lib
+dllname   = $(libbase).dll
+dlllib    = $(libbase).lib
+
+!IF defined(ENABLE_POSIX_API) && "$(ENABLE_POSIX_API)" == "NO"
+posixobjs =
+!ELSE
+posixobjs = $(BUILD_DIR)/regposix.obj $(BUILD_DIR)/regposerr.obj
+!ENDIF
+
+onigheaders  = $(ONIG_DIR)/oniguruma.h $(ONIG_DIR)/regint.h $(ONIG_DIR)/regparse.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/st.h
+posixheaders = $(ONIG_DIR)/onigposix.h
+headers      = $(posixheaders) $(onigheaders)
+
+onigobjs     = $(BUILD_DIR)/reggnu.obj $(BUILD_DIR)/regerror.obj $(BUILD_DIR)/regparse.obj $(BUILD_DIR)/regext.obj $(BUILD_DIR)/regcomp.obj \
+              $(BUILD_DIR)/regexec.obj $(BUILD_DIR)/regenc.obj $(BUILD_DIR)/regsyntax.obj $(BUILD_DIR)/regtrav.obj \
+              $(BUILD_DIR)/regversion.obj $(BUILD_DIR)/st.obj $(BUILD_DIR)/onig_init.obj
+libobjs      = $(onigobjs) $(posixobjs)
+
+jp_objs      =  $(BUILD_DIR)/euc_jp.obj $(BUILD_DIR)/sjis.obj
+iso8859_objs =  $(BUILD_DIR)/iso8859_1.obj  $(BUILD_DIR)/iso8859_2.obj \
+               $(BUILD_DIR)/iso8859_3.obj  $(BUILD_DIR)/iso8859_4.obj \
+               $(BUILD_DIR)/iso8859_5.obj  $(BUILD_DIR)/iso8859_6.obj \
+               $(BUILD_DIR)/iso8859_7.obj  $(BUILD_DIR)/iso8859_8.obj \
+               $(BUILD_DIR)/iso8859_9.obj  $(BUILD_DIR)/iso8859_10.obj \
+               $(BUILD_DIR)/iso8859_11.obj $(BUILD_DIR)/iso8859_13.obj \
+               $(BUILD_DIR)/iso8859_14.obj $(BUILD_DIR)/iso8859_15.obj \
+               $(BUILD_DIR)/iso8859_16.obj
+
+encobjs = $(BUILD_DIR)/ascii.obj $(BUILD_DIR)/utf8.obj \
+               $(BUILD_DIR)/unicode.obj \
+               $(BUILD_DIR)/utf16_be.obj $(BUILD_DIR)/utf16_le.obj \
+               $(BUILD_DIR)/utf32_be.obj $(BUILD_DIR)/utf32_le.obj \
+               $(jp_objs) $(iso8859_objs) \
+               $(BUILD_DIR)/euc_tw.obj $(BUILD_DIR)/euc_kr.obj $(BUILD_DIR)/big5.obj \
+               $(BUILD_DIR)/gb18030.obj \
+               $(BUILD_DIR)/koi8_r.obj  \
+               $(BUILD_DIR)/cp1251.obj \
+               $(BUILD_DIR)/euc_jp_prop.obj $(BUILD_DIR)/sjis_prop.obj \
+               $(BUILD_DIR)/unicode_unfold_key.obj $(BUILD_DIR)/unicode_fold1_key.obj \
+               $(BUILD_DIR)/unicode_fold2_key.obj $(BUILD_DIR)/unicode_fold3_key.obj   # $(BUILD_DIR)/koi8.obj
+
+onigsources  = $(ONIG_DIR)/regerror.c $(ONIG_DIR)/regparse.c $(ONIG_DIR)/regext.c $(ONIG_DIR)/regcomp.c $(ONIG_DIR)/regexec.c $(ONIG_DIR)/regenc.c \
+              $(ONIG_DIR)/regsyntax.c $(ONIG_DIR)/regtrav.c $(ONIG_DIR)/regversion.c $(ONIG_DIR)/reggnu.c $(ONIG_DIR)/st.c
+posixsources = $(ONIG_DIR)/regposix.c $(ONIG_DIR)/regposerr.c
+libsources   = $(posixsources) $(onigsources)
+
+patchfiles   = re.c.168.patch re.c.181.patch
+distfiles    = README COPYING HISTORY \
+               Makefile.in configure.in config.h.in configure \
+               $(headers) $(libsources) $(patchfiles) \
+               test.rb testconv.rb
+testc        = testc
+testp        = testp
+
+makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)'
+
+.SUFFIXES:
+.SUFFIXES: .obj .c .h .ps .dvi .info .texinfo
+
+{$(ONIG_DIR)}.c{$(BUILD_DIR)}.obj:
+       $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) /I. /I.. /Fo$@ /c $<
+
+# targets
+default: all
+
+setup:
+       $(CP) ..\win32\config.h config.h
+       $(CP) ..\win32\testc.c  testc.c
+
+
+all: $(libname) $(dllname)
+
+$(libname): $(libobjs) $(encobjs)
+       $(ARLIB) $(ARLIB_FLAGS) -out:$@ $(libobjs) $(encobjs)
+
+$(dllname): $(libobjs) $(encobjs)
+       $(ARDLL) $(libobjs) $(encobjs) -Fe$@ $(ARDLL_FLAGS)
+
+$(BUILD_DIR)/regparse.obj:  $(ONIG_DIR)/regparse.c $(onigheaders) $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regext.obj:    $(ONIG_DIR)/regext.c   $(onigheaders) $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regtrav.obj:   $(ONIG_DIR)/regtrav.c  $(onigheaders) $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regcomp.obj:   $(ONIG_DIR)/regcomp.c  $(onigheaders) $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regexec.obj:   $(ONIG_DIR)/regexec.c  $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/reggnu.obj:    $(ONIG_DIR)/reggnu.c   $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h $(ONIG_DIR)/oniggnu.h
+$(BUILD_DIR)/regerror.obj:  $(ONIG_DIR)/regerror.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regenc.obj:    $(ONIG_DIR)/regenc.c   $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regsyntax.obj: $(ONIG_DIR)/regsyntax.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/regenc.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regversion.obj: $(ONIG_DIR)/regversion.c $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regposix.obj:  $(ONIG_DIR)/regposix.c $(posixheaders) $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/regposerr.obj: $(ONIG_DIR)/regposerr.c $(posixheaders) $(BUILD_DIR)/config.h
+$(BUILD_DIR)/st.obj:        $(ONIG_DIR)/st.c $(ONIG_DIR)/regint.h $(ONIG_DIR)/oniguruma.h $(BUILD_DIR)/config.h $(ONIG_DIR)/st.h
+$(BUILD_DIR)/onig_init.obj: $(ONIG_DIR)/onig_init.c $(ONIG_DIR)/oniguruma.h
+
+$(BUILD_DIR)/ascii.obj:      $(ONIG_DIR)/ascii.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/unicode.obj:    $(ONIG_DIR)/unicode.c $(ONIG_DIR)/unicode_fold_data.c $(ONIG_DIR)/unicode_property_data.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/utf8.obj:       $(ONIG_DIR)/utf8.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/utf16_be.obj:   $(ONIG_DIR)/utf16_be.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/utf16_le.obj:   $(ONIG_DIR)/utf16_le.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/utf32_be.obj:   $(ONIG_DIR)/utf32_be.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/utf32_le.obj:   $(ONIG_DIR)/utf32_le.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/euc_jp.obj:     $(ONIG_DIR)/euc_jp.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/euc_tw.obj:     $(ONIG_DIR)/euc_tw.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/euc_kr.obj:     $(ONIG_DIR)/euc_kr.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/sjis.obj:       $(ONIG_DIR)/sjis.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_1.obj:  $(ONIG_DIR)/iso8859_1.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_2.obj:  $(ONIG_DIR)/iso8859_2.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_3.obj:  $(ONIG_DIR)/iso8859_3.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_4.obj:  $(ONIG_DIR)/iso8859_4.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_5.obj:  $(ONIG_DIR)/iso8859_5.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_6.obj:  $(ONIG_DIR)/iso8859_6.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_7.obj:  $(ONIG_DIR)/iso8859_7.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_8.obj:  $(ONIG_DIR)/iso8859_8.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_9.obj:  $(ONIG_DIR)/iso8859_9.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_10.obj: $(ONIG_DIR)/iso8859_10.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_11.obj: $(ONIG_DIR)/iso8859_11.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_13.obj: $(ONIG_DIR)/iso8859_13.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_14.obj: $(ONIG_DIR)/iso8859_14.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_15.obj: $(ONIG_DIR)/iso8859_15.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/iso8859_16.obj: $(ONIG_DIR)/iso8859_16.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/koi8.obj:       $(ONIG_DIR)/koi8.c   $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/koi8_r.obj:     $(ONIG_DIR)/koi8_r.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/cp1251.obj:     $(ONIG_DIR)/cp1251.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/big5.obj:       $(ONIG_DIR)/big5.c   $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/gb18030.obj:    $(ONIG_DIR)/gb18030.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/euc_jp_prop.obj:  $(ONIG_DIR)/euc_jp_prop.c $(ONIG_DIR)/regenc.h
+$(BUILD_DIR)/sjis_prop.obj:    $(ONIG_DIR)/sjis_prop.c $(ONIG_DIR)/regenc.h
+$(BUILD_DIR)/unicode_unfold_key.obj: $(ONIG_DIR)/unicode_unfold_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/unicode_fold1_key.obj: $(ONIG_DIR)/unicode_fold1_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/unicode_fold2_key.obj: $(ONIG_DIR)/unicode_fold2_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+$(BUILD_DIR)/unicode_fold3_key.obj: $(ONIG_DIR)/unicode_fold3_key.c $(ONIG_DIR)/regenc.h $(BUILD_DIR)/config.h
+
+# C library test
+ctest: $(testc)
+       .\$(testc)
+
+# POSIX C library test
+ptest: $(testp)
+       .\$(testp)
+
+$(testc): $(testc).c $(libname)
+       $(CC) -nologo /Fe:$(testc) -DONIG_EXTERN=extern $(testc).c $(libname)
+
+$(testp): $(testc).c $(dlllib)
+       $(CC) -nologo -DPOSIX_TEST /Fe:$(testp) $(testc).c $(dlllib)
+
+$(testc)u: $(testc)u.c $(libname)
+       $(CC) -nologo /Fe:$(testc)u -DONIG_EXTERN=extern $(testc)u.c $(libname)
+
+clean:
+       del $(BUILD_DIR)\*.obj $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.exp $(BUILD_DIR)\*.dll $(BUILD_DIR)\$(testp).exe $(BUILD_DIR)\$(testc).exe $(BUILD_DIR)\$(testc).obj
+
+
+samples: all
+       $(CC) $(CFLAGS) -I. /Fe:simple  $(ONIG_DIR)\sample\simple.c  $(dlllib)
+       $(CC) $(CFLAGS) -I. /Fe:posix   $(ONIG_DIR)\sample\posix.c   $(dlllib)
+       $(CC) $(CFLAGS) -I. /Fe:names   $(ONIG_DIR)\sample\names.c   $(dlllib)
+       $(CC) $(CFLAGS) -I. /Fe:listcap $(ONIG_DIR)\sample\listcap.c $(dlllib)
+       $(CC) $(CFLAGS) -I. /Fe:sql     $(ONIG_DIR)\sample\sql.c     $(dlllib)
+       $(CC) $(CFLAGS) -I. /Fe:encode  $(ONIG_DIR)\sample\encode.c  $(dlllib)
+       $(CC) $(CFLAGS) -I. /Fe:syntax  $(ONIG_DIR)\sample\syntax.c  $(dlllib)
index 180973442cc24798c3ab3e57e0c83a88f38027a8..a8a8426960a9c4026ca773f6f4ea85d655f91cd0 100644 (file)
@@ -1,52 +1,52 @@
-#define HAVE_SYS_TYPES_H 1\r
-#define HAVE_SYS_STAT_H 1\r
-#define HAVE_MEMORY_H 1\r
-#define HAVE_OFF_T 1\r
-#define SIZEOF_INT 4\r
-#define SIZEOF_SHORT 2\r
-#define SIZEOF_LONG 4\r
-#define SIZEOF_LONG_LONG 8\r
-#define SIZEOF___INT64 8\r
-#define SIZEOF_OFF_T 4\r
-#define SIZEOF_VOIDP 4\r
-#define SIZEOF_FLOAT 4\r
-#define SIZEOF_DOUBLE 8\r
-#define SIZEOF_SIZE_T 4\r
-#define TOKEN_PASTE(x,y) x##y\r
-#ifndef NORETURN\r
-#if _MSC_VER > 1100\r
-#define NORETURN(x) __declspec(noreturn) x\r
-#else\r
-#define NORETURN(x) x\r
-#endif\r
-#endif\r
-#define HAVE_DECL_SYS_NERR 1\r
-#define HAVE_FCNTL_H 1\r
-#define HAVE_SYS_UTIME_H 1\r
-#define HAVE_MEMORY_H 1\r
-#define uid_t int\r
-#define gid_t int\r
-#define GETGROUPS_T int\r
-#define HAVE_ALLOCA 1\r
-#define HAVE_DUP2 1\r
-#define HAVE_MKDIR 1\r
-#define HAVE_FLOCK 1\r
-#define HAVE_VSNPRINTF 1\r
-#define HAVE_FINITE 1\r
-#define HAVE_HYPOT 1\r
-#define HAVE_WAITPID 1\r
-#define HAVE_CHSIZE 1\r
-#define HAVE_TIMES 1\r
-#define HAVE_TELLDIR 1\r
-#define HAVE_SEEKDIR 1\r
-#define HAVE_EXECVE 1\r
-#define HAVE_DAYLIGHT 1\r
-#define SETPGRP_VOID 1\r
-#define inline __inline\r
-#define NEED_IO_SEEK_BETWEEN_RW 1\r
-#define RSHIFT(x,y) ((x)>>(int)y)\r
-#define FILE_COUNT _cnt\r
-#define FILE_READPTR _ptr\r
-#define DEFAULT_KCODE KCODE_NONE\r
-#define DLEXT ".so"\r
-#define DLEXT2 ".dll"\r
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_OFF_T 1
+#define SIZEOF_INT 4
+#define SIZEOF_SHORT 2
+#define SIZEOF_LONG 4
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF___INT64 8
+#define SIZEOF_OFF_T 4
+#define SIZEOF_VOIDP 4
+#define SIZEOF_FLOAT 4
+#define SIZEOF_DOUBLE 8
+#define SIZEOF_SIZE_T 4
+#define TOKEN_PASTE(x,y) x##y
+#ifndef NORETURN
+#if _MSC_VER > 1100
+#define NORETURN(x) __declspec(noreturn) x
+#else
+#define NORETURN(x) x
+#endif
+#endif
+#define HAVE_DECL_SYS_NERR 1
+#define HAVE_FCNTL_H 1
+#define HAVE_SYS_UTIME_H 1
+#define HAVE_MEMORY_H 1
+#define uid_t int
+#define gid_t int
+#define GETGROUPS_T int
+#define HAVE_ALLOCA 1
+#define HAVE_DUP2 1
+#define HAVE_MKDIR 1
+#define HAVE_FLOCK 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_FINITE 1
+#define HAVE_HYPOT 1
+#define HAVE_WAITPID 1
+#define HAVE_CHSIZE 1
+#define HAVE_TIMES 1
+#define HAVE_TELLDIR 1
+#define HAVE_SEEKDIR 1
+#define HAVE_EXECVE 1
+#define HAVE_DAYLIGHT 1
+#define SETPGRP_VOID 1
+#define inline __inline
+#define NEED_IO_SEEK_BETWEEN_RW 1
+#define RSHIFT(x,y) ((x)>>(int)y)
+#define FILE_COUNT _cnt
+#define FILE_READPTR _ptr
+#define DEFAULT_KCODE KCODE_NONE
+#define DLEXT ".so"
+#define DLEXT2 ".dll"
index 60e3edcf3e096fea5eea0b56c53ee4d0dc411270..59485fa2b5885aef11ca059d06ff9a946fdef469 100644 (file)
@@ -1,52 +1,52 @@
-#define HAVE_SYS_TYPES_H 1\r
-#define HAVE_SYS_STAT_H 1\r
-#define HAVE_MEMORY_H 1\r
-#define HAVE_OFF_T 1\r
-#define SIZEOF_INT 4\r
-#define SIZEOF_SHORT 2\r
-#define SIZEOF_LONG 4\r
-#define SIZEOF_LONG_LONG 8\r
-#define SIZEOF___INT64 8\r
-#define SIZEOF_OFF_T 4\r
-#define SIZEOF_VOIDP 8\r
-#define SIZEOF_FLOAT 4\r
-#define SIZEOF_DOUBLE 8\r
-#define SIZEOF_SIZE_T 8\r
-#define TOKEN_PASTE(x,y) x##y\r
-#ifndef NORETURN\r
-#if _MSC_VER > 1100\r
-#define NORETURN(x) __declspec(noreturn) x\r
-#else\r
-#define NORETURN(x) x\r
-#endif\r
-#endif\r
-#define HAVE_DECL_SYS_NERR 1\r
-#define HAVE_FCNTL_H 1\r
-#define HAVE_SYS_UTIME_H 1\r
-#define HAVE_MEMORY_H 1\r
-#define uid_t int\r
-#define gid_t int\r
-#define GETGROUPS_T int\r
-#define HAVE_ALLOCA 1\r
-#define HAVE_DUP2 1\r
-#define HAVE_MKDIR 1\r
-#define HAVE_FLOCK 1\r
-#define HAVE_VSNPRINTF 1\r
-#define HAVE_FINITE 1\r
-#define HAVE_HYPOT 1\r
-#define HAVE_WAITPID 1\r
-#define HAVE_CHSIZE 1\r
-#define HAVE_TIMES 1\r
-#define HAVE_TELLDIR 1\r
-#define HAVE_SEEKDIR 1\r
-#define HAVE_EXECVE 1\r
-#define HAVE_DAYLIGHT 1\r
-#define SETPGRP_VOID 1\r
-#define inline __inline\r
-#define NEED_IO_SEEK_BETWEEN_RW 1\r
-#define RSHIFT(x,y) ((x)>>(int)y)\r
-#define FILE_COUNT _cnt\r
-#define FILE_READPTR _ptr\r
-#define DEFAULT_KCODE KCODE_NONE\r
-#define DLEXT ".so"\r
-#define DLEXT2 ".dll"\r
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_OFF_T 1
+#define SIZEOF_INT 4
+#define SIZEOF_SHORT 2
+#define SIZEOF_LONG 4
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF___INT64 8
+#define SIZEOF_OFF_T 4
+#define SIZEOF_VOIDP 8
+#define SIZEOF_FLOAT 4
+#define SIZEOF_DOUBLE 8
+#define SIZEOF_SIZE_T 8
+#define TOKEN_PASTE(x,y) x##y
+#ifndef NORETURN
+#if _MSC_VER > 1100
+#define NORETURN(x) __declspec(noreturn) x
+#else
+#define NORETURN(x) x
+#endif
+#endif
+#define HAVE_DECL_SYS_NERR 1
+#define HAVE_FCNTL_H 1
+#define HAVE_SYS_UTIME_H 1
+#define HAVE_MEMORY_H 1
+#define uid_t int
+#define gid_t int
+#define GETGROUPS_T int
+#define HAVE_ALLOCA 1
+#define HAVE_DUP2 1
+#define HAVE_MKDIR 1
+#define HAVE_FLOCK 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_FINITE 1
+#define HAVE_HYPOT 1
+#define HAVE_WAITPID 1
+#define HAVE_CHSIZE 1
+#define HAVE_TIMES 1
+#define HAVE_TELLDIR 1
+#define HAVE_SEEKDIR 1
+#define HAVE_EXECVE 1
+#define HAVE_DAYLIGHT 1
+#define SETPGRP_VOID 1
+#define inline __inline
+#define NEED_IO_SEEK_BETWEEN_RW 1
+#define RSHIFT(x,y) ((x)>>(int)y)
+#define FILE_COUNT _cnt
+#define FILE_READPTR _ptr
+#define DEFAULT_KCODE KCODE_NONE
+#define DLEXT ".so"
+#define DLEXT2 ".dll"
index f04372febdda89475473106831c8f9344561d90c..0a18db8cd682ff9ebf757fac6e01f4bf5648de9f 100644 (file)
@@ -1,57 +1,57 @@
-#define HAVE_SYS_TYPES_H 1\r
-#define HAVE_SYS_STAT_H 1\r
-#define HAVE_MEMORY_H 1\r
-#define HAVE_OFF_T 1\r
-#define SIZEOF_INT 4\r
-#define SIZEOF_SHORT 2\r
-#define SIZEOF_LONG 4\r
-#define SIZEOF_LONG_LONG 8\r
-#define SIZEOF___INT64 8\r
-#define SIZEOF_OFF_T 4\r
-#ifdef _WIN64\r
-#define SIZEOF_VOIDP  8\r
-#define SIZEOF_SIZE_T 8\r
-#else\r
-#define SIZEOF_VOIDP  4\r
-#define SIZEOF_SIZE_T 4\r
-#endif\r
-#define SIZEOF_FLOAT 4\r
-#define SIZEOF_DOUBLE 8\r
-#define TOKEN_PASTE(x,y) x##y\r
-#ifndef NORETURN\r
-#if _MSC_VER > 1100\r
-#define NORETURN(x) __declspec(noreturn) x\r
-#else\r
-#define NORETURN(x) x\r
-#endif\r
-#endif\r
-#define HAVE_DECL_SYS_NERR 1\r
-#define HAVE_FCNTL_H 1\r
-#define HAVE_SYS_UTIME_H 1\r
-#define HAVE_MEMORY_H 1\r
-#define uid_t int\r
-#define gid_t int\r
-#define GETGROUPS_T int\r
-#define HAVE_ALLOCA 1\r
-#define HAVE_DUP2 1\r
-#define HAVE_MKDIR 1\r
-#define HAVE_FLOCK 1\r
-#define HAVE_VSNPRINTF 1\r
-#define HAVE_FINITE 1\r
-#define HAVE_HYPOT 1\r
-#define HAVE_WAITPID 1\r
-#define HAVE_CHSIZE 1\r
-#define HAVE_TIMES 1\r
-#define HAVE_TELLDIR 1\r
-#define HAVE_SEEKDIR 1\r
-#define HAVE_EXECVE 1\r
-#define HAVE_DAYLIGHT 1\r
-#define SETPGRP_VOID 1\r
-#define inline __inline\r
-#define NEED_IO_SEEK_BETWEEN_RW 1\r
-#define RSHIFT(x,y) ((x)>>(int)y)\r
-#define FILE_COUNT _cnt\r
-#define FILE_READPTR _ptr\r
-#define DEFAULT_KCODE KCODE_NONE\r
-#define DLEXT ".so"\r
-#define DLEXT2 ".dll"\r
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_OFF_T 1
+#define SIZEOF_INT 4
+#define SIZEOF_SHORT 2
+#define SIZEOF_LONG 4
+#define SIZEOF_LONG_LONG 8
+#define SIZEOF___INT64 8
+#define SIZEOF_OFF_T 4
+#ifdef _WIN64
+#define SIZEOF_VOIDP  8
+#define SIZEOF_SIZE_T 8
+#else
+#define SIZEOF_VOIDP  4
+#define SIZEOF_SIZE_T 4
+#endif
+#define SIZEOF_FLOAT 4
+#define SIZEOF_DOUBLE 8
+#define TOKEN_PASTE(x,y) x##y
+#ifndef NORETURN
+#if _MSC_VER > 1100
+#define NORETURN(x) __declspec(noreturn) x
+#else
+#define NORETURN(x) x
+#endif
+#endif
+#define HAVE_DECL_SYS_NERR 1
+#define HAVE_FCNTL_H 1
+#define HAVE_SYS_UTIME_H 1
+#define HAVE_MEMORY_H 1
+#define uid_t int
+#define gid_t int
+#define GETGROUPS_T int
+#define HAVE_ALLOCA 1
+#define HAVE_DUP2 1
+#define HAVE_MKDIR 1
+#define HAVE_FLOCK 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_FINITE 1
+#define HAVE_HYPOT 1
+#define HAVE_WAITPID 1
+#define HAVE_CHSIZE 1
+#define HAVE_TIMES 1
+#define HAVE_TELLDIR 1
+#define HAVE_SEEKDIR 1
+#define HAVE_EXECVE 1
+#define HAVE_DAYLIGHT 1
+#define SETPGRP_VOID 1
+#define inline __inline
+#define NEED_IO_SEEK_BETWEEN_RW 1
+#define RSHIFT(x,y) ((x)>>(int)y)
+#define FILE_COUNT _cnt
+#define FILE_READPTR _ptr
+#define DEFAULT_KCODE KCODE_NONE
+#define DLEXT ".so"
+#define DLEXT2 ".dll"
index c15b0eaa769522d7507b4ea3396e87c21d422089..2e13350caf4800a47f56bcee5754320c176f0e4a 100644 (file)
-/*\r
- * This program was generated by testconv.rb.\r
- */\r
-#ifdef ONIG_ESCAPE_UCHAR_COLLISION\r
-#undef ONIG_ESCAPE_UCHAR_COLLISION\r
-#endif\r
-#include <stdio.h>\r
-\r
-#ifdef POSIX_TEST\r
-#include "onigposix.h"\r
-#else\r
-#include "oniguruma.h"\r
-#endif\r
-\r
-#include <string.h>\r
-\r
-#define SLEN(s)  strlen(s)\r
-\r
-static int nsucc  = 0;\r
-static int nfail  = 0;\r
-static int nerror = 0;\r
-\r
-static FILE* err_file;\r
-\r
-#ifndef POSIX_TEST\r
-static OnigRegion* region;\r
-#endif\r
-\r
-static void xx(char* pattern, char* str, int from, int to, int mem, int not)\r
-{\r
-  int r;\r
-\r
-#ifdef POSIX_TEST\r
-  regex_t reg;\r
-  char buf[200];\r
-  regmatch_t pmatch[25];\r
-\r
-  r = regcomp(&reg, pattern, REG_EXTENDED | REG_NEWLINE);\r
-  if (r) {\r
-    regerror(r, &reg, buf, sizeof(buf));\r
-    fprintf(err_file, "ERROR: %s\n", buf);\r
-    nerror++;\r
-    return ;\r
-  }\r
-\r
-  r = regexec(&reg, str, reg.re_nsub + 1, pmatch, 0);\r
-  if (r != 0 && r != REG_NOMATCH) {\r
-    regerror(r, &reg, buf, sizeof(buf));\r
-    fprintf(err_file, "ERROR: %s\n", buf);\r
-    nerror++;\r
-    return ;\r
-  }\r
-\r
-  if (r == REG_NOMATCH) {\r
-    if (not) {\r
-      fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);\r
-      nsucc++;\r
-    }\r
-    else {\r
-      fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);\r
-      nfail++;\r
-    }\r
-  }\r
-  else {\r
-    if (not) {\r
-      fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);\r
-      nfail++;\r
-    }\r
-    else {\r
-      if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) {\r
-        fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);\r
-        nsucc++;\r
-      }\r
-      else {\r
-        fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,\r
-               from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo);\r
-        nfail++;\r
-      }\r
-    }\r
-  }\r
-  regfree(&reg);\r
-\r
-#else\r
-  regex_t* reg;\r
-  OnigErrorInfo einfo;\r
-\r
-  r = onig_new(&reg, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)),\r
-              ONIG_OPTION_DEFAULT, ONIG_ENCODING_SJIS, ONIG_SYNTAX_DEFAULT, &einfo);\r
-  if (r) {\r
-    char s[ONIG_MAX_ERROR_MESSAGE_LEN];\r
-    onig_error_code_to_str((UChar* )s, r, &einfo);\r
-    fprintf(err_file, "ERROR: %s\n", s);\r
-    nerror++;\r
-    return ;\r
-  }\r
-\r
-  r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)),\r
-                 (UChar* )str, (UChar* )(str + SLEN(str)),\r
-                 region, ONIG_OPTION_NONE);\r
-  if (r < ONIG_MISMATCH) {\r
-    char s[ONIG_MAX_ERROR_MESSAGE_LEN];\r
-    onig_error_code_to_str((UChar* )s, r);\r
-    fprintf(err_file, "ERROR: %s\n", s);\r
-    nerror++;\r
-    return ;\r
-  }\r
-\r
-  if (r == ONIG_MISMATCH) {\r
-    if (not) {\r
-      fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);\r
-      nsucc++;\r
-    }\r
-    else {\r
-      fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);\r
-      nfail++;\r
-    }\r
-  }\r
-  else {\r
-    if (not) {\r
-      fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);\r
-      nfail++;\r
-    }\r
-    else {\r
-      if (region->beg[mem] == from && region->end[mem] == to) {\r
-        fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);\r
-        nsucc++;\r
-      }\r
-      else {\r
-        fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,\r
-               from, to, region->beg[mem], region->end[mem]);\r
-        nfail++;\r
-      }\r
-    }\r
-  }\r
-  onig_free(reg);\r
-#endif\r
-}\r
-\r
-static void x2(char* pattern, char* str, int from, int to)\r
-{\r
-  xx(pattern, str, from, to, 0, 0);\r
-}\r
-\r
-static void x3(char* pattern, char* str, int from, int to, int mem)\r
-{\r
-  xx(pattern, str, from, to, mem, 0);\r
-}\r
-\r
-static void n(char* pattern, char* str)\r
-{\r
-  xx(pattern, str, 0, 0, 0, 1);\r
-}\r
-\r
-extern int main(int argc, char* argv[])\r
-{\r
-#ifndef POSIX_TEST\r
-  static OnigEncoding use_encs[1];\r
-\r
-  use_encs[0] = ONIG_ENCODING_SJIS;\r
-  onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));\r
-#endif\r
-\r
-  err_file = stdout;\r
-\r
-#ifdef POSIX_TEST\r
-  reg_set_encoding(REG_POSIX_ENCODING_SJIS);\r
-#else\r
-  region = onig_region_new();\r
-#endif\r
-\r
-  x2("", "", 0, 0);\r
-  x2("^", "", 0, 0);\r
-  x2("$", "", 0, 0);\r
-  x2("\\G", "", 0, 0);\r
-  x2("\\A", "", 0, 0);\r
-  x2("\\Z", "", 0, 0);\r
-  x2("\\z", "", 0, 0);\r
-  x2("^$", "", 0, 0);\r
-  x2("\\ca", "\001", 0, 1);\r
-  x2("\\C-b", "\002", 0, 1);\r
-  x2("\\c\\\\", "\034", 0, 1);\r
-  x2("q[\\c\\\\]", "q\034", 0, 2);\r
-  x2("", "a", 0, 0);\r
-  x2("a", "a", 0, 1);\r
-  x2("\\x61", "a", 0, 1);\r
-  x2("aa", "aa", 0, 2);\r
-  x2("aaa", "aaa", 0, 3);\r
-  x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35);\r
-  x2("ab", "ab", 0, 2);\r
-  x2("b", "ab", 1, 2);\r
-  x2("bc", "abc", 1, 3);\r
-  x2("(?i:#RET#)", "#INS##RET#", 5, 10);\r
-  x2("\\17", "\017", 0, 1);\r
-  x2("\\x1f", "\x1f", 0, 1);\r
-  x2("a(?#....\\\\JJJJ)b", "ab", 0, 2);\r
-  x2("(?x)  G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7);\r
-  x2(".", "a", 0, 1);\r
-  n(".", "");\r
-  x2("..", "ab", 0, 2);\r
-  x2("\\w", "e", 0, 1);\r
-  n("\\W", "e");\r
-  x2("\\s", " ", 0, 1);\r
-  x2("\\S", "b", 0, 1);\r
-  x2("\\d", "4", 0, 1);\r
-  n("\\D", "4");\r
-  x2("\\b", "z ", 0, 0);\r
-  x2("\\b", " z", 1, 1);\r
-  x2("\\B", "zz ", 1, 1);\r
-  x2("\\B", "z ", 2, 2);\r
-  x2("\\B", " z", 0, 0);\r
-  x2("[ab]", "b", 0, 1);\r
-  n("[ab]", "c");\r
-  x2("[a-z]", "t", 0, 1);\r
-  n("[^a]", "a");\r
-  x2("[^a]", "\n", 0, 1);\r
-  x2("[]]", "]", 0, 1);\r
-  n("[^]]", "]");\r
-  x2("[\\^]+", "0^^1", 1, 3);\r
-  x2("[b-]", "b", 0, 1);\r
-  x2("[b-]", "-", 0, 1);\r
-  x2("[\\w]", "z", 0, 1);\r
-  n("[\\w]", " ");\r
-  x2("[\\W]", "b$", 1, 2);\r
-  x2("[\\d]", "5", 0, 1);\r
-  n("[\\d]", "e");\r
-  x2("[\\D]", "t", 0, 1);\r
-  n("[\\D]", "3");\r
-  x2("[\\s]", " ", 0, 1);\r
-  n("[\\s]", "a");\r
-  x2("[\\S]", "b", 0, 1);\r
-  n("[\\S]", " ");\r
-  x2("[\\w\\d]", "2", 0, 1);\r
-  n("[\\w\\d]", " ");\r
-  x2("[[:upper:]]", "B", 0, 1);\r
-  x2("[*[:xdigit:]+]", "+", 0, 1);\r
-  x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7);\r
-  x2("[*[:xdigit:]+]", "-@^+", 3, 4);\r
-  n("[[:upper]]", "A");\r
-  x2("[[:upper]]", ":", 0, 1);\r
-  x2("[\\044-\\047]", "\046", 0, 1);\r
-  x2("[\\x5a-\\x5c]", "\x5b", 0, 1);\r
-  x2("[\\x6A-\\x6D]", "\x6c", 0, 1);\r
-  n("[\\x6A-\\x6D]", "\x6E");\r
-  n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype ()    External    | _rb_apply");\r
-  x2("[\\[]", "[", 0, 1);\r
-  x2("[\\]]", "]", 0, 1);\r
-  x2("[&]", "&", 0, 1);\r
-  x2("[[ab]]", "b", 0, 1);\r
-  x2("[[ab]c]", "c", 0, 1);\r
-  n("[[^a]]", "a");\r
-  n("[^[a]]", "a");\r
-  x2("[[ab]&&bc]", "b", 0, 1);\r
-  n("[[ab]&&bc]", "a");\r
-  n("[[ab]&&bc]", "c");\r
-  x2("[a-z&&b-y&&c-x]", "w", 0, 1);\r
-  n("[^a-z&&b-y&&c-x]", "w");\r
-  x2("[[^a&&a]&&a-z]", "b", 0, 1);\r
-  n("[[^a&&a]&&a-z]", "a");\r
-  x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1);\r
-  n("[[^a-z&&bcdef]&&[^c-g]]", "c");\r
-  x2("[^[^abc]&&[^cde]]", "c", 0, 1);\r
-  x2("[^[^abc]&&[^cde]]", "e", 0, 1);\r
-  n("[^[^abc]&&[^cde]]", "f");\r
-  x2("[a-&&-a]", "-", 0, 1);\r
-  n("[a\\-&&\\-a]", "&");\r
-  n("\\wabc", " abc");\r
-  x2("a\\Wbc", "a bc", 0, 4);\r
-  x2("a.b.c", "aabbc", 0, 5);\r
-  x2(".\\wb\\W..c", "abb bcc", 0, 7);\r
-  x2("\\s\\wzzz", " zzzz", 0, 5);\r
-  x2("aa.b", "aabb", 0, 4);\r
-  n(".a", "ab");\r
-  x2(".a", "aa", 0, 2);\r
-  x2("^a", "a", 0, 1);\r
-  x2("^a$", "a", 0, 1);\r
-  x2("^\\w$", "a", 0, 1);\r
-  n("^\\w$", " ");\r
-  x2("^\\wab$", "zab", 0, 3);\r
-  x2("^\\wabcdef$", "zabcdef", 0, 7);\r
-  x2("^\\w...def$", "zabcdef", 0, 7);\r
-  x2("\\w\\w\\s\\Waaa\\d", "aa  aaa4", 0, 8);\r
-  x2("\\A\\Z", "", 0, 0);\r
-  x2("\\Axyz", "xyz", 0, 3);\r
-  x2("xyz\\Z", "xyz", 0, 3);\r
-  x2("xyz\\z", "xyz", 0, 3);\r
-  x2("a\\Z", "a", 0, 1);\r
-  x2("\\Gaz", "az", 0, 2);\r
-  n("\\Gz", "bza");\r
-  n("az\\G", "az");\r
-  n("az\\A", "az");\r
-  n("a\\Az", "az");\r
-  x2("\\^\\$", "^$", 0, 2);\r
-  x2("^x?y", "xy", 0, 2);\r
-  x2("^(x?y)", "xy", 0, 2);\r
-  x2("\\w", "_", 0, 1);\r
-  n("\\W", "_");\r
-  x2("(?=z)z", "z", 0, 1);\r
-  n("(?=z).", "a");\r
-  x2("(?!z)a", "a", 0, 1);\r
-  n("(?!z)a", "z");\r
-  x2("(?i:a)", "a", 0, 1);\r
-  x2("(?i:a)", "A", 0, 1);\r
-  x2("(?i:A)", "a", 0, 1);\r
-  n("(?i:A)", "b");\r
-  x2("(?i:[A-Z])", "a", 0, 1);\r
-  x2("(?i:[f-m])", "H", 0, 1);\r
-  x2("(?i:[f-m])", "h", 0, 1);\r
-  n("(?i:[f-m])", "e");\r
-  x2("(?i:[A-c])", "D", 0, 1);\r
-  n("(?i:[^a-z])", "A");\r
-  n("(?i:[^a-z])", "a");\r
-  x2("(?i:[!-k])", "Z", 0, 1);\r
-  x2("(?i:[!-k])", "7", 0, 1);\r
-  x2("(?i:[T-}])", "b", 0, 1);\r
-  x2("(?i:[T-}])", "{", 0, 1);\r
-  x2("(?i:\\?a)", "?A", 0, 2);\r
-  x2("(?i:\\*A)", "*a", 0, 2);\r
-  n(".", "\n");\r
-  x2("(?m:.)", "\n", 0, 1);\r
-  x2("(?m:a.)", "a\n", 0, 2);\r
-  x2("(?m:.b)", "a\nb", 1, 3);\r
-  x2(".*abc", "dddabdd\nddabc", 8, 13);\r
-  x2("(?m:.*abc)", "dddabddabc", 0, 10);\r
-  n("(?i)(?-i)a", "A");\r
-  n("(?i)(?-i:a)", "A");\r
-  x2("a?", "", 0, 0);\r
-  x2("a?", "b", 0, 0);\r
-  x2("a?", "a", 0, 1);\r
-  x2("a*", "", 0, 0);\r
-  x2("a*", "a", 0, 1);\r
-  x2("a*", "aaa", 0, 3);\r
-  x2("a*", "baaaa", 0, 0);\r
-  n("a+", "");\r
-  x2("a+", "a", 0, 1);\r
-  x2("a+", "aaaa", 0, 4);\r
-  x2("a+", "aabbb", 0, 2);\r
-  x2("a+", "baaaa", 1, 5);\r
-  x2(".?", "", 0, 0);\r
-  x2(".?", "f", 0, 1);\r
-  x2(".?", "\n", 0, 0);\r
-  x2(".*", "", 0, 0);\r
-  x2(".*", "abcde", 0, 5);\r
-  x2(".+", "z", 0, 1);\r
-  x2(".+", "zdswer\n", 0, 6);\r
-  x2("(.*)a\\1f", "babfbac", 0, 4);\r
-  x2("(.*)a\\1f", "bacbabf", 3, 7);\r
-  x2("((.*)a\\2f)", "bacbabf", 3, 7);\r
-  x2("(.*)a\\1f", "baczzzzzz\nbazz\nzzzzbabf", 19, 23);\r
-  x2("a|b", "a", 0, 1);\r
-  x2("a|b", "b", 0, 1);\r
-  x2("|a", "a", 0, 0);\r
-  x2("(|a)", "a", 0, 0);\r
-  x2("ab|bc", "ab", 0, 2);\r
-  x2("ab|bc", "bc", 0, 2);\r
-  x2("z(?:ab|bc)", "zbc", 0, 3);\r
-  x2("a(?:ab|bc)c", "aabc", 0, 4);\r
-  x2("ab|(?:ac|az)", "az", 0, 2);\r
-  x2("a|b|c", "dc", 1, 2);\r
-  x2("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "pqr", 0, 2);\r
-  n("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "mn");\r
-  x2("a|^z", "ba", 1, 2);\r
-  x2("a|^z", "za", 0, 1);\r
-  x2("a|\\Gz", "bza", 2, 3);\r
-  x2("a|\\Gz", "za", 0, 1);\r
-  x2("a|\\Az", "bza", 2, 3);\r
-  x2("a|\\Az", "za", 0, 1);\r
-  x2("a|b\\Z", "ba", 1, 2);\r
-  x2("a|b\\Z", "b", 0, 1);\r
-  x2("a|b\\z", "ba", 1, 2);\r
-  x2("a|b\\z", "b", 0, 1);\r
-  x2("\\w|\\s", " ", 0, 1);\r
-  n("\\w|\\w", " ");\r
-  x2("\\w|%", "%", 0, 1);\r
-  x2("\\w|[&$]", "&", 0, 1);\r
-  x2("[b-d]|[^e-z]", "a", 0, 1);\r
-  x2("(?:a|[c-f])|bz", "dz", 0, 1);\r
-  x2("(?:a|[c-f])|bz", "bz", 0, 2);\r
-  x2("abc|(?=zz)..f", "zzf", 0, 3);\r
-  x2("abc|(?!zz)..f", "abf", 0, 3);\r
-  x2("(?=za)..a|(?=zz)..a", "zza", 0, 3);\r
-  n("(?>a|abd)c", "abdc");\r
-  x2("(?>abd|a)c", "abdc", 0, 4);\r
-  x2("a?|b", "a", 0, 1);\r
-  x2("a?|b", "b", 0, 0);\r
-  x2("a?|b", "", 0, 0);\r
-  x2("a*|b", "aa", 0, 2);\r
-  x2("a*|b*", "ba", 0, 0);\r
-  x2("a*|b*", "ab", 0, 1);\r
-  x2("a+|b*", "", 0, 0);\r
-  x2("a+|b*", "bbb", 0, 3);\r
-  x2("a+|b*", "abbb", 0, 1);\r
-  n("a+|b+", "");\r
-  x2("(a|b)?", "b", 0, 1);\r
-  x2("(a|b)*", "ba", 0, 2);\r
-  x2("(a|b)+", "bab", 0, 3);\r
-  x2("(ab|ca)+", "caabbc", 0, 4);\r
-  x2("(ab|ca)+", "aabca", 1, 5);\r
-  x2("(ab|ca)+", "abzca", 0, 2);\r
-  x2("(a|bab)+", "ababa", 0, 5);\r
-  x2("(a|bab)+", "ba", 1, 2);\r
-  x2("(a|bab)+", "baaaba", 1, 4);\r
-  x2("(?:a|b)(?:a|b)", "ab", 0, 2);\r
-  x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3);\r
-  x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6);\r
-  x2("(?:a+|b+){2}", "aaabbb", 0, 6);\r
-  x2("h{0,}", "hhhh", 0, 4);\r
-  x2("(?:a+|b+){1,2}", "aaabbb", 0, 6);\r
-  n("ax{2}*a", "0axxxa1");\r
-  n("a.{0,2}a", "0aXXXa0");\r
-  n("a.{0,2}?a", "0aXXXa0");\r
-  n("a.{0,2}?a", "0aXXXXa0");\r
-  x2("^a{2,}?a$", "aaa", 0, 3);\r
-  x2("^[a-z]{2,}?$", "aaa", 0, 3);\r
-  x2("(?:a+|\\Ab*)cc", "cc", 0, 2);\r
-  n("(?:a+|\\Ab*)cc", "abcc");\r
-  x2("(?:^a+|b+)*c", "aabbbabc", 6, 8);\r
-  x2("(?:^a+|b+)*c", "aabbbbc", 0, 7);\r
-  x2("a|(?i)c", "C", 0, 1);\r
-  x2("(?i)c|a", "C", 0, 1);\r
-  x2("(?i)c|a", "A", 0, 1);\r
-  x2("(?i:c)|a", "C", 0, 1);\r
-  n("(?i:c)|a", "A");\r
-  x2("[abc]?", "abc", 0, 1);\r
-  x2("[abc]*", "abc", 0, 3);\r
-  x2("[^abc]*", "abc", 0, 0);\r
-  n("[^abc]+", "abc");\r
-  x2("a?\?", "aaa", 0, 0);\r
-  x2("ba?\?b", "bab", 0, 3);\r
-  x2("a*?", "aaa", 0, 0);\r
-  x2("ba*?", "baa", 0, 1);\r
-  x2("ba*?b", "baab", 0, 4);\r
-  x2("a+?", "aaa", 0, 1);\r
-  x2("ba+?", "baa", 0, 2);\r
-  x2("ba+?b", "baab", 0, 4);\r
-  x2("(?:a?)?\?", "a", 0, 0);\r
-  x2("(?:a?\?)?", "a", 0, 0);\r
-  x2("(?:a?)+?", "aaa", 0, 1);\r
-  x2("(?:a+)?\?", "aaa", 0, 0);\r
-  x2("(?:a+)?\?b", "aaab", 0, 4);\r
-  x2("(?:ab)?{2}", "", 0, 0);\r
-  x2("(?:ab)?{2}", "ababa", 0, 4);\r
-  x2("(?:ab)*{0}", "ababa", 0, 0);\r
-  x2("(?:ab){3,}", "abababab", 0, 8);\r
-  n("(?:ab){3,}", "abab");\r
-  x2("(?:ab){2,4}", "ababab", 0, 6);\r
-  x2("(?:ab){2,4}", "ababababab", 0, 8);\r
-  x2("(?:ab){2,4}?", "ababababab", 0, 4);\r
-  x2("(?:ab){,}", "ab{,}", 0, 5);\r
-  x2("(?:abc)+?{2}", "abcabcabc", 0, 6);\r
-  x2("(?:X*)(?i:xa)", "XXXa", 0, 4);\r
-  x2("(d+)([^abc]z)", "dddz", 0, 4);\r
-  x2("([^abc]*)([^abc]z)", "dddz", 0, 4);\r
-  x2("(\\w+)(\\wz)", "dddz", 0, 4);\r
-  x3("(a)", "a", 0, 1, 1);\r
-  x3("(ab)", "ab", 0, 2, 1);\r
-  x2("((ab))", "ab", 0, 2);\r
-  x3("((ab))", "ab", 0, 2, 1);\r
-  x3("((ab))", "ab", 0, 2, 2);\r
-  x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20);\r
-  x3("(ab)(cd)", "abcd", 0, 2, 1);\r
-  x3("(ab)(cd)", "abcd", 2, 4, 2);\r
-  x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3);\r
-  x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4);\r
-  x2("(^a)", "a", 0, 1);\r
-  x3("(a)|(a)", "ba", 1, 2, 1);\r
-  x3("(^a)|(a)", "ba", 1, 2, 2);\r
-  x3("(a?)", "aaa", 0, 1, 1);\r
-  x3("(a*)", "aaa", 0, 3, 1);\r
-  x3("(a*)", "", 0, 0, 1);\r
-  x3("(a+)", "aaaaaaa", 0, 7, 1);\r
-  x3("(a+|b*)", "bbbaa", 0, 3, 1);\r
-  x3("(a+|b?)", "bbbaa", 0, 1, 1);\r
-  x3("(abc)?", "abc", 0, 3, 1);\r
-  x3("(abc)*", "abc", 0, 3, 1);\r
-  x3("(abc)+", "abc", 0, 3, 1);\r
-  x3("(xyz|abc)+", "abc", 0, 3, 1);\r
-  x3("([xyz][abc]|abc)+", "abc", 0, 3, 1);\r
-  x3("((?i:abc))", "AbC", 0, 3, 1);\r
-  x2("(abc)(?i:\\1)", "abcABC", 0, 6);\r
-  x3("((?m:a.c))", "a\nc", 0, 3, 1);\r
-  x3("((?=az)a)", "azb", 0, 1, 1);\r
-  x3("abc|(.abd)", "zabd", 0, 4, 1);\r
-  x2("(?:abc)|(ABC)", "abc", 0, 3);\r
-  x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1);\r
-  x3("a*(.)", "aaaaz", 4, 5, 1);\r
-  x3("a*?(.)", "aaaaz", 0, 1, 1);\r
-  x3("a*?(c)", "aaaac", 4, 5, 1);\r
-  x3("[bcd]a*(.)", "caaaaz", 5, 6, 1);\r
-  x3("(\\Abb)cc", "bbcc", 0, 2, 1);\r
-  n("(\\Abb)cc", "zbbcc");\r
-  x3("(^bb)cc", "bbcc", 0, 2, 1);\r
-  n("(^bb)cc", "zbbcc");\r
-  x3("cc(bb$)", "ccbb", 2, 4, 1);\r
-  n("cc(bb$)", "ccbbb");\r
-  n("(\\1)", "");\r
-  n("\\1(a)", "aa");\r
-  n("(a(b)\\1)\\2+", "ababb");\r
-  n("(?:(?:\\1|z)(a))+$", "zaa");\r
-  x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4);\r
-  x2("(a)(?=\\1)", "aa", 0, 1);\r
-  n("(a)$|\\1", "az");\r
-  x2("(a)\\1", "aa", 0, 2);\r
-  n("(a)\\1", "ab");\r
-  x2("(a?)\\1", "aa", 0, 2);\r
-  x2("(a?\?)\\1", "aa", 0, 0);\r
-  x2("(a*)\\1", "aaaaa", 0, 4);\r
-  x3("(a*)\\1", "aaaaa", 0, 2, 1);\r
-  x2("a(b*)\\1", "abbbb", 0, 5);\r
-  x2("a(b*)\\1", "ab", 0, 1);\r
-  x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10);\r
-  x2("(a*)(b*)\\2", "aaabbbb", 0, 7);\r
-  x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8);\r
-  x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7);\r
-  x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6);\r
-  x2("([a-d])\\1", "cc", 0, 2);\r
-  x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6);\r
-  n("(\\w\\d\\s)\\1", "f5 f5");\r
-  x2("(who|[a-c]{3})\\1", "whowho", 0, 6);\r
-  x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9);\r
-  x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6);\r
-  x2("(^a)\\1", "aa", 0, 2);\r
-  n("(^a)\\1", "baa");\r
-  n("(a$)\\1", "aa");\r
-  n("(ab\\Z)\\1", "ab");\r
-  x2("(a*\\Z)\\1", "a", 1, 1);\r
-  x2(".(a*\\Z)\\1", "ba", 1, 2);\r
-  x3("(.(abc)\\2)", "zabcabc", 0, 7, 1);\r
-  x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1);\r
-  x2("((?i:az))\\1", "AzAz", 0, 4);\r
-  n("((?i:az))\\1", "Azaz");\r
-  x2("(?<=a)b", "ab", 1, 2);\r
-  n("(?<=a)b", "bb");\r
-  x2("(?<=a|b)b", "bb", 1, 2);\r
-  x2("(?<=a|bc)b", "bcb", 2, 3);\r
-  x2("(?<=a|bc)b", "ab", 1, 2);\r
-  x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2);\r
-  x2("(a)\\g<1>", "aa", 0, 2);\r
-  x2("(?<!a)b", "cb", 1, 2);\r
-  n("(?<!a)b", "ab");\r
-  x2("(?<!a|bc)b", "bbb", 0, 1);\r
-  n("(?<!a|bc)z", "bcz");\r
-  x2("(?<name1>a)", "a", 0, 1);\r
-  x2("(?<name_2>ab)\\g<name_2>", "abab", 0, 4);\r
-  x2("(?<name_3>.zv.)\\k<name_3>", "azvbazvb", 0, 8);\r
-  x2("(?<=\\g<ab>)|-\\zEND (?<ab>XyZ)", "XyZ", 3, 3);\r
-  x2("(?<n>|a\\g<n>)+", "", 0, 0);\r
-  x2("(?<n>|\\(\\g<n>\\))+$", "()(())", 0, 6);\r
-  x3("\\g<n>(?<n>.){0}", "X", 0, 1, 1);\r
-  x2("\\g<n>(abc|df(?<n>.YZ){2,8}){0}", "XYZ", 0, 3);\r
-  x2("\\A(?<n>(a\\g<n>)|)\\z", "aaaa", 0, 4);\r
-  x2("(?<n>|\\g<m>\\g<n>)\\z|\\zEND (?<m>a|(b)\\g<m>)", "bbbbabba", 0, 8);\r
-  x2("(?<name1240>\\w+\\sx)a+\\k<name1240>", "  fg xaaaaaaaafg x", 2, 18);\r
-  x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1);\r
-  x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3);\r
-  x2("((?<name1>\\d)|(?<name2>\\w))(\\k<name1>|\\k<name2>)", "ff", 0, 2);\r
-  x2("(?:(?<x>)|(?<x>efg))\\k<x>", "", 0, 0);\r
-  x2("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefgefg", 3, 9);\r
-  n("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefg");\r
-  x2("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "a-pyumpyum", 2, 10);\r
-  x3("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14);\r
-  x3("(?<name1>)(?<name2>)(?<name3>)(?<name4>)(?<name5>)(?<name6>)(?<name7>)(?<name8>)(?<name9>)(?<name10>)(?<name11>)(?<name12>)(?<name13>)(?<name14>)(?<name15>)(?<name16>aaa)(?<name17>)$", "aaa", 0, 3, 16);\r
-  x2("(?<foo>a|\\(\\g<foo>\\))", "a", 0, 1);\r
-  x2("(?<foo>a|\\(\\g<foo>\\))", "((((((a))))))", 0, 13);\r
-  x3("(?<foo>a|\\(\\g<foo>\\))", "((((((((a))))))))", 0, 17, 1);\r
-  x2("\\g<bar>|\\zEND(?<bar>.*abc$)", "abcxxxabc", 0, 9);\r
-  x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3);\r
-  x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1);\r
-  x2("\\A(?:\\g<pon>|\\g<pan>|\\zEND  (?<pan>a|c\\g<pon>c)(?<pon>b|d\\g<pan>d))$", "cdcbcdc", 0, 7);\r
-  x2("\\A(?<n>|a\\g<m>)\\z|\\zEND (?<m>\\g<n>)", "aaaa", 0, 4);\r
-  x2("(?<n>(a|b\\g<n>c){3,5})", "baaaaca", 1, 5);\r
-  x2("(?<n>(a|b\\g<n>c){3,5})", "baaaacaaaaa", 0, 10);\r
-  x2("(?<pare>\\(([^\\(\\)]++|\\g<pare>)*+\\))", "((a))", 0, 5);\r
-  x2("()*\\1", "", 0, 0);\r
-  x2("(?:()|())*\\1\\2", "", 0, 0);\r
-  x3("(?:\\1a|())*", "a", 0, 0, 1);\r
-  x2("x((.)*)*x", "0x1x2x3", 1, 6);\r
-  x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9);\r
-  x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0);\r
-  x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1);\r
-  x2("\\xED\\xF2", "\xed\xf2", 0, 2);\r
-  x2("", "\82 ", 0, 0);\r
-  x2("\82 ", "\82 ", 0, 2);\r
-  n("\82¢", "\82 ");\r
-  x2("\82¤\82¤", "\82¤\82¤", 0, 4);\r
-  x2("\82 \82¢\82¤", "\82 \82¢\82¤", 0, 6);\r
-  x2("\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±", "\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±", 0, 70);\r
-  x2("\82 ", "\82¢\82 ", 2, 4);\r
-  x2("\82¢\82¤", "\82 \82¢\82¤", 2, 6);\r
-  x2("\\xca\\xb8", "\xca\xb8", 0, 2);\r
-  x2(".", "\82 ", 0, 2);\r
-  x2("..", "\82©\82«", 0, 4);\r
-  x2("\\w", "\82¨", 0, 2);\r
-  n("\\W", "\82 ");\r
-  x2("[\\W]", "\82¤$", 2, 3);\r
-  x2("\\S", "\82»", 0, 2);\r
-  x2("\\S", "\8a¿", 0, 2);\r
-  x2("\\b", "\8bC ", 0, 0);\r
-  x2("\\b", " \82Ù", 1, 1);\r
-  x2("\\B", "\82¹\82» ", 2, 2);\r
-  x2("\\B", "\82¤ ", 3, 3);\r
-  x2("\\B", " \82¢", 0, 0);\r
-  x2("[\82½\82¿]", "\82¿", 0, 2);\r
-  n("[\82È\82É]", "\82Ê");\r
-  x2("[\82¤-\82¨]", "\82¦", 0, 2);\r
-  n("[^\82¯]", "\82¯");\r
-  x2("[\\w]", "\82Ë", 0, 2);\r
-  n("[\\d]", "\82Ó");\r
-  x2("[\\D]", "\82Í", 0, 2);\r
-  n("[\\s]", "\82­");\r
-  x2("[\\S]", "\82Ö", 0, 2);\r
-  x2("[\\w\\d]", "\82æ", 0, 2);\r
-  x2("[\\w\\d]", "   \82æ", 3, 5);\r
-  n("\\w\8bS\8eÔ", " \8bS\8eÔ");\r
-  x2("\8bS\\W\8eÔ", "\8b\8eÔ", 0, 5);\r
-  x2("\82 .\82¢.\82¤", "\82 \82 \82¢\82¢\82¤", 0, 10);\r
-  x2(".\\w\82¤\\W..\82¼", "\82¦\82¤\82¤ \82¤\82¼\82¼", 0, 13);\r
-  x2("\\s\\w\82±\82±\82±", " \82±\82±\82±\82±", 0, 9);\r
-  x2("\82 \82 .\82¯", "\82 \82 \82¯\82¯", 0, 8);\r
-  n(".\82¢", "\82¢\82¦");\r
-  x2(".\82¨", "\82¨\82¨", 0, 4);\r
-  x2("^\82 ", "\82 ", 0, 2);\r
-  x2("^\82Þ$", "\82Þ", 0, 2);\r
-  x2("^\\w$", "\82É", 0, 2);\r
-  x2("^\\w\82©\82«\82­\82¯\82±$", "z\82©\82«\82­\82¯\82±", 0, 11);\r
-  x2("^\\w...\82¤\82¦\82¨$", "z\82 \82¢\82¤\82¤\82¦\82¨", 0, 13);\r
-  x2("\\w\\w\\s\\W\82¨\82¨\82¨\\d", "a\82¨  \82¨\82¨\82¨4", 0, 12);\r
-  x2("\\A\82½\82¿\82Â", "\82½\82¿\82Â", 0, 6);\r
-  x2("\82Þ\82ß\82à\\Z", "\82Þ\82ß\82à", 0, 6);\r
-  x2("\82©\82«\82­\\z", "\82©\82«\82­", 0, 6);\r
-  x2("\82©\82«\82­\\Z", "\82©\82«\82­\n", 0, 6);\r
-  x2("\\G\82Û\82Ò", "\82Û\82Ò", 0, 4);\r
-  n("\\G\82¦", "\82¤\82¦\82¨");\r
-  n("\82Æ\82Ä\\G", "\82Æ\82Ä");\r
-  n("\82Ü\82Ý\\A", "\82Ü\82Ý");\r
-  n("\82Ü\\A\82Ý", "\82Ü\82Ý");\r
-  x2("(?=\82¹)\82¹", "\82¹", 0, 2);\r
-  n("(?=\82¤).", "\82¢");\r
-  x2("(?!\82¤)\82©", "\82©", 0, 2);\r
-  n("(?!\82Æ)\82 ", "\82Æ");\r
-  x2("(?i:\82 )", "\82 ", 0, 2);\r
-  x2("(?i:\82Ô\82×)", "\82Ô\82×", 0, 4);\r
-  n("(?i:\82¢)", "\82¤");\r
-  x2("(?m:\82æ.)", "\82æ\n", 0, 3);\r
-  x2("(?m:.\82ß)", "\82Ü\n\82ß", 2, 5);\r
-  x2("\82 ?", "", 0, 0);\r
-  x2("\95Ï?", "\89»", 0, 0);\r
-  x2("\95Ï?", "\95Ï", 0, 2);\r
-  x2("\97Ê*", "", 0, 0);\r
-  x2("\97Ê*", "\97Ê", 0, 2);\r
-  x2("\8eq*", "\8eq\8eq\8eq", 0, 6);\r
-  x2("\94n*", "\8e­\94n\94n\94n\94n", 0, 0);\r
-  n("\8eR+", "");\r
-  x2("\89Í+", "\89Í", 0, 2);\r
-  x2("\8e\9e+", "\8e\9e\8e\9e\8e\9e\8e\9e", 0, 8);\r
-  x2("\82¦+", "\82¦\82¦\82¤\82¤\82¤", 0, 4);\r
-  x2("\82¤+", "\82¨\82¤\82¤\82¤\82¤", 2, 10);\r
-  x2(".?", "\82½", 0, 2);\r
-  x2(".*", "\82Ï\82Ò\82Õ\82Ø", 0, 8);\r
-  x2(".+", "\82ë", 0, 2);\r
-  x2(".+", "\82¢\82¤\82¦\82©\n", 0, 8);\r
-  x2("\82 |\82¢", "\82 ", 0, 2);\r
-  x2("\82 |\82¢", "\82¢", 0, 2);\r
-  x2("\82 \82¢|\82¢\82¤", "\82 \82¢", 0, 4);\r
-  x2("\82 \82¢|\82¢\82¤", "\82¢\82¤", 0, 4);\r
-  x2("\82ð(?:\82©\82«|\82«\82­)", "\82ð\82©\82«", 0, 6);\r
-  x2("\82ð(?:\82©\82«|\82«\82­)\82¯", "\82ð\82«\82­\82¯", 0, 8);\r
-  x2("\82 \82¢|(?:\82 \82¤|\82 \82ð)", "\82 \82ð", 0, 4);\r
-  x2("\82 |\82¢|\82¤", "\82¦\82¤", 2, 4);\r
-  x2("\82 |\82¢|\82¤\82¦|\82¨\82©\82«|\82­|\82¯\82±\82³|\82µ\82·\82¹|\82»|\82½\82¿|\82Â\82Ä\82Æ\82È\82É|\82Ê\82Ë", "\82µ\82·\82¹", 0, 6);\r
-  n("\82 |\82¢|\82¤\82¦|\82¨\82©\82«|\82­|\82¯\82±\82³|\82µ\82·\82¹|\82»|\82½\82¿|\82Â\82Ä\82Æ\82È\82É|\82Ê\82Ë", "\82·\82¹");\r
-  x2("\82 |^\82í", "\82Ô\82 ", 2, 4);\r
-  x2("\82 |^\82ð", "\82ð\82 ", 0, 2);\r
-  x2("\8bS|\\G\8eÔ", "\82¯\8eÔ\8bS", 4, 6);\r
-  x2("\8bS|\\G\8eÔ", "\8eÔ\8bS", 0, 2);\r
-  x2("\8bS|\\A\8eÔ", "b\8eÔ\8bS", 3, 5);\r
-  x2("\8bS|\\A\8eÔ", "\8eÔ", 0, 2);\r
-  x2("\8bS|\8eÔ\\Z", "\8eÔ\8bS", 2, 4);\r
-  x2("\8bS|\8eÔ\\Z", "\8eÔ", 0, 2);\r
-  x2("\8bS|\8eÔ\\Z", "\8eÔ\n", 0, 2);\r
-  x2("\8bS|\8eÔ\\z", "\8eÔ\8bS", 2, 4);\r
-  x2("\8bS|\8eÔ\\z", "\8eÔ", 0, 2);\r
-  x2("\\w|\\s", "\82¨", 0, 2);\r
-  x2("\\w|%", "%\82¨", 0, 1);\r
-  x2("\\w|[&$]", "\82¤&", 0, 2);\r
-  x2("[\82¢-\82¯]", "\82¤", 0, 2);\r
-  x2("[\82¢-\82¯]|[^\82©-\82±]", "\82 ", 0, 2);\r
-  x2("[\82¢-\82¯]|[^\82©-\82±]", "\82©", 0, 2);\r
-  x2("[^\82 ]", "\n", 0, 1);\r
-  x2("(?:\82 |[\82¤-\82«])|\82¢\82ð", "\82¤\82ð", 0, 2);\r
-  x2("(?:\82 |[\82¤-\82«])|\82¢\82ð", "\82¢\82ð", 0, 4);\r
-  x2("\82 \82¢\82¤|(?=\82¯\82¯)..\82Ù", "\82¯\82¯\82Ù", 0, 6);\r
-  x2("\82 \82¢\82¤|(?!\82¯\82¯)..\82Ù", "\82 \82¢\82Ù", 0, 6);\r
-  x2("(?=\82ð\82 )..\82 |(?=\82ð\82ð)..\82 ", "\82ð\82ð\82 ", 0, 6);\r
-  x2("(?<=\82 |\82¢\82¤)\82¢", "\82¢\82¤\82¢", 4, 6);\r
-  n("(?>\82 |\82 \82¢\82¦)\82¤", "\82 \82¢\82¦\82¤");\r
-  x2("(?>\82 \82¢\82¦|\82 )\82¤", "\82 \82¢\82¦\82¤", 0, 8);\r
-  x2("\82 ?|\82¢", "\82 ", 0, 2);\r
-  x2("\82 ?|\82¢", "\82¢", 0, 0);\r
-  x2("\82 ?|\82¢", "", 0, 0);\r
-  x2("\82 *|\82¢", "\82 \82 ", 0, 4);\r
-  x2("\82 *|\82¢*", "\82¢\82 ", 0, 0);\r
-  x2("\82 *|\82¢*", "\82 \82¢", 0, 2);\r
-  x2("[a\82 ]*|\82¢*", "a\82 \82¢\82¢\82¢", 0, 3);\r
-  x2("\82 +|\82¢*", "", 0, 0);\r
-  x2("\82 +|\82¢*", "\82¢\82¢\82¢", 0, 6);\r
-  x2("\82 +|\82¢*", "\82 \82¢\82¢\82¢", 0, 2);\r
-  x2("\82 +|\82¢*", "a\82 \82¢\82¢\82¢", 0, 0);\r
-  n("\82 +|\82¢+", "");\r
-  x2("(\82 |\82¢)?", "\82¢", 0, 2);\r
-  x2("(\82 |\82¢)*", "\82¢\82 ", 0, 4);\r
-  x2("(\82 |\82¢)+", "\82¢\82 \82¢", 0, 6);\r
-  x2("(\82 \82¢|\82¤\82 )+", "\82¤\82 \82 \82¢\82¤\82¦", 0, 8);\r
-  x2("(\82 \82¢|\82¤\82¦)+", "\82¤\82 \82 \82¢\82¤\82¦", 4, 12);\r
-  x2("(\82 \82¢|\82¤\82 )+", "\82 \82 \82¢\82¤\82 ", 2, 10);\r
-  x2("(\82 \82¢|\82¤\82 )+", "\82 \82¢\82ð\82¤\82 ", 0, 4);\r
-  x2("(\82 \82¢|\82¤\82 )+", "$$zzzz\82 \82¢\82ð\82¤\82 ", 6, 10);\r
-  x2("(\82 |\82¢\82 \82¢)+", "\82 \82¢\82 \82¢\82 ", 0, 10);\r
-  x2("(\82 |\82¢\82 \82¢)+", "\82¢\82 ", 2, 4);\r
-  x2("(\82 |\82¢\82 \82¢)+", "\82¢\82 \82 \82 \82¢\82 ", 2, 8);\r
-  x2("(?:\82 |\82¢)(?:\82 |\82¢)", "\82 \82¢", 0, 4);\r
-  x2("(?:\82 *|\82¢*)(?:\82 *|\82¢*)", "\82 \82 \82 \82¢\82¢\82¢", 0, 6);\r
-  x2("(?:\82 *|\82¢*)(?:\82 +|\82¢+)", "\82 \82 \82 \82¢\82¢\82¢", 0, 12);\r
-  x2("(?:\82 +|\82¢+){2}", "\82 \82 \82 \82¢\82¢\82¢", 0, 12);\r
-  x2("(?:\82 +|\82¢+){1,2}", "\82 \82 \82 \82¢\82¢\82¢", 0, 12);\r
-  x2("(?:\82 +|\\A\82¢*)\82¤\82¤", "\82¤\82¤", 0, 4);\r
-  n("(?:\82 +|\\A\82¢*)\82¤\82¤", "\82 \82¢\82¤\82¤");\r
-  x2("(?:^\82 +|\82¢+)*\82¤", "\82 \82 \82¢\82¢\82¢\82 \82¢\82¤", 12, 16);\r
-  x2("(?:^\82 +|\82¢+)*\82¤", "\82 \82 \82¢\82¢\82¢\82¢\82¤", 0, 14);\r
-  x2("\82¤{0,}", "\82¤\82¤\82¤\82¤", 0, 8);\r
-  x2("\82 |(?i)c", "C", 0, 1);\r
-  x2("(?i)c|\82 ", "C", 0, 1);\r
-  x2("(?i:\82 )|a", "a", 0, 1);\r
-  n("(?i:\82 )|a", "A");\r
-  x2("[\82 \82¢\82¤]?", "\82 \82¢\82¤", 0, 2);\r
-  x2("[\82 \82¢\82¤]*", "\82 \82¢\82¤", 0, 6);\r
-  x2("[^\82 \82¢\82¤]*", "\82 \82¢\82¤", 0, 0);\r
-  n("[^\82 \82¢\82¤]+", "\82 \82¢\82¤");\r
-  x2("\82 ?\?", "\82 \82 \82 ", 0, 0);\r
-  x2("\82¢\82 ?\?\82¢", "\82¢\82 \82¢", 0, 6);\r
-  x2("\82 *?", "\82 \82 \82 ", 0, 0);\r
-  x2("\82¢\82 *?", "\82¢\82 \82 ", 0, 2);\r
-  x2("\82¢\82 *?\82¢", "\82¢\82 \82 \82¢", 0, 8);\r
-  x2("\82 +?", "\82 \82 \82 ", 0, 2);\r
-  x2("\82¢\82 +?", "\82¢\82 \82 ", 0, 4);\r
-  x2("\82¢\82 +?\82¢", "\82¢\82 \82 \82¢", 0, 8);\r
-  x2("(?:\93V?)?\?", "\93V", 0, 0);\r
-  x2("(?:\93V?\?)?", "\93V", 0, 0);\r
-  x2("(?:\96²?)+?", "\96²\96²\96²", 0, 2);\r
-  x2("(?:\95\97+)?\?", "\95\97\95\97\95\97", 0, 0);\r
-  x2("(?:\90á+)?\?\91\9a", "\90á\90á\90á\91\9a", 0, 8);\r
-  x2("(?:\82 \82¢)?{2}", "", 0, 0);\r
-  x2("(?:\8bS\8eÔ)?{2}", "\8bS\8eÔ\8bS\8eÔ\8bS", 0, 8);\r
-  x2("(?:\8bS\8eÔ)*{0}", "\8bS\8eÔ\8bS\8eÔ\8bS", 0, 0);\r
-  x2("(?:\8bS\8eÔ){3,}", "\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ", 0, 16);\r
-  n("(?:\8bS\8eÔ){3,}", "\8bS\8eÔ\8bS\8eÔ");\r
-  x2("(?:\8bS\8eÔ){2,4}", "\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ", 0, 12);\r
-  x2("(?:\8bS\8eÔ){2,4}", "\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ", 0, 16);\r
-  x2("(?:\8bS\8eÔ){2,4}?", "\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ", 0, 8);\r
-  x2("(?:\8bS\8eÔ){,}", "\8bS\8eÔ{,}", 0, 7);\r
-  x2("(?:\82©\82«\82­)+?{2}", "\82©\82«\82­\82©\82«\82­\82©\82«\82­", 0, 12);\r
-  x3("(\89Î)", "\89Î", 0, 2, 1);\r
-  x3("(\89Î\90\85)", "\89Î\90\85", 0, 4, 1);\r
-  x2("((\8e\9e\8aÔ))", "\8e\9e\8aÔ", 0, 4);\r
-  x3("((\95\97\90\85))", "\95\97\90\85", 0, 4, 1);\r
-  x3("((\8dð\93ú))", "\8dð\93ú", 0, 4, 2);\r
-  x3("((((((((((((((((((((\97Ê\8eq))))))))))))))))))))", "\97Ê\8eq", 0, 4, 20);\r
-  x3("(\82 \82¢)(\82¤\82¦)", "\82 \82¢\82¤\82¦", 0, 4, 1);\r
-  x3("(\82 \82¢)(\82¤\82¦)", "\82 \82¢\82¤\82¦", 4, 8, 2);\r
-  x3("()(\82 )\82¢\82¤(\82¦\82¨\82©)\82«\82­\82¯\82±", "\82 \82¢\82¤\82¦\82¨\82©\82«\82­\82¯\82±", 6, 12, 3);\r
-  x3("(()(\82 )\82¢\82¤(\82¦\82¨\82©)\82«\82­\82¯\82±)", "\82 \82¢\82¤\82¦\82¨\82©\82«\82­\82¯\82±", 6, 12, 4);\r
-  x3(".*(\83t\83H)\83\93\81E\83}(\83\93()\83V\83\85\83^)\83C\83\93", "\83t\83H\83\93\81E\83}\83\93\83V\83\85\83^\83C\83\93", 10, 18, 2);\r
-  x2("(^\82 )", "\82 ", 0, 2);\r
-  x3("(\82 )|(\82 )", "\82¢\82 ", 2, 4, 1);\r
-  x3("(^\82 )|(\82 )", "\82¢\82 ", 2, 4, 2);\r
-  x3("(\82 ?)", "\82 \82 \82 ", 0, 2, 1);\r
-  x3("(\82Ü*)", "\82Ü\82Ü\82Ü", 0, 6, 1);\r
-  x3("(\82Æ*)", "", 0, 0, 1);\r
-  x3("(\82é+)", "\82é\82é\82é\82é\82é\82é\82é", 0, 14, 1);\r
-  x3("(\82Ó+|\82Ö*)", "\82Ó\82Ó\82Ó\82Ö\82Ö", 0, 6, 1);\r
-  x3("(\82 +|\82¢?)", "\82¢\82¢\82¢\82 \82 ", 0, 2, 1);\r
-  x3("(\82 \82¢\82¤)?", "\82 \82¢\82¤", 0, 6, 1);\r
-  x3("(\82 \82¢\82¤)*", "\82 \82¢\82¤", 0, 6, 1);\r
-  x3("(\82 \82¢\82¤)+", "\82 \82¢\82¤", 0, 6, 1);\r
-  x3("(\82³\82µ\82·|\82 \82¢\82¤)+", "\82 \82¢\82¤", 0, 6, 1);\r
-  x3("([\82È\82É\82Ê][\82©\82«\82­]|\82©\82«\82­)+", "\82©\82«\82­", 0, 6, 1);\r
-  x3("((?i:\82 \82¢\82¤))", "\82 \82¢\82¤", 0, 6, 1);\r
-  x3("((?m:\82 .\82¤))", "\82 \n\82¤", 0, 5, 1);\r
-  x3("((?=\82 \82ñ)\82 )", "\82 \82ñ\82¢", 0, 2, 1);\r
-  x3("\82 \82¢\82¤|(.\82 \82¢\82¦)", "\82ñ\82 \82¢\82¦", 0, 8, 1);\r
-  x3("\82 *(.)", "\82 \82 \82 \82 \82ñ", 8, 10, 1);\r
-  x3("\82 *?(.)", "\82 \82 \82 \82 \82ñ", 0, 2, 1);\r
-  x3("\82 *?(\82ñ)", "\82 \82 \82 \82 \82ñ", 8, 10, 1);\r
-  x3("[\82¢\82¤\82¦]\82 *(.)", "\82¦\82 \82 \82 \82 \82ñ", 10, 12, 1);\r
-  x3("(\\A\82¢\82¢)\82¤\82¤", "\82¢\82¢\82¤\82¤", 0, 4, 1);\r
-  n("(\\A\82¢\82¢)\82¤\82¤", "\82ñ\82¢\82¢\82¤\82¤");\r
-  x3("(^\82¢\82¢)\82¤\82¤", "\82¢\82¢\82¤\82¤", 0, 4, 1);\r
-  n("(^\82¢\82¢)\82¤\82¤", "\82ñ\82¢\82¢\82¤\82¤");\r
-  x3("\82ë\82ë(\82é\82é$)", "\82ë\82ë\82é\82é", 4, 8, 1);\r
-  n("\82ë\82ë(\82é\82é$)", "\82ë\82ë\82é\82é\82é");\r
-  x2("(\96³)\\1", "\96³\96³", 0, 4);\r
-  n("(\96³)\\1", "\96³\95\90");\r
-  x2("(\8bó?)\\1", "\8bó\8bó", 0, 4);\r
-  x2("(\8bó?\?)\\1", "\8bó\8bó", 0, 0);\r
-  x2("(\8bó*)\\1", "\8bó\8bó\8bó\8bó\8bó", 0, 8);\r
-  x3("(\8bó*)\\1", "\8bó\8bó\8bó\8bó\8bó", 0, 4, 1);\r
-  x2("\82 (\82¢*)\\1", "\82 \82¢\82¢\82¢\82¢", 0, 10);\r
-  x2("\82 (\82¢*)\\1", "\82 \82¢", 0, 2);\r
-  x2("(\82 *)(\82¢*)\\1\\2", "\82 \82 \82 \82¢\82¢\82 \82 \82 \82¢\82¢", 0, 20);\r
-  x2("(\82 *)(\82¢*)\\2", "\82 \82 \82 \82¢\82¢\82¢\82¢", 0, 14);\r
-  x3("(\82 *)(\82¢*)\\2", "\82 \82 \82 \82¢\82¢\82¢\82¢", 6, 10, 2);\r
-  x2("(((((((\82Û*)\82Ø))))))\82Ò\\7", "\82Û\82Û\82Û\82Ø\82Ò\82Û\82Û\82Û", 0, 16);\r
-  x3("(((((((\82Û*)\82Ø))))))\82Ò\\7", "\82Û\82Û\82Û\82Ø\82Ò\82Û\82Û\82Û", 0, 6, 7);\r
-  x2("(\82Í)(\82Ð)(\82Ó)\\2\\1\\3", "\82Í\82Ð\82Ó\82Ð\82Í\82Ó", 0, 12);\r
-  x2("([\82«-\82¯])\\1", "\82­\82­", 0, 4);\r
-  x2("(\\w\\d\\s)\\1", "\82 5 \82 5 ", 0, 8);\r
-  n("(\\w\\d\\s)\\1", "\82 5 \82 5");\r
-  x2("(\92N\81H|[\82 -\82¤]{3})\\1", "\92N\81H\92N\81H", 0, 8);\r
-  x2("...(\92N\81H|[\82 -\82¤]{3})\\1", "\82 a\82 \92N\81H\92N\81H", 0, 13);\r
-  x2("(\92N\81H|[\82 -\82¤]{3})\\1", "\82¤\82¢\82¤\82¤\82¢\82¤", 0, 12);\r
-  x2("(^\82±)\\1", "\82±\82±", 0, 4);\r
-  n("(^\82Þ)\\1", "\82ß\82Þ\82Þ");\r
-  n("(\82 $)\\1", "\82 \82 ");\r
-  n("(\82 \82¢\\Z)\\1", "\82 \82¢");\r
-  x2("(\82 *\\Z)\\1", "\82 ", 2, 2);\r
-  x2(".(\82 *\\Z)\\1", "\82¢\82 ", 2, 4);\r
-  x3("(.(\82â\82¢\82ä)\\2)", "z\82â\82¢\82ä\82â\82¢\82ä", 0, 13, 1);\r
-  x3("(.(..\\d.)\\2)", "\82 12341234", 0, 10, 1);\r
-  x2("((?i:\82 v\82¸))\\1", "\82 v\82¸\82 v\82¸", 0, 10);\r
-  x2("(?<\8bð\82©>\95Ï|\\(\\g<\8bð\82©>\\))", "((((((\95Ï))))))", 0, 14);\r
-  x2("\\A(?:\\g<\88¢_1>|\\g<\89]_2>|\\z\8fI\97¹  (?<\88¢_1>\8aÏ|\8e©\\g<\89]_2>\8e©)(?<\89]_2>\8dÝ|\95ì\8eF\\g<\88¢_1>\95ì\8eF))$", "\95ì\8eF\8e©\95ì\8eF\8e©\8dÝ\8e©\95ì\8eF\8e©\95ì\8eF", 0, 26);\r
-  x2("[[\82Ð\82Ó]]", "\82Ó", 0, 2);\r
-  x2("[[\82¢\82¨\82¤]\82©]", "\82©", 0, 2);\r
-  n("[[^\82 ]]", "\82 ");\r
-  n("[^[\82 ]]", "\82 ");\r
-  x2("[^[^\82 ]]", "\82 ", 0, 2);\r
-  x2("[[\82©\82«\82­]&&\82«\82­]", "\82­", 0, 2);\r
-  n("[[\82©\82«\82­]&&\82«\82­]", "\82©");\r
-  n("[[\82©\82«\82­]&&\82«\82­]", "\82¯");\r
-  x2("[\82 -\82ñ&&\82¢-\82ð&&\82¤-\82ï]", "\82ï", 0, 2);\r
-  n("[^\82 -\82ñ&&\82¢-\82ð&&\82¤-\82ï]", "\82ï");\r
-  x2("[[^\82 &&\82 ]&&\82 -\82ñ]", "\82¢", 0, 2);\r
-  n("[[^\82 &&\82 ]&&\82 -\82ñ]", "\82 ");\r
-  x2("[[^\82 -\82ñ&&\82¢\82¤\82¦\82¨]&&[^\82¤-\82©]]", "\82«", 0, 2);\r
-  n("[[^\82 -\82ñ&&\82¢\82¤\82¦\82¨]&&[^\82¤-\82©]]", "\82¢");\r
-  x2("[^[^\82 \82¢\82¤]&&[^\82¤\82¦\82¨]]", "\82¤", 0, 2);\r
-  x2("[^[^\82 \82¢\82¤]&&[^\82¤\82¦\82¨]]", "\82¦", 0, 2);\r
-  n("[^[^\82 \82¢\82¤]&&[^\82¤\82¦\82¨]]", "\82©");\r
-  x2("[\82 -&&-\82 ]", "-", 0, 1);\r
-  x2("[^[^a-z\82 \82¢\82¤]&&[^bcdefg\82¤\82¦\82¨]q-w]", "\82¦", 0, 2);\r
-  x2("[^[^a-z\82 \82¢\82¤]&&[^bcdefg\82¤\82¦\82¨]g-w]", "f", 0, 1);\r
-  x2("[^[^a-z\82 \82¢\82¤]&&[^bcdefg\82¤\82¦\82¨]g-w]", "g", 0, 1);\r
-  n("[^[^a-z\82 \82¢\82¤]&&[^bcdefg\82¤\82¦\82¨]g-w]", "2");\r
-  x2("a<b>\83o\81[\83W\83\87\83\93\82Ì\83_\83E\83\93\83\8d\81[\83h<\\/b>", "a<b>\83o\81[\83W\83\87\83\93\82Ì\83_\83E\83\93\83\8d\81[\83h</b>", 0, 32);\r
-  x2(".<b>\83o\81[\83W\83\87\83\93\82Ì\83_\83E\83\93\83\8d\81[\83h<\\/b>", "a<b>\83o\81[\83W\83\87\83\93\82Ì\83_\83E\83\93\83\8d\81[\83h</b>", 0, 32);\r
-  fprintf(stdout,\r
-       "\nRESULT   SUCC: %d,  FAIL: %d,  ERROR: %d      (by Oniguruma %s)\n",\r
-       nsucc, nfail, nerror, onig_version());\r
-\r
-#ifndef POSIX_TEST\r
-  onig_region_free(region, 1);\r
-  onig_end();\r
-#endif\r
-\r
-  return ((nfail == 0 && nerror == 0) ? 0 : -1);\r
-}\r
+/*
+ * This program was generated by testconv.rb.
+ */
+#ifdef ONIG_ESCAPE_UCHAR_COLLISION
+#undef ONIG_ESCAPE_UCHAR_COLLISION
+#endif
+#include <stdio.h>
+
+#ifdef POSIX_TEST
+#include "onigposix.h"
+#else
+#include "oniguruma.h"
+#endif
+
+#include <string.h>
+
+#define SLEN(s)  strlen(s)
+
+static int nsucc  = 0;
+static int nfail  = 0;
+static int nerror = 0;
+
+static FILE* err_file;
+
+#ifndef POSIX_TEST
+static OnigRegion* region;
+#endif
+
+static void xx(char* pattern, char* str, int from, int to, int mem, int not)
+{
+  int r;
+
+#ifdef POSIX_TEST
+  regex_t reg;
+  char buf[200];
+  regmatch_t pmatch[25];
+
+  r = regcomp(&reg, pattern, REG_EXTENDED | REG_NEWLINE);
+  if (r) {
+    regerror(r, &reg, buf, sizeof(buf));
+    fprintf(err_file, "ERROR: %s\n", buf);
+    nerror++;
+    return ;
+  }
+
+  r = regexec(&reg, str, reg.re_nsub + 1, pmatch, 0);
+  if (r != 0 && r != REG_NOMATCH) {
+    regerror(r, &reg, buf, sizeof(buf));
+    fprintf(err_file, "ERROR: %s\n", buf);
+    nerror++;
+    return ;
+  }
+
+  if (r == REG_NOMATCH) {
+    if (not) {
+      fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);
+      nsucc++;
+    }
+    else {
+      fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);
+      nfail++;
+    }
+  }
+  else {
+    if (not) {
+      fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);
+      nfail++;
+    }
+    else {
+      if (pmatch[mem].rm_so == from && pmatch[mem].rm_eo == to) {
+        fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);
+        nsucc++;
+      }
+      else {
+        fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,
+               from, to, pmatch[mem].rm_so, pmatch[mem].rm_eo);
+        nfail++;
+      }
+    }
+  }
+  regfree(&reg);
+
+#else
+  regex_t* reg;
+  OnigErrorInfo einfo;
+
+  r = onig_new(&reg, (UChar* )pattern, (UChar* )(pattern + SLEN(pattern)),
+              ONIG_OPTION_DEFAULT, ONIG_ENCODING_SJIS, ONIG_SYNTAX_DEFAULT, &einfo);
+  if (r) {
+    char s[ONIG_MAX_ERROR_MESSAGE_LEN];
+    onig_error_code_to_str((UChar* )s, r, &einfo);
+    fprintf(err_file, "ERROR: %s\n", s);
+    nerror++;
+    return ;
+  }
+
+  r = onig_search(reg, (UChar* )str, (UChar* )(str + SLEN(str)),
+                 (UChar* )str, (UChar* )(str + SLEN(str)),
+                 region, ONIG_OPTION_NONE);
+  if (r < ONIG_MISMATCH) {
+    char s[ONIG_MAX_ERROR_MESSAGE_LEN];
+    onig_error_code_to_str((UChar* )s, r);
+    fprintf(err_file, "ERROR: %s\n", s);
+    nerror++;
+    return ;
+  }
+
+  if (r == ONIG_MISMATCH) {
+    if (not) {
+      fprintf(stdout, "OK(N): /%s/ '%s'\n", pattern, str);
+      nsucc++;
+    }
+    else {
+      fprintf(stdout, "FAIL: /%s/ '%s'\n", pattern, str);
+      nfail++;
+    }
+  }
+  else {
+    if (not) {
+      fprintf(stdout, "FAIL(N): /%s/ '%s'\n", pattern, str);
+      nfail++;
+    }
+    else {
+      if (region->beg[mem] == from && region->end[mem] == to) {
+        fprintf(stdout, "OK: /%s/ '%s'\n", pattern, str);
+        nsucc++;
+      }
+      else {
+        fprintf(stdout, "FAIL: /%s/ '%s' %d-%d : %d-%d\n", pattern, str,
+               from, to, region->beg[mem], region->end[mem]);
+        nfail++;
+      }
+    }
+  }
+  onig_free(reg);
+#endif
+}
+
+static void x2(char* pattern, char* str, int from, int to)
+{
+  xx(pattern, str, from, to, 0, 0);
+}
+
+static void x3(char* pattern, char* str, int from, int to, int mem)
+{
+  xx(pattern, str, from, to, mem, 0);
+}
+
+static void n(char* pattern, char* str)
+{
+  xx(pattern, str, 0, 0, 0, 1);
+}
+
+extern int main(int argc, char* argv[])
+{
+#ifndef POSIX_TEST
+  static OnigEncoding use_encs[1];
+
+  use_encs[0] = ONIG_ENCODING_SJIS;
+  onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
+#endif
+
+  err_file = stdout;
+
+#ifdef POSIX_TEST
+  reg_set_encoding(REG_POSIX_ENCODING_SJIS);
+#else
+  region = onig_region_new();
+#endif
+
+  x2("", "", 0, 0);
+  x2("^", "", 0, 0);
+  x2("$", "", 0, 0);
+  x2("\\G", "", 0, 0);
+  x2("\\A", "", 0, 0);
+  x2("\\Z", "", 0, 0);
+  x2("\\z", "", 0, 0);
+  x2("^$", "", 0, 0);
+  x2("\\ca", "\001", 0, 1);
+  x2("\\C-b", "\002", 0, 1);
+  x2("\\c\\\\", "\034", 0, 1);
+  x2("q[\\c\\\\]", "q\034", 0, 2);
+  x2("", "a", 0, 0);
+  x2("a", "a", 0, 1);
+  x2("\\x61", "a", 0, 1);
+  x2("aa", "aa", 0, 2);
+  x2("aaa", "aaa", 0, 3);
+  x2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", 0, 35);
+  x2("ab", "ab", 0, 2);
+  x2("b", "ab", 1, 2);
+  x2("bc", "abc", 1, 3);
+  x2("(?i:#RET#)", "#INS##RET#", 5, 10);
+  x2("\\17", "\017", 0, 1);
+  x2("\\x1f", "\x1f", 0, 1);
+  x2("a(?#....\\\\JJJJ)b", "ab", 0, 2);
+  x2("(?x)  G (o O(?-x)oO) g L", "GoOoOgLe", 0, 7);
+  x2(".", "a", 0, 1);
+  n(".", "");
+  x2("..", "ab", 0, 2);
+  x2("\\w", "e", 0, 1);
+  n("\\W", "e");
+  x2("\\s", " ", 0, 1);
+  x2("\\S", "b", 0, 1);
+  x2("\\d", "4", 0, 1);
+  n("\\D", "4");
+  x2("\\b", "z ", 0, 0);
+  x2("\\b", " z", 1, 1);
+  x2("\\B", "zz ", 1, 1);
+  x2("\\B", "z ", 2, 2);
+  x2("\\B", " z", 0, 0);
+  x2("[ab]", "b", 0, 1);
+  n("[ab]", "c");
+  x2("[a-z]", "t", 0, 1);
+  n("[^a]", "a");
+  x2("[^a]", "\n", 0, 1);
+  x2("[]]", "]", 0, 1);
+  n("[^]]", "]");
+  x2("[\\^]+", "0^^1", 1, 3);
+  x2("[b-]", "b", 0, 1);
+  x2("[b-]", "-", 0, 1);
+  x2("[\\w]", "z", 0, 1);
+  n("[\\w]", " ");
+  x2("[\\W]", "b$", 1, 2);
+  x2("[\\d]", "5", 0, 1);
+  n("[\\d]", "e");
+  x2("[\\D]", "t", 0, 1);
+  n("[\\D]", "3");
+  x2("[\\s]", " ", 0, 1);
+  n("[\\s]", "a");
+  x2("[\\S]", "b", 0, 1);
+  n("[\\S]", " ");
+  x2("[\\w\\d]", "2", 0, 1);
+  n("[\\w\\d]", " ");
+  x2("[[:upper:]]", "B", 0, 1);
+  x2("[*[:xdigit:]+]", "+", 0, 1);
+  x2("[*[:xdigit:]+]", "GHIKK-9+*", 6, 7);
+  x2("[*[:xdigit:]+]", "-@^+", 3, 4);
+  n("[[:upper]]", "A");
+  x2("[[:upper]]", ":", 0, 1);
+  x2("[\\044-\\047]", "\046", 0, 1);
+  x2("[\\x5a-\\x5c]", "\x5b", 0, 1);
+  x2("[\\x6A-\\x6D]", "\x6c", 0, 1);
+  n("[\\x6A-\\x6D]", "\x6E");
+  n("^[0-9A-F]+ 0+ UNDEF ", "75F 00000000 SECT14A notype ()    External    | _rb_apply");
+  x2("[\\[]", "[", 0, 1);
+  x2("[\\]]", "]", 0, 1);
+  x2("[&]", "&", 0, 1);
+  x2("[[ab]]", "b", 0, 1);
+  x2("[[ab]c]", "c", 0, 1);
+  n("[[^a]]", "a");
+  n("[^[a]]", "a");
+  x2("[[ab]&&bc]", "b", 0, 1);
+  n("[[ab]&&bc]", "a");
+  n("[[ab]&&bc]", "c");
+  x2("[a-z&&b-y&&c-x]", "w", 0, 1);
+  n("[^a-z&&b-y&&c-x]", "w");
+  x2("[[^a&&a]&&a-z]", "b", 0, 1);
+  n("[[^a&&a]&&a-z]", "a");
+  x2("[[^a-z&&bcdef]&&[^c-g]]", "h", 0, 1);
+  n("[[^a-z&&bcdef]&&[^c-g]]", "c");
+  x2("[^[^abc]&&[^cde]]", "c", 0, 1);
+  x2("[^[^abc]&&[^cde]]", "e", 0, 1);
+  n("[^[^abc]&&[^cde]]", "f");
+  x2("[a-&&-a]", "-", 0, 1);
+  n("[a\\-&&\\-a]", "&");
+  n("\\wabc", " abc");
+  x2("a\\Wbc", "a bc", 0, 4);
+  x2("a.b.c", "aabbc", 0, 5);
+  x2(".\\wb\\W..c", "abb bcc", 0, 7);
+  x2("\\s\\wzzz", " zzzz", 0, 5);
+  x2("aa.b", "aabb", 0, 4);
+  n(".a", "ab");
+  x2(".a", "aa", 0, 2);
+  x2("^a", "a", 0, 1);
+  x2("^a$", "a", 0, 1);
+  x2("^\\w$", "a", 0, 1);
+  n("^\\w$", " ");
+  x2("^\\wab$", "zab", 0, 3);
+  x2("^\\wabcdef$", "zabcdef", 0, 7);
+  x2("^\\w...def$", "zabcdef", 0, 7);
+  x2("\\w\\w\\s\\Waaa\\d", "aa  aaa4", 0, 8);
+  x2("\\A\\Z", "", 0, 0);
+  x2("\\Axyz", "xyz", 0, 3);
+  x2("xyz\\Z", "xyz", 0, 3);
+  x2("xyz\\z", "xyz", 0, 3);
+  x2("a\\Z", "a", 0, 1);
+  x2("\\Gaz", "az", 0, 2);
+  n("\\Gz", "bza");
+  n("az\\G", "az");
+  n("az\\A", "az");
+  n("a\\Az", "az");
+  x2("\\^\\$", "^$", 0, 2);
+  x2("^x?y", "xy", 0, 2);
+  x2("^(x?y)", "xy", 0, 2);
+  x2("\\w", "_", 0, 1);
+  n("\\W", "_");
+  x2("(?=z)z", "z", 0, 1);
+  n("(?=z).", "a");
+  x2("(?!z)a", "a", 0, 1);
+  n("(?!z)a", "z");
+  x2("(?i:a)", "a", 0, 1);
+  x2("(?i:a)", "A", 0, 1);
+  x2("(?i:A)", "a", 0, 1);
+  n("(?i:A)", "b");
+  x2("(?i:[A-Z])", "a", 0, 1);
+  x2("(?i:[f-m])", "H", 0, 1);
+  x2("(?i:[f-m])", "h", 0, 1);
+  n("(?i:[f-m])", "e");
+  x2("(?i:[A-c])", "D", 0, 1);
+  n("(?i:[^a-z])", "A");
+  n("(?i:[^a-z])", "a");
+  x2("(?i:[!-k])", "Z", 0, 1);
+  x2("(?i:[!-k])", "7", 0, 1);
+  x2("(?i:[T-}])", "b", 0, 1);
+  x2("(?i:[T-}])", "{", 0, 1);
+  x2("(?i:\\?a)", "?A", 0, 2);
+  x2("(?i:\\*A)", "*a", 0, 2);
+  n(".", "\n");
+  x2("(?m:.)", "\n", 0, 1);
+  x2("(?m:a.)", "a\n", 0, 2);
+  x2("(?m:.b)", "a\nb", 1, 3);
+  x2(".*abc", "dddabdd\nddabc", 8, 13);
+  x2("(?m:.*abc)", "dddabddabc", 0, 10);
+  n("(?i)(?-i)a", "A");
+  n("(?i)(?-i:a)", "A");
+  x2("a?", "", 0, 0);
+  x2("a?", "b", 0, 0);
+  x2("a?", "a", 0, 1);
+  x2("a*", "", 0, 0);
+  x2("a*", "a", 0, 1);
+  x2("a*", "aaa", 0, 3);
+  x2("a*", "baaaa", 0, 0);
+  n("a+", "");
+  x2("a+", "a", 0, 1);
+  x2("a+", "aaaa", 0, 4);
+  x2("a+", "aabbb", 0, 2);
+  x2("a+", "baaaa", 1, 5);
+  x2(".?", "", 0, 0);
+  x2(".?", "f", 0, 1);
+  x2(".?", "\n", 0, 0);
+  x2(".*", "", 0, 0);
+  x2(".*", "abcde", 0, 5);
+  x2(".+", "z", 0, 1);
+  x2(".+", "zdswer\n", 0, 6);
+  x2("(.*)a\\1f", "babfbac", 0, 4);
+  x2("(.*)a\\1f", "bacbabf", 3, 7);
+  x2("((.*)a\\2f)", "bacbabf", 3, 7);
+  x2("(.*)a\\1f", "baczzzzzz\nbazz\nzzzzbabf", 19, 23);
+  x2("a|b", "a", 0, 1);
+  x2("a|b", "b", 0, 1);
+  x2("|a", "a", 0, 0);
+  x2("(|a)", "a", 0, 0);
+  x2("ab|bc", "ab", 0, 2);
+  x2("ab|bc", "bc", 0, 2);
+  x2("z(?:ab|bc)", "zbc", 0, 3);
+  x2("a(?:ab|bc)c", "aabc", 0, 4);
+  x2("ab|(?:ac|az)", "az", 0, 2);
+  x2("a|b|c", "dc", 1, 2);
+  x2("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "pqr", 0, 2);
+  n("a|b|cd|efg|h|ijk|lmn|o|pq|rstuvwx|yz", "mn");
+  x2("a|^z", "ba", 1, 2);
+  x2("a|^z", "za", 0, 1);
+  x2("a|\\Gz", "bza", 2, 3);
+  x2("a|\\Gz", "za", 0, 1);
+  x2("a|\\Az", "bza", 2, 3);
+  x2("a|\\Az", "za", 0, 1);
+  x2("a|b\\Z", "ba", 1, 2);
+  x2("a|b\\Z", "b", 0, 1);
+  x2("a|b\\z", "ba", 1, 2);
+  x2("a|b\\z", "b", 0, 1);
+  x2("\\w|\\s", " ", 0, 1);
+  n("\\w|\\w", " ");
+  x2("\\w|%", "%", 0, 1);
+  x2("\\w|[&$]", "&", 0, 1);
+  x2("[b-d]|[^e-z]", "a", 0, 1);
+  x2("(?:a|[c-f])|bz", "dz", 0, 1);
+  x2("(?:a|[c-f])|bz", "bz", 0, 2);
+  x2("abc|(?=zz)..f", "zzf", 0, 3);
+  x2("abc|(?!zz)..f", "abf", 0, 3);
+  x2("(?=za)..a|(?=zz)..a", "zza", 0, 3);
+  n("(?>a|abd)c", "abdc");
+  x2("(?>abd|a)c", "abdc", 0, 4);
+  x2("a?|b", "a", 0, 1);
+  x2("a?|b", "b", 0, 0);
+  x2("a?|b", "", 0, 0);
+  x2("a*|b", "aa", 0, 2);
+  x2("a*|b*", "ba", 0, 0);
+  x2("a*|b*", "ab", 0, 1);
+  x2("a+|b*", "", 0, 0);
+  x2("a+|b*", "bbb", 0, 3);
+  x2("a+|b*", "abbb", 0, 1);
+  n("a+|b+", "");
+  x2("(a|b)?", "b", 0, 1);
+  x2("(a|b)*", "ba", 0, 2);
+  x2("(a|b)+", "bab", 0, 3);
+  x2("(ab|ca)+", "caabbc", 0, 4);
+  x2("(ab|ca)+", "aabca", 1, 5);
+  x2("(ab|ca)+", "abzca", 0, 2);
+  x2("(a|bab)+", "ababa", 0, 5);
+  x2("(a|bab)+", "ba", 1, 2);
+  x2("(a|bab)+", "baaaba", 1, 4);
+  x2("(?:a|b)(?:a|b)", "ab", 0, 2);
+  x2("(?:a*|b*)(?:a*|b*)", "aaabbb", 0, 3);
+  x2("(?:a*|b*)(?:a+|b+)", "aaabbb", 0, 6);
+  x2("(?:a+|b+){2}", "aaabbb", 0, 6);
+  x2("h{0,}", "hhhh", 0, 4);
+  x2("(?:a+|b+){1,2}", "aaabbb", 0, 6);
+  n("ax{2}*a", "0axxxa1");
+  n("a.{0,2}a", "0aXXXa0");
+  n("a.{0,2}?a", "0aXXXa0");
+  n("a.{0,2}?a", "0aXXXXa0");
+  x2("^a{2,}?a$", "aaa", 0, 3);
+  x2("^[a-z]{2,}?$", "aaa", 0, 3);
+  x2("(?:a+|\\Ab*)cc", "cc", 0, 2);
+  n("(?:a+|\\Ab*)cc", "abcc");
+  x2("(?:^a+|b+)*c", "aabbbabc", 6, 8);
+  x2("(?:^a+|b+)*c", "aabbbbc", 0, 7);
+  x2("a|(?i)c", "C", 0, 1);
+  x2("(?i)c|a", "C", 0, 1);
+  x2("(?i)c|a", "A", 0, 1);
+  x2("(?i:c)|a", "C", 0, 1);
+  n("(?i:c)|a", "A");
+  x2("[abc]?", "abc", 0, 1);
+  x2("[abc]*", "abc", 0, 3);
+  x2("[^abc]*", "abc", 0, 0);
+  n("[^abc]+", "abc");
+  x2("a?\?", "aaa", 0, 0);
+  x2("ba?\?b", "bab", 0, 3);
+  x2("a*?", "aaa", 0, 0);
+  x2("ba*?", "baa", 0, 1);
+  x2("ba*?b", "baab", 0, 4);
+  x2("a+?", "aaa", 0, 1);
+  x2("ba+?", "baa", 0, 2);
+  x2("ba+?b", "baab", 0, 4);
+  x2("(?:a?)?\?", "a", 0, 0);
+  x2("(?:a?\?)?", "a", 0, 0);
+  x2("(?:a?)+?", "aaa", 0, 1);
+  x2("(?:a+)?\?", "aaa", 0, 0);
+  x2("(?:a+)?\?b", "aaab", 0, 4);
+  x2("(?:ab)?{2}", "", 0, 0);
+  x2("(?:ab)?{2}", "ababa", 0, 4);
+  x2("(?:ab)*{0}", "ababa", 0, 0);
+  x2("(?:ab){3,}", "abababab", 0, 8);
+  n("(?:ab){3,}", "abab");
+  x2("(?:ab){2,4}", "ababab", 0, 6);
+  x2("(?:ab){2,4}", "ababababab", 0, 8);
+  x2("(?:ab){2,4}?", "ababababab", 0, 4);
+  x2("(?:ab){,}", "ab{,}", 0, 5);
+  x2("(?:abc)+?{2}", "abcabcabc", 0, 6);
+  x2("(?:X*)(?i:xa)", "XXXa", 0, 4);
+  x2("(d+)([^abc]z)", "dddz", 0, 4);
+  x2("([^abc]*)([^abc]z)", "dddz", 0, 4);
+  x2("(\\w+)(\\wz)", "dddz", 0, 4);
+  x3("(a)", "a", 0, 1, 1);
+  x3("(ab)", "ab", 0, 2, 1);
+  x2("((ab))", "ab", 0, 2);
+  x3("((ab))", "ab", 0, 2, 1);
+  x3("((ab))", "ab", 0, 2, 2);
+  x3("((((((((((((((((((((ab))))))))))))))))))))", "ab", 0, 2, 20);
+  x3("(ab)(cd)", "abcd", 0, 2, 1);
+  x3("(ab)(cd)", "abcd", 2, 4, 2);
+  x3("()(a)bc(def)ghijk", "abcdefghijk", 3, 6, 3);
+  x3("(()(a)bc(def)ghijk)", "abcdefghijk", 3, 6, 4);
+  x2("(^a)", "a", 0, 1);
+  x3("(a)|(a)", "ba", 1, 2, 1);
+  x3("(^a)|(a)", "ba", 1, 2, 2);
+  x3("(a?)", "aaa", 0, 1, 1);
+  x3("(a*)", "aaa", 0, 3, 1);
+  x3("(a*)", "", 0, 0, 1);
+  x3("(a+)", "aaaaaaa", 0, 7, 1);
+  x3("(a+|b*)", "bbbaa", 0, 3, 1);
+  x3("(a+|b?)", "bbbaa", 0, 1, 1);
+  x3("(abc)?", "abc", 0, 3, 1);
+  x3("(abc)*", "abc", 0, 3, 1);
+  x3("(abc)+", "abc", 0, 3, 1);
+  x3("(xyz|abc)+", "abc", 0, 3, 1);
+  x3("([xyz][abc]|abc)+", "abc", 0, 3, 1);
+  x3("((?i:abc))", "AbC", 0, 3, 1);
+  x2("(abc)(?i:\\1)", "abcABC", 0, 6);
+  x3("((?m:a.c))", "a\nc", 0, 3, 1);
+  x3("((?=az)a)", "azb", 0, 1, 1);
+  x3("abc|(.abd)", "zabd", 0, 4, 1);
+  x2("(?:abc)|(ABC)", "abc", 0, 3);
+  x3("(?i:(abc))|(zzz)", "ABC", 0, 3, 1);
+  x3("a*(.)", "aaaaz", 4, 5, 1);
+  x3("a*?(.)", "aaaaz", 0, 1, 1);
+  x3("a*?(c)", "aaaac", 4, 5, 1);
+  x3("[bcd]a*(.)", "caaaaz", 5, 6, 1);
+  x3("(\\Abb)cc", "bbcc", 0, 2, 1);
+  n("(\\Abb)cc", "zbbcc");
+  x3("(^bb)cc", "bbcc", 0, 2, 1);
+  n("(^bb)cc", "zbbcc");
+  x3("cc(bb$)", "ccbb", 2, 4, 1);
+  n("cc(bb$)", "ccbbb");
+  n("(\\1)", "");
+  n("\\1(a)", "aa");
+  n("(a(b)\\1)\\2+", "ababb");
+  n("(?:(?:\\1|z)(a))+$", "zaa");
+  x2("(?:(?:\\1|z)(a))+$", "zaaa", 0, 4);
+  x2("(a)(?=\\1)", "aa", 0, 1);
+  n("(a)$|\\1", "az");
+  x2("(a)\\1", "aa", 0, 2);
+  n("(a)\\1", "ab");
+  x2("(a?)\\1", "aa", 0, 2);
+  x2("(a?\?)\\1", "aa", 0, 0);
+  x2("(a*)\\1", "aaaaa", 0, 4);
+  x3("(a*)\\1", "aaaaa", 0, 2, 1);
+  x2("a(b*)\\1", "abbbb", 0, 5);
+  x2("a(b*)\\1", "ab", 0, 1);
+  x2("(a*)(b*)\\1\\2", "aaabbaaabb", 0, 10);
+  x2("(a*)(b*)\\2", "aaabbbb", 0, 7);
+  x2("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 8);
+  x3("(((((((a*)b))))))c\\7", "aaabcaaa", 0, 3, 7);
+  x2("(a)(b)(c)\\2\\1\\3", "abcbac", 0, 6);
+  x2("([a-d])\\1", "cc", 0, 2);
+  x2("(\\w\\d\\s)\\1", "f5 f5 ", 0, 6);
+  n("(\\w\\d\\s)\\1", "f5 f5");
+  x2("(who|[a-c]{3})\\1", "whowho", 0, 6);
+  x2("...(who|[a-c]{3})\\1", "abcwhowho", 0, 9);
+  x2("(who|[a-c]{3})\\1", "cbccbc", 0, 6);
+  x2("(^a)\\1", "aa", 0, 2);
+  n("(^a)\\1", "baa");
+  n("(a$)\\1", "aa");
+  n("(ab\\Z)\\1", "ab");
+  x2("(a*\\Z)\\1", "a", 1, 1);
+  x2(".(a*\\Z)\\1", "ba", 1, 2);
+  x3("(.(abc)\\2)", "zabcabc", 0, 7, 1);
+  x3("(.(..\\d.)\\2)", "z12341234", 0, 9, 1);
+  x2("((?i:az))\\1", "AzAz", 0, 4);
+  n("((?i:az))\\1", "Azaz");
+  x2("(?<=a)b", "ab", 1, 2);
+  n("(?<=a)b", "bb");
+  x2("(?<=a|b)b", "bb", 1, 2);
+  x2("(?<=a|bc)b", "bcb", 2, 3);
+  x2("(?<=a|bc)b", "ab", 1, 2);
+  x2("(?<=a|bc||defghij|klmnopq|r)z", "rz", 1, 2);
+  x2("(a)\\g<1>", "aa", 0, 2);
+  x2("(?<!a)b", "cb", 1, 2);
+  n("(?<!a)b", "ab");
+  x2("(?<!a|bc)b", "bbb", 0, 1);
+  n("(?<!a|bc)z", "bcz");
+  x2("(?<name1>a)", "a", 0, 1);
+  x2("(?<name_2>ab)\\g<name_2>", "abab", 0, 4);
+  x2("(?<name_3>.zv.)\\k<name_3>", "azvbazvb", 0, 8);
+  x2("(?<=\\g<ab>)|-\\zEND (?<ab>XyZ)", "XyZ", 3, 3);
+  x2("(?<n>|a\\g<n>)+", "", 0, 0);
+  x2("(?<n>|\\(\\g<n>\\))+$", "()(())", 0, 6);
+  x3("\\g<n>(?<n>.){0}", "X", 0, 1, 1);
+  x2("\\g<n>(abc|df(?<n>.YZ){2,8}){0}", "XYZ", 0, 3);
+  x2("\\A(?<n>(a\\g<n>)|)\\z", "aaaa", 0, 4);
+  x2("(?<n>|\\g<m>\\g<n>)\\z|\\zEND (?<m>a|(b)\\g<m>)", "bbbbabba", 0, 8);
+  x2("(?<name1240>\\w+\\sx)a+\\k<name1240>", "  fg xaaaaaaaafg x", 2, 18);
+  x3("(z)()()(?<_9>a)\\g<_9>", "zaa", 2, 3, 1);
+  x2("(.)(((?<_>a)))\\k<_>", "zaa", 0, 3);
+  x2("((?<name1>\\d)|(?<name2>\\w))(\\k<name1>|\\k<name2>)", "ff", 0, 2);
+  x2("(?:(?<x>)|(?<x>efg))\\k<x>", "", 0, 0);
+  x2("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefgefg", 3, 9);
+  n("(?:(?<x>abc)|(?<x>efg))\\k<x>", "abcefg");
+  x2("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "a-pyumpyum", 2, 10);
+  x3("(?:(?<n1>.)|(?<n1>..)|(?<n1>...)|(?<n1>....)|(?<n1>.....)|(?<n1>......)|(?<n1>.......)|(?<n1>........)|(?<n1>.........)|(?<n1>..........)|(?<n1>...........)|(?<n1>............)|(?<n1>.............)|(?<n1>..............))\\k<n1>$", "xxxxabcdefghijklmnabcdefghijklmn", 4, 18, 14);
+  x3("(?<name1>)(?<name2>)(?<name3>)(?<name4>)(?<name5>)(?<name6>)(?<name7>)(?<name8>)(?<name9>)(?<name10>)(?<name11>)(?<name12>)(?<name13>)(?<name14>)(?<name15>)(?<name16>aaa)(?<name17>)$", "aaa", 0, 3, 16);
+  x2("(?<foo>a|\\(\\g<foo>\\))", "a", 0, 1);
+  x2("(?<foo>a|\\(\\g<foo>\\))", "((((((a))))))", 0, 13);
+  x3("(?<foo>a|\\(\\g<foo>\\))", "((((((((a))))))))", 0, 17, 1);
+  x2("\\g<bar>|\\zEND(?<bar>.*abc$)", "abcxxxabc", 0, 9);
+  x2("\\g<1>|\\zEND(.a.)", "bac", 0, 3);
+  x3("\\g<_A>\\g<_A>|\\zEND(.a.)(?<_A>.b.)", "xbxyby", 3, 6, 1);
+  x2("\\A(?:\\g<pon>|\\g<pan>|\\zEND  (?<pan>a|c\\g<pon>c)(?<pon>b|d\\g<pan>d))$", "cdcbcdc", 0, 7);
+  x2("\\A(?<n>|a\\g<m>)\\z|\\zEND (?<m>\\g<n>)", "aaaa", 0, 4);
+  x2("(?<n>(a|b\\g<n>c){3,5})", "baaaaca", 1, 5);
+  x2("(?<n>(a|b\\g<n>c){3,5})", "baaaacaaaaa", 0, 10);
+  x2("(?<pare>\\(([^\\(\\)]++|\\g<pare>)*+\\))", "((a))", 0, 5);
+  x2("()*\\1", "", 0, 0);
+  x2("(?:()|())*\\1\\2", "", 0, 0);
+  x3("(?:\\1a|())*", "a", 0, 0, 1);
+  x2("x((.)*)*x", "0x1x2x3", 1, 6);
+  x2("x((.)*)*x(?i:\\1)\\Z", "0x1x2x1X2", 1, 9);
+  x2("(?:()|()|()|()|()|())*\\2\\5", "", 0, 0);
+  x2("(?:()|()|()|(x)|()|())*\\2b\\5", "b", 0, 1);
+  x2("\\xED\\xF2", "\xed\xf2", 0, 2);
+  x2("", "\82 ", 0, 0);
+  x2("\82 ", "\82 ", 0, 2);
+  n("\82¢", "\82 ");
+  x2("\82¤\82¤", "\82¤\82¤", 0, 4);
+  x2("\82 \82¢\82¤", "\82 \82¢\82¤", 0, 6);
+  x2("\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±", "\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±\82±", 0, 70);
+  x2("\82 ", "\82¢\82 ", 2, 4);
+  x2("\82¢\82¤", "\82 \82¢\82¤", 2, 6);
+  x2("\\xca\\xb8", "\xca\xb8", 0, 2);
+  x2(".", "\82 ", 0, 2);
+  x2("..", "\82©\82«", 0, 4);
+  x2("\\w", "\82¨", 0, 2);
+  n("\\W", "\82 ");
+  x2("[\\W]", "\82¤$", 2, 3);
+  x2("\\S", "\82»", 0, 2);
+  x2("\\S", "\8a¿", 0, 2);
+  x2("\\b", "\8bC ", 0, 0);
+  x2("\\b", " \82Ù", 1, 1);
+  x2("\\B", "\82¹\82» ", 2, 2);
+  x2("\\B", "\82¤ ", 3, 3);
+  x2("\\B", " \82¢", 0, 0);
+  x2("[\82½\82¿]", "\82¿", 0, 2);
+  n("[\82È\82É]", "\82Ê");
+  x2("[\82¤-\82¨]", "\82¦", 0, 2);
+  n("[^\82¯]", "\82¯");
+  x2("[\\w]", "\82Ë", 0, 2);
+  n("[\\d]", "\82Ó");
+  x2("[\\D]", "\82Í", 0, 2);
+  n("[\\s]", "\82­");
+  x2("[\\S]", "\82Ö", 0, 2);
+  x2("[\\w\\d]", "\82æ", 0, 2);
+  x2("[\\w\\d]", "   \82æ", 3, 5);
+  n("\\w\8bS\8eÔ", " \8bS\8eÔ");
+  x2("\8bS\\W\8eÔ", "\8b\8eÔ", 0, 5);
+  x2("\82 .\82¢.\82¤", "\82 \82 \82¢\82¢\82¤", 0, 10);
+  x2(".\\w\82¤\\W..\82¼", "\82¦\82¤\82¤ \82¤\82¼\82¼", 0, 13);
+  x2("\\s\\w\82±\82±\82±", " \82±\82±\82±\82±", 0, 9);
+  x2("\82 \82 .\82¯", "\82 \82 \82¯\82¯", 0, 8);
+  n(".\82¢", "\82¢\82¦");
+  x2(".\82¨", "\82¨\82¨", 0, 4);
+  x2("^\82 ", "\82 ", 0, 2);
+  x2("^\82Þ$", "\82Þ", 0, 2);
+  x2("^\\w$", "\82É", 0, 2);
+  x2("^\\w\82©\82«\82­\82¯\82±$", "z\82©\82«\82­\82¯\82±", 0, 11);
+  x2("^\\w...\82¤\82¦\82¨$", "z\82 \82¢\82¤\82¤\82¦\82¨", 0, 13);
+  x2("\\w\\w\\s\\W\82¨\82¨\82¨\\d", "a\82¨  \82¨\82¨\82¨4", 0, 12);
+  x2("\\A\82½\82¿\82Â", "\82½\82¿\82Â", 0, 6);
+  x2("\82Þ\82ß\82à\\Z", "\82Þ\82ß\82à", 0, 6);
+  x2("\82©\82«\82­\\z", "\82©\82«\82­", 0, 6);
+  x2("\82©\82«\82­\\Z", "\82©\82«\82­\n", 0, 6);
+  x2("\\G\82Û\82Ò", "\82Û\82Ò", 0, 4);
+  n("\\G\82¦", "\82¤\82¦\82¨");
+  n("\82Æ\82Ä\\G", "\82Æ\82Ä");
+  n("\82Ü\82Ý\\A", "\82Ü\82Ý");
+  n("\82Ü\\A\82Ý", "\82Ü\82Ý");
+  x2("(?=\82¹)\82¹", "\82¹", 0, 2);
+  n("(?=\82¤).", "\82¢");
+  x2("(?!\82¤)\82©", "\82©", 0, 2);
+  n("(?!\82Æ)\82 ", "\82Æ");
+  x2("(?i:\82 )", "\82 ", 0, 2);
+  x2("(?i:\82Ô\82×)", "\82Ô\82×", 0, 4);
+  n("(?i:\82¢)", "\82¤");
+  x2("(?m:\82æ.)", "\82æ\n", 0, 3);
+  x2("(?m:.\82ß)", "\82Ü\n\82ß", 2, 5);
+  x2("\82 ?", "", 0, 0);
+  x2("\95Ï?", "\89»", 0, 0);
+  x2("\95Ï?", "\95Ï", 0, 2);
+  x2("\97Ê*", "", 0, 0);
+  x2("\97Ê*", "\97Ê", 0, 2);
+  x2("\8eq*", "\8eq\8eq\8eq", 0, 6);
+  x2("\94n*", "\8e­\94n\94n\94n\94n", 0, 0);
+  n("\8eR+", "");
+  x2("\89Í+", "\89Í", 0, 2);
+  x2("\8e\9e+", "\8e\9e\8e\9e\8e\9e\8e\9e", 0, 8);
+  x2("\82¦+", "\82¦\82¦\82¤\82¤\82¤", 0, 4);
+  x2("\82¤+", "\82¨\82¤\82¤\82¤\82¤", 2, 10);
+  x2(".?", "\82½", 0, 2);
+  x2(".*", "\82Ï\82Ò\82Õ\82Ø", 0, 8);
+  x2(".+", "\82ë", 0, 2);
+  x2(".+", "\82¢\82¤\82¦\82©\n", 0, 8);
+  x2("\82 |\82¢", "\82 ", 0, 2);
+  x2("\82 |\82¢", "\82¢", 0, 2);
+  x2("\82 \82¢|\82¢\82¤", "\82 \82¢", 0, 4);
+  x2("\82 \82¢|\82¢\82¤", "\82¢\82¤", 0, 4);
+  x2("\82ð(?:\82©\82«|\82«\82­)", "\82ð\82©\82«", 0, 6);
+  x2("\82ð(?:\82©\82«|\82«\82­)\82¯", "\82ð\82«\82­\82¯", 0, 8);
+  x2("\82 \82¢|(?:\82 \82¤|\82 \82ð)", "\82 \82ð", 0, 4);
+  x2("\82 |\82¢|\82¤", "\82¦\82¤", 2, 4);
+  x2("\82 |\82¢|\82¤\82¦|\82¨\82©\82«|\82­|\82¯\82±\82³|\82µ\82·\82¹|\82»|\82½\82¿|\82Â\82Ä\82Æ\82È\82É|\82Ê\82Ë", "\82µ\82·\82¹", 0, 6);
+  n("\82 |\82¢|\82¤\82¦|\82¨\82©\82«|\82­|\82¯\82±\82³|\82µ\82·\82¹|\82»|\82½\82¿|\82Â\82Ä\82Æ\82È\82É|\82Ê\82Ë", "\82·\82¹");
+  x2("\82 |^\82í", "\82Ô\82 ", 2, 4);
+  x2("\82 |^\82ð", "\82ð\82 ", 0, 2);
+  x2("\8bS|\\G\8eÔ", "\82¯\8eÔ\8bS", 4, 6);
+  x2("\8bS|\\G\8eÔ", "\8eÔ\8bS", 0, 2);
+  x2("\8bS|\\A\8eÔ", "b\8eÔ\8bS", 3, 5);
+  x2("\8bS|\\A\8eÔ", "\8eÔ", 0, 2);
+  x2("\8bS|\8eÔ\\Z", "\8eÔ\8bS", 2, 4);
+  x2("\8bS|\8eÔ\\Z", "\8eÔ", 0, 2);
+  x2("\8bS|\8eÔ\\Z", "\8eÔ\n", 0, 2);
+  x2("\8bS|\8eÔ\\z", "\8eÔ\8bS", 2, 4);
+  x2("\8bS|\8eÔ\\z", "\8eÔ", 0, 2);
+  x2("\\w|\\s", "\82¨", 0, 2);
+  x2("\\w|%", "%\82¨", 0, 1);
+  x2("\\w|[&$]", "\82¤&", 0, 2);
+  x2("[\82¢-\82¯]", "\82¤", 0, 2);
+  x2("[\82¢-\82¯]|[^\82©-\82±]", "\82 ", 0, 2);
+  x2("[\82¢-\82¯]|[^\82©-\82±]", "\82©", 0, 2);
+  x2("[^\82 ]", "\n", 0, 1);
+  x2("(?:\82 |[\82¤-\82«])|\82¢\82ð", "\82¤\82ð", 0, 2);
+  x2("(?:\82 |[\82¤-\82«])|\82¢\82ð", "\82¢\82ð", 0, 4);
+  x2("\82 \82¢\82¤|(?=\82¯\82¯)..\82Ù", "\82¯\82¯\82Ù", 0, 6);
+  x2("\82 \82¢\82¤|(?!\82¯\82¯)..\82Ù", "\82 \82¢\82Ù", 0, 6);
+  x2("(?=\82ð\82 )..\82 |(?=\82ð\82ð)..\82 ", "\82ð\82ð\82 ", 0, 6);
+  x2("(?<=\82 |\82¢\82¤)\82¢", "\82¢\82¤\82¢", 4, 6);
+  n("(?>\82 |\82 \82¢\82¦)\82¤", "\82 \82¢\82¦\82¤");
+  x2("(?>\82 \82¢\82¦|\82 )\82¤", "\82 \82¢\82¦\82¤", 0, 8);
+  x2("\82 ?|\82¢", "\82 ", 0, 2);
+  x2("\82 ?|\82¢", "\82¢", 0, 0);
+  x2("\82 ?|\82¢", "", 0, 0);
+  x2("\82 *|\82¢", "\82 \82 ", 0, 4);
+  x2("\82 *|\82¢*", "\82¢\82 ", 0, 0);
+  x2("\82 *|\82¢*", "\82 \82¢", 0, 2);
+  x2("[a\82 ]*|\82¢*", "a\82 \82¢\82¢\82¢", 0, 3);
+  x2("\82 +|\82¢*", "", 0, 0);
+  x2("\82 +|\82¢*", "\82¢\82¢\82¢", 0, 6);
+  x2("\82 +|\82¢*", "\82 \82¢\82¢\82¢", 0, 2);
+  x2("\82 +|\82¢*", "a\82 \82¢\82¢\82¢", 0, 0);
+  n("\82 +|\82¢+", "");
+  x2("(\82 |\82¢)?", "\82¢", 0, 2);
+  x2("(\82 |\82¢)*", "\82¢\82 ", 0, 4);
+  x2("(\82 |\82¢)+", "\82¢\82 \82¢", 0, 6);
+  x2("(\82 \82¢|\82¤\82 )+", "\82¤\82 \82 \82¢\82¤\82¦", 0, 8);
+  x2("(\82 \82¢|\82¤\82¦)+", "\82¤\82 \82 \82¢\82¤\82¦", 4, 12);
+  x2("(\82 \82¢|\82¤\82 )+", "\82 \82 \82¢\82¤\82 ", 2, 10);
+  x2("(\82 \82¢|\82¤\82 )+", "\82 \82¢\82ð\82¤\82 ", 0, 4);
+  x2("(\82 \82¢|\82¤\82 )+", "$$zzzz\82 \82¢\82ð\82¤\82 ", 6, 10);
+  x2("(\82 |\82¢\82 \82¢)+", "\82 \82¢\82 \82¢\82 ", 0, 10);
+  x2("(\82 |\82¢\82 \82¢)+", "\82¢\82 ", 2, 4);
+  x2("(\82 |\82¢\82 \82¢)+", "\82¢\82 \82 \82 \82¢\82 ", 2, 8);
+  x2("(?:\82 |\82¢)(?:\82 |\82¢)", "\82 \82¢", 0, 4);
+  x2("(?:\82 *|\82¢*)(?:\82 *|\82¢*)", "\82 \82 \82 \82¢\82¢\82¢", 0, 6);
+  x2("(?:\82 *|\82¢*)(?:\82 +|\82¢+)", "\82 \82 \82 \82¢\82¢\82¢", 0, 12);
+  x2("(?:\82 +|\82¢+){2}", "\82 \82 \82 \82¢\82¢\82¢", 0, 12);
+  x2("(?:\82 +|\82¢+){1,2}", "\82 \82 \82 \82¢\82¢\82¢", 0, 12);
+  x2("(?:\82 +|\\A\82¢*)\82¤\82¤", "\82¤\82¤", 0, 4);
+  n("(?:\82 +|\\A\82¢*)\82¤\82¤", "\82 \82¢\82¤\82¤");
+  x2("(?:^\82 +|\82¢+)*\82¤", "\82 \82 \82¢\82¢\82¢\82 \82¢\82¤", 12, 16);
+  x2("(?:^\82 +|\82¢+)*\82¤", "\82 \82 \82¢\82¢\82¢\82¢\82¤", 0, 14);
+  x2("\82¤{0,}", "\82¤\82¤\82¤\82¤", 0, 8);
+  x2("\82 |(?i)c", "C", 0, 1);
+  x2("(?i)c|\82 ", "C", 0, 1);
+  x2("(?i:\82 )|a", "a", 0, 1);
+  n("(?i:\82 )|a", "A");
+  x2("[\82 \82¢\82¤]?", "\82 \82¢\82¤", 0, 2);
+  x2("[\82 \82¢\82¤]*", "\82 \82¢\82¤", 0, 6);
+  x2("[^\82 \82¢\82¤]*", "\82 \82¢\82¤", 0, 0);
+  n("[^\82 \82¢\82¤]+", "\82 \82¢\82¤");
+  x2("\82 ?\?", "\82 \82 \82 ", 0, 0);
+  x2("\82¢\82 ?\?\82¢", "\82¢\82 \82¢", 0, 6);
+  x2("\82 *?", "\82 \82 \82 ", 0, 0);
+  x2("\82¢\82 *?", "\82¢\82 \82 ", 0, 2);
+  x2("\82¢\82 *?\82¢", "\82¢\82 \82 \82¢", 0, 8);
+  x2("\82 +?", "\82 \82 \82 ", 0, 2);
+  x2("\82¢\82 +?", "\82¢\82 \82 ", 0, 4);
+  x2("\82¢\82 +?\82¢", "\82¢\82 \82 \82¢", 0, 8);
+  x2("(?:\93V?)?\?", "\93V", 0, 0);
+  x2("(?:\93V?\?)?", "\93V", 0, 0);
+  x2("(?:\96²?)+?", "\96²\96²\96²", 0, 2);
+  x2("(?:\95\97+)?\?", "\95\97\95\97\95\97", 0, 0);
+  x2("(?:\90á+)?\?\91\9a", "\90á\90á\90á\91\9a", 0, 8);
+  x2("(?:\82 \82¢)?{2}", "", 0, 0);
+  x2("(?:\8bS\8eÔ)?{2}", "\8bS\8eÔ\8bS\8eÔ\8bS", 0, 8);
+  x2("(?:\8bS\8eÔ)*{0}", "\8bS\8eÔ\8bS\8eÔ\8bS", 0, 0);
+  x2("(?:\8bS\8eÔ){3,}", "\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ", 0, 16);
+  n("(?:\8bS\8eÔ){3,}", "\8bS\8eÔ\8bS\8eÔ");
+  x2("(?:\8bS\8eÔ){2,4}", "\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ", 0, 12);
+  x2("(?:\8bS\8eÔ){2,4}", "\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ", 0, 16);
+  x2("(?:\8bS\8eÔ){2,4}?", "\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ\8bS\8eÔ", 0, 8);
+  x2("(?:\8bS\8eÔ){,}", "\8bS\8eÔ{,}", 0, 7);
+  x2("(?:\82©\82«\82­)+?{2}", "\82©\82«\82­\82©\82«\82­\82©\82«\82­", 0, 12);
+  x3("(\89Î)", "\89Î", 0, 2, 1);
+  x3("(\89Î\90\85)", "\89Î\90\85", 0, 4, 1);
+  x2("((\8e\9e\8aÔ))", "\8e\9e\8aÔ", 0, 4);
+  x3("((\95\97\90\85))", "\95\97\90\85", 0, 4, 1);
+  x3("((\8dð\93ú))", "\8dð\93ú", 0, 4, 2);
+  x3("((((((((((((((((((((\97Ê\8eq))))))))))))))))))))", "\97Ê\8eq", 0, 4, 20);
+  x3("(\82 \82¢)(\82¤\82¦)", "\82 \82¢\82¤\82¦", 0, 4, 1);
+  x3("(\82 \82¢)(\82¤\82¦)", "\82 \82¢\82¤\82¦", 4, 8, 2);
+  x3("()(\82 )\82¢\82¤(\82¦\82¨\82©)\82«\82­\82¯\82±", "\82 \82¢\82¤\82¦\82¨\82©\82«\82­\82¯\82±", 6, 12, 3);
+  x3("(()(\82 )\82¢\82¤(\82¦\82¨\82©)\82«\82­\82¯\82±)", "\82 \82¢\82¤\82¦\82¨\82©\82«\82­\82¯\82±", 6, 12, 4);
+  x3(".*(\83t\83H)\83\93\81E\83}(\83\93()\83V\83\85\83^)\83C\83\93", "\83t\83H\83\93\81E\83}\83\93\83V\83\85\83^\83C\83\93", 10, 18, 2);
+  x2("(^\82 )", "\82 ", 0, 2);
+  x3("(\82 )|(\82 )", "\82¢\82 ", 2, 4, 1);
+  x3("(^\82 )|(\82 )", "\82¢\82 ", 2, 4, 2);
+  x3("(\82 ?)", "\82 \82 \82 ", 0, 2, 1);
+  x3("(\82Ü*)", "\82Ü\82Ü\82Ü", 0, 6, 1);
+  x3("(\82Æ*)", "", 0, 0, 1);
+  x3("(\82é+)", "\82é\82é\82é\82é\82é\82é\82é", 0, 14, 1);
+  x3("(\82Ó+|\82Ö*)", "\82Ó\82Ó\82Ó\82Ö\82Ö", 0, 6, 1);
+  x3("(\82 +|\82¢?)", "\82¢\82¢\82¢\82 \82 ", 0, 2, 1);
+  x3("(\82 \82¢\82¤)?", "\82 \82¢\82¤", 0, 6, 1);
+  x3("(\82 \82¢\82¤)*", "\82 \82¢\82¤", 0, 6, 1);
+  x3("(\82 \82¢\82¤)+", "\82 \82¢\82¤", 0, 6, 1);
+  x3("(\82³\82µ\82·|\82 \82¢\82¤)+", "\82 \82¢\82¤", 0, 6, 1);
+  x3("([\82È\82É\82Ê][\82©\82«\82­]|\82©\82«\82­)+", "\82©\82«\82­", 0, 6, 1);
+  x3("((?i:\82 \82¢\82¤))", "\82 \82¢\82¤", 0, 6, 1);
+  x3("((?m:\82 .\82¤))", "\82 \n\82¤", 0, 5, 1);
+  x3("((?=\82 \82ñ)\82 )", "\82 \82ñ\82¢", 0, 2, 1);
+  x3("\82 \82¢\82¤|(.\82 \82¢\82¦)", "\82ñ\82 \82¢\82¦", 0, 8, 1);
+  x3("\82 *(.)", "\82 \82 \82 \82 \82ñ", 8, 10, 1);
+  x3("\82 *?(.)", "\82 \82 \82 \82 \82ñ", 0, 2, 1);
+  x3("\82 *?(\82ñ)", "\82 \82 \82 \82 \82ñ", 8, 10, 1);
+  x3("[\82¢\82¤\82¦]\82 *(.)", "\82¦\82 \82 \82 \82 \82ñ", 10, 12, 1);
+  x3("(\\A\82¢\82¢)\82¤\82¤", "\82¢\82¢\82¤\82¤", 0, 4, 1);
+  n("(\\A\82¢\82¢)\82¤\82¤", "\82ñ\82¢\82¢\82¤\82¤");
+  x3("(^\82¢\82¢)\82¤\82¤", "\82¢\82¢\82¤\82¤", 0, 4, 1);
+  n("(^\82¢\82¢)\82¤\82¤", "\82ñ\82¢\82¢\82¤\82¤");
+  x3("\82ë\82ë(\82é\82é$)", "\82ë\82ë\82é\82é", 4, 8, 1);
+  n("\82ë\82ë(\82é\82é$)", "\82ë\82ë\82é\82é\82é");
+  x2("(\96³)\\1", "\96³\96³", 0, 4);
+  n("(\96³)\\1", "\96³\95\90");
+  x2("(\8bó?)\\1", "\8bó\8bó", 0, 4);
+  x2("(\8bó?\?)\\1", "\8bó\8bó", 0, 0);
+  x2("(\8bó*)\\1", "\8bó\8bó\8bó\8bó\8bó", 0, 8);
+  x3("(\8bó*)\\1", "\8bó\8bó\8bó\8bó\8bó", 0, 4, 1);
+  x2("\82 (\82¢*)\\1", "\82 \82¢\82¢\82¢\82¢", 0, 10);
+  x2("\82 (\82¢*)\\1", "\82 \82¢", 0, 2);
+  x2("(\82 *)(\82¢*)\\1\\2", "\82 \82 \82 \82¢\82¢\82 \82 \82 \82¢\82¢", 0, 20);
+  x2("(\82 *)(\82¢*)\\2", "\82 \82 \82 \82¢\82¢\82¢\82¢", 0, 14);
+  x3("(\82 *)(\82¢*)\\2", "\82 \82 \82 \82¢\82¢\82¢\82¢", 6, 10, 2);
+  x2("(((((((\82Û*)\82Ø))))))\82Ò\\7", "\82Û\82Û\82Û\82Ø\82Ò\82Û\82Û\82Û", 0, 16);
+  x3("(((((((\82Û*)\82Ø))))))\82Ò\\7", "\82Û\82Û\82Û\82Ø\82Ò\82Û\82Û\82Û", 0, 6, 7);
+  x2("(\82Í)(\82Ð)(\82Ó)\\2\\1\\3", "\82Í\82Ð\82Ó\82Ð\82Í\82Ó", 0, 12);
+  x2("([\82«-\82¯])\\1", "\82­\82­", 0, 4);
+  x2("(\\w\\d\\s)\\1", "\82 5 \82 5 ", 0, 8);
+  n("(\\w\\d\\s)\\1", "\82 5 \82 5");
+  x2("(\92N\81H|[\82 -\82¤]{3})\\1", "\92N\81H\92N\81H", 0, 8);
+  x2("...(\92N\81H|[\82 -\82¤]{3})\\1", "\82 a\82 \92N\81H\92N\81H", 0, 13);
+  x2("(\92N\81H|[\82 -\82¤]{3})\\1", "\82¤\82¢\82¤\82¤\82¢\82¤", 0, 12);
+  x2("(^\82±)\\1", "\82±\82±", 0, 4);
+  n("(^\82Þ)\\1", "\82ß\82Þ\82Þ");
+  n("(\82 $)\\1", "\82 \82 ");
+  n("(\82 \82¢\\Z)\\1", "\82 \82¢");
+  x2("(\82 *\\Z)\\1", "\82 ", 2, 2);
+  x2(".(\82 *\\Z)\\1", "\82¢\82 ", 2, 4);
+  x3("(.(\82â\82¢\82ä)\\2)", "z\82â\82¢\82ä\82â\82¢\82ä", 0, 13, 1);
+  x3("(.(..\\d.)\\2)", "\82 12341234", 0, 10, 1);
+  x2("((?i:\82 v\82¸))\\1", "\82 v\82¸\82 v\82¸", 0, 10);
+  x2("(?<\8bð\82©>\95Ï|\\(\\g<\8bð\82©>\\))", "((((((\95Ï))))))", 0, 14);
+  x2("\\A(?:\\g<\88¢_1>|\\g<\89]_2>|\\z\8fI\97¹  (?<\88¢_1>\8aÏ|\8e©\\g<\89]_2>\8e©)(?<\89]_2>\8dÝ|\95ì\8eF\\g<\88¢_1>\95ì\8eF))$", "\95ì\8eF\8e©\95ì\8eF\8e©\8dÝ\8e©\95ì\8eF\8e©\95ì\8eF", 0, 26);
+  x2("[[\82Ð\82Ó]]", "\82Ó", 0, 2);
+  x2("[[\82¢\82¨\82¤]\82©]", "\82©", 0, 2);
+  n("[[^\82 ]]", "\82 ");
+  n("[^[\82 ]]", "\82 ");
+  x2("[^[^\82 ]]", "\82 ", 0, 2);
+  x2("[[\82©\82«\82­]&&\82«\82­]", "\82­", 0, 2);
+  n("[[\82©\82«\82­]&&\82«\82­]", "\82©");
+  n("[[\82©\82«\82­]&&\82«\82­]", "\82¯");
+  x2("[\82 -\82ñ&&\82¢-\82ð&&\82¤-\82ï]", "\82ï", 0, 2);
+  n("[^\82 -\82ñ&&\82¢-\82ð&&\82¤-\82ï]", "\82ï");
+  x2("[[^\82 &&\82 ]&&\82 -\82ñ]", "\82¢", 0, 2);
+  n("[[^\82 &&\82 ]&&\82 -\82ñ]", "\82 ");
+  x2("[[^\82 -\82ñ&&\82¢\82¤\82¦\82¨]&&[^\82¤-\82©]]", "\82«", 0, 2);
+  n("[[^\82 -\82ñ&&\82¢\82¤\82¦\82¨]&&[^\82¤-\82©]]", "\82¢");
+  x2("[^[^\82 \82¢\82¤]&&[^\82¤\82¦\82¨]]", "\82¤", 0, 2);
+  x2("[^[^\82 \82¢\82¤]&&[^\82¤\82¦\82¨]]", "\82¦", 0, 2);
+  n("[^[^\82 \82¢\82¤]&&[^\82¤\82¦\82¨]]", "\82©");
+  x2("[\82 -&&-\82 ]", "-", 0, 1);
+  x2("[^[^a-z\82 \82¢\82¤]&&[^bcdefg\82¤\82¦\82¨]q-w]", "\82¦", 0, 2);
+  x2("[^[^a-z\82 \82¢\82¤]&&[^bcdefg\82¤\82¦\82¨]g-w]", "f", 0, 1);
+  x2("[^[^a-z\82 \82¢\82¤]&&[^bcdefg\82¤\82¦\82¨]g-w]", "g", 0, 1);
+  n("[^[^a-z\82 \82¢\82¤]&&[^bcdefg\82¤\82¦\82¨]g-w]", "2");
+  x2("a<b>\83o\81[\83W\83\87\83\93\82Ì\83_\83E\83\93\83\8d\81[\83h<\\/b>", "a<b>\83o\81[\83W\83\87\83\93\82Ì\83_\83E\83\93\83\8d\81[\83h</b>", 0, 32);
+  x2(".<b>\83o\81[\83W\83\87\83\93\82Ì\83_\83E\83\93\83\8d\81[\83h<\\/b>", "a<b>\83o\81[\83W\83\87\83\93\82Ì\83_\83E\83\93\83\8d\81[\83h</b>", 0, 32);
+  fprintf(stdout,
+       "\nRESULT   SUCC: %d,  FAIL: %d,  ERROR: %d      (by Oniguruma %s)\n",
+       nsucc, nfail, nerror, onig_version());
+
+#ifndef POSIX_TEST
+  onig_region_free(region, 1);
+  onig_end();
+#endif
+
+  return ((nfail == 0 && nerror == 0) ? 0 : -1);
+}