@port-labs/jq-node-bindings 0.0.13 → 0.0.15-dev1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/binding.gyp +41 -19
- package/configure +1 -1
- package/deps/jq/.gitattributes +12 -0
- package/deps/jq/AUTHORS +149 -43
- package/deps/jq/COPYING +75 -1
- package/deps/jq/ChangeLog +2 -2
- package/deps/jq/Makefile.am +106 -65
- package/deps/jq/NEWS.md +391 -0
- package/deps/jq/README.md +54 -52
- package/deps/jq/SECURITY.md +7 -0
- package/deps/jq/compile-ios.sh +106 -102
- package/deps/jq/configure.ac +72 -59
- package/deps/jq/docs/Pipfile +14 -0
- package/deps/jq/docs/Pipfile.lock +415 -0
- package/deps/jq/docs/README.md +15 -14
- package/deps/jq/docs/build_manpage.py +251 -0
- package/deps/jq/docs/build_mantests.py +21 -0
- package/deps/jq/docs/build_website.py +95 -0
- package/deps/jq/docs/content/download/default.yml +249 -0
- package/deps/jq/docs/content/index.yml +83 -0
- package/deps/jq/docs/content/{3.manual/v1.6 → manual/dev}/manual.yml +992 -452
- package/deps/jq/docs/content/{3.manual → manual}/v1.3/manual.yml +105 -116
- package/deps/jq/docs/content/{3.manual → manual}/v1.4/manual.yml +122 -129
- package/deps/jq/docs/content/{3.manual → manual}/v1.5/manual.yml +313 -262
- package/deps/jq/docs/content/{3.manual → manual/v1.6}/manual.yml +407 -332
- package/deps/jq/docs/content/manual/v1.7/manual.yml +3697 -0
- package/deps/jq/docs/content/tutorial/default.yml +337 -0
- package/deps/jq/docs/manual_schema.yml +60 -0
- package/deps/jq/docs/public/css/style.css +99 -0
- package/deps/jq/docs/public/icon.png +0 -0
- package/deps/jq/docs/public/icon.svg +1 -0
- package/deps/jq/docs/public/jq.svg +1 -0
- package/deps/jq/docs/public/js/manual-search.js +31 -49
- package/deps/jq/docs/templates/default.html.j2 +31 -0
- package/deps/jq/docs/templates/index.html.j2 +58 -0
- package/deps/jq/docs/templates/manual.html.j2 +120 -0
- package/deps/jq/docs/templates/shared/_footer.html.j2 +14 -0
- package/deps/jq/docs/templates/shared/_head.html.j2 +23 -0
- package/deps/jq/docs/templates/shared/_navbar.html.j2 +40 -0
- package/deps/jq/docs/validate_manual_schema.py +19 -0
- package/deps/jq/jq.1.prebuilt +1102 -294
- package/deps/jq/jq.spec +2 -3
- package/deps/jq/libjq.pc.in +11 -0
- package/deps/jq/m4/ax_pthread.m4 +522 -0
- package/deps/jq/modules/oniguruma/.travis.yml +17 -0
- package/deps/jq/modules/oniguruma/CMakeLists.txt +206 -41
- package/deps/jq/modules/oniguruma/COPYING +23 -25
- package/deps/jq/modules/oniguruma/HISTORY +368 -23
- package/deps/jq/modules/oniguruma/Makefile.am +61 -7
- package/deps/jq/modules/oniguruma/README +34 -20
- package/deps/jq/modules/oniguruma/README.md +106 -33
- package/deps/jq/modules/oniguruma/README_japanese +183 -0
- package/deps/jq/modules/oniguruma/autogen.sh +9 -0
- package/deps/jq/modules/oniguruma/cmake/Config.cmake.in +4 -0
- package/deps/jq/modules/oniguruma/configure.ac +66 -55
- package/deps/jq/modules/oniguruma/doc/API +485 -42
- package/deps/jq/modules/oniguruma/doc/API.ja +732 -293
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.API +397 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.API.ja +393 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN +95 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN.ja +93 -0
- package/deps/jq/modules/oniguruma/doc/FAQ +3 -3
- package/deps/jq/modules/oniguruma/doc/FAQ.ja +8 -8
- package/deps/jq/modules/oniguruma/doc/RE +223 -63
- package/deps/jq/modules/oniguruma/doc/RE.ja +420 -265
- package/deps/jq/modules/oniguruma/doc/SYNTAX.md +1091 -0
- package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +840 -697
- package/deps/jq/modules/oniguruma/harnesses/ascii_compatible.dict +113 -0
- package/deps/jq/modules/oniguruma/harnesses/base.c +749 -0
- package/deps/jq/modules/oniguruma/harnesses/deluxe.c +206 -0
- package/deps/jq/modules/oniguruma/harnesses/dict_conv.py +72 -0
- package/deps/jq/modules/oniguruma/harnesses/fuzzer.options +2 -0
- package/deps/jq/modules/oniguruma/harnesses/libfuzzer-onig.cpp +45 -0
- package/deps/jq/modules/oniguruma/harnesses/regset.c +392 -0
- package/deps/jq/modules/oniguruma/index.html +16 -5
- package/deps/jq/modules/oniguruma/index_ja.html +16 -5
- package/deps/jq/modules/oniguruma/make_win.bat +5 -0
- package/deps/jq/modules/oniguruma/make_win32.bat +5 -3
- package/deps/jq/modules/oniguruma/make_win64.bat +5 -3
- package/deps/jq/modules/oniguruma/onig-config.cmake.in +80 -0
- package/deps/jq/modules/oniguruma/onig-config.in +1 -1
- package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +1 -1
- package/deps/jq/modules/oniguruma/oniguruma.pc.in +0 -1
- package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +9 -2
- package/deps/jq/modules/oniguruma/sample/Makefile.am +24 -5
- package/deps/jq/modules/oniguruma/sample/bug_fix.c +13 -51
- package/deps/jq/modules/oniguruma/sample/callback_each_match.c +168 -0
- package/deps/jq/modules/oniguruma/sample/callout.c +268 -0
- package/deps/jq/modules/oniguruma/sample/count.c +125 -0
- package/deps/jq/modules/oniguruma/sample/crnl.c +6 -4
- package/deps/jq/modules/oniguruma/sample/echo.c +136 -0
- package/deps/jq/modules/oniguruma/sample/encode.c +53 -146
- package/deps/jq/modules/oniguruma/sample/listcap.c +18 -10
- package/deps/jq/modules/oniguruma/sample/names.c +10 -6
- package/deps/jq/modules/oniguruma/sample/posix.c +13 -2
- package/deps/jq/modules/oniguruma/sample/regset.c +95 -0
- package/deps/jq/modules/oniguruma/sample/scan.c +20 -6
- package/deps/jq/modules/oniguruma/sample/simple.c +8 -4
- package/deps/jq/modules/oniguruma/sample/sql.c +13 -8
- package/deps/jq/modules/oniguruma/sample/syntax.c +11 -10
- package/deps/jq/modules/oniguruma/sample/user_property.c +12 -7
- package/deps/jq/modules/oniguruma/src/Makefile.am +41 -15
- package/deps/jq/modules/oniguruma/src/Makefile.windows +196 -183
- package/deps/jq/modules/oniguruma/src/ascii.c +64 -7
- package/deps/jq/modules/oniguruma/src/big5.c +25 -15
- package/deps/jq/modules/oniguruma/src/config.h.cmake.in +7 -22
- package/deps/jq/modules/oniguruma/src/config.h.win32 +56 -84
- package/deps/jq/modules/oniguruma/src/config.h.win64 +56 -84
- package/deps/jq/modules/oniguruma/src/config.h.windows.in +62 -0
- package/deps/jq/modules/oniguruma/src/cp1251.c +14 -8
- package/deps/jq/modules/oniguruma/src/euc_jp.c +28 -30
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +25 -32
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +1 -2
- package/deps/jq/modules/oniguruma/src/euc_kr.c +27 -15
- package/deps/jq/modules/oniguruma/src/euc_tw.c +40 -17
- package/deps/jq/modules/oniguruma/src/gb18030.c +177 -119
- package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +12 -8
- package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +8 -6
- package/deps/jq/modules/oniguruma/src/iso8859_1.c +92 -91
- package/deps/jq/modules/oniguruma/src/iso8859_10.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_11.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_13.c +13 -33
- package/deps/jq/modules/oniguruma/src/iso8859_14.c +13 -30
- package/deps/jq/modules/oniguruma/src/iso8859_15.c +13 -34
- package/deps/jq/modules/oniguruma/src/iso8859_16.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_2.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_3.c +13 -33
- package/deps/jq/modules/oniguruma/src/iso8859_4.c +13 -32
- package/deps/jq/modules/oniguruma/src/iso8859_5.c +16 -23
- package/deps/jq/modules/oniguruma/src/iso8859_6.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_7.c +14 -29
- package/deps/jq/modules/oniguruma/src/iso8859_8.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_9.c +13 -33
- package/deps/jq/modules/oniguruma/src/koi8.c +14 -27
- package/deps/jq/modules/oniguruma/src/koi8_r.c +12 -19
- package/deps/jq/modules/oniguruma/src/make_property.sh +21 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb.sh +7 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb_data.py +267 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +25 -11
- package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +206 -26
- package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +19 -10
- package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +474 -375
- package/deps/jq/modules/oniguruma/src/make_unicode_wb.sh +7 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_wb_data.py +267 -0
- package/deps/jq/modules/oniguruma/src/mktable.c +28 -24
- package/deps/jq/modules/oniguruma/src/onig_init.c +2 -2
- package/deps/jq/modules/oniguruma/src/oniggnu.h +7 -5
- package/deps/jq/modules/oniguruma/src/onigposix.h +40 -16
- package/deps/jq/modules/oniguruma/src/oniguruma.h +357 -107
- package/deps/jq/modules/oniguruma/src/regcomp.c +6214 -3933
- package/deps/jq/modules/oniguruma/src/regenc.c +197 -120
- package/deps/jq/modules/oniguruma/src/regenc.h +106 -63
- package/deps/jq/modules/oniguruma/src/regerror.c +112 -91
- package/deps/jq/modules/oniguruma/src/regexec.c +4876 -2010
- package/deps/jq/modules/oniguruma/src/regext.c +8 -8
- package/deps/jq/modules/oniguruma/src/reggnu.c +13 -17
- package/deps/jq/modules/oniguruma/src/regint.h +757 -491
- package/deps/jq/modules/oniguruma/src/regparse.c +7204 -3240
- package/deps/jq/modules/oniguruma/src/regparse.h +361 -218
- package/deps/jq/modules/oniguruma/src/regposerr.c +49 -9
- package/deps/jq/modules/oniguruma/src/regposix.c +106 -24
- package/deps/jq/modules/oniguruma/src/regsyntax.c +66 -13
- package/deps/jq/modules/oniguruma/src/regtrav.c +1 -1
- package/deps/jq/modules/oniguruma/src/regversion.c +6 -4
- package/deps/jq/modules/oniguruma/src/sjis.c +23 -52
- package/deps/jq/modules/oniguruma/src/sjis_prop.c +25 -32
- package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +1 -2
- package/deps/jq/modules/oniguruma/src/st.c +248 -249
- package/deps/jq/modules/oniguruma/src/st.h +4 -5
- package/deps/jq/modules/oniguruma/src/unicode.c +869 -294
- package/deps/jq/modules/oniguruma/src/unicode_egcb_data.c +1419 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +1829 -1300
- package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +32 -9
- package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +32 -9
- package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1210 -984
- package/deps/jq/modules/oniguruma/src/unicode_property_data.c +22480 -15198
- package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +1463 -591
- package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +1958 -1418
- package/deps/jq/modules/oniguruma/src/unicode_wb_data.c +1106 -0
- package/deps/jq/modules/oniguruma/src/utf16_be.c +90 -49
- package/deps/jq/modules/oniguruma/src/utf16_le.c +80 -49
- package/deps/jq/modules/oniguruma/src/utf32_be.c +14 -42
- package/deps/jq/modules/oniguruma/src/utf32_le.c +13 -40
- package/deps/jq/modules/oniguruma/src/utf8.c +33 -78
- package/deps/jq/modules/oniguruma/test/CMakeLists.txt +55 -0
- package/deps/jq/modules/oniguruma/test/Makefile.am +65 -10
- package/deps/jq/modules/oniguruma/test/test.sh +17 -0
- package/deps/jq/modules/oniguruma/test/test_back.c +1450 -0
- package/deps/jq/modules/oniguruma/test/test_options.c +228 -0
- package/deps/jq/modules/oniguruma/test/test_regset.c +466 -0
- package/deps/jq/modules/oniguruma/test/test_syntax.c +365 -0
- package/deps/jq/modules/oniguruma/test/test_utf8.c +1761 -0
- package/deps/jq/modules/oniguruma/test/testc.c +128 -88
- package/deps/jq/modules/oniguruma/test/testp.c +613 -0
- package/deps/jq/modules/oniguruma/test/testu.c +75 -28
- package/deps/jq/modules/oniguruma/tis-ci/stub.c +3 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_back.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_regset.config +20 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_syntax.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_utf8.config +25 -0
- package/deps/jq/modules/oniguruma/tis-ci/testc.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/testu.config +24 -0
- package/deps/jq/modules/oniguruma/tis.config +1336 -0
- package/deps/jq/modules/oniguruma/windows/CMakeLists.txt +8 -0
- package/deps/jq/modules/oniguruma/windows/testc.c +865 -869
- package/deps/jq/scripts/update-website +6 -5
- package/deps/jq/scripts/version +10 -7
- package/deps/jq/sig/jq-release-new.key +29 -0
- package/deps/jq/sig/v1.4/sha256sum.txt +1 -0
- package/deps/jq/sig/v1.5/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.5rc1/sha256sum.txt +1 -0
- package/deps/jq/sig/v1.5rc2/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.6/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.7/jq-1.7.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7/jq-1.7.zip.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7/sha256sum.txt +23 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.zip.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-osx-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-win64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/sha256sum.txt +26 -0
- package/deps/jq/sig/v1.7rc1/jq-1.7rc1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-1.7rc1.zip.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc1/sha256sum.txt +23 -0
- package/deps/jq/sig/v1.7rc2/jq-1.7rc2.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-1.7rc2.zip.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc2/sha256sum.txt +23 -0
- package/deps/jq/src/builtin.c +537 -343
- package/deps/jq/src/builtin.h +18 -0
- package/deps/jq/src/builtin.jq +116 -143
- package/deps/jq/src/bytecode.h +8 -4
- package/deps/jq/src/compile.c +157 -143
- package/deps/jq/src/compile.h +3 -4
- package/deps/jq/src/decNumber/ICU-license.html +45 -0
- package/deps/jq/src/decNumber/decBasic.c +3908 -0
- package/deps/jq/src/decNumber/decCommon.c +1835 -0
- package/deps/jq/src/decNumber/decContext.c +437 -0
- package/deps/jq/src/decNumber/decContext.h +254 -0
- package/deps/jq/src/decNumber/decDPD.h +1185 -0
- package/deps/jq/src/decNumber/decDouble.c +140 -0
- package/deps/jq/src/decNumber/decDouble.h +155 -0
- package/deps/jq/src/decNumber/decNumber.c +8143 -0
- package/deps/jq/src/decNumber/decNumber.h +182 -0
- package/deps/jq/src/decNumber/decNumberLocal.h +757 -0
- package/deps/jq/src/decNumber/decPacked.c +220 -0
- package/deps/jq/src/decNumber/decPacked.h +52 -0
- package/deps/jq/src/decNumber/decQuad.c +135 -0
- package/deps/jq/src/decNumber/decQuad.h +177 -0
- package/deps/jq/src/decNumber/decSingle.c +71 -0
- package/deps/jq/src/decNumber/decSingle.h +86 -0
- package/deps/jq/src/decNumber/decimal128.c +553 -0
- package/deps/jq/src/decNumber/decimal128.h +81 -0
- package/deps/jq/src/decNumber/decimal32.c +476 -0
- package/deps/jq/src/decNumber/decimal32.h +81 -0
- package/deps/jq/src/decNumber/decimal64.c +839 -0
- package/deps/jq/src/decNumber/decimal64.h +83 -0
- package/deps/jq/src/decNumber/decnumber.pdf +0 -0
- package/deps/jq/src/decNumber/example1.c +38 -0
- package/deps/jq/src/decNumber/example2.c +52 -0
- package/deps/jq/src/decNumber/example3.c +64 -0
- package/deps/jq/src/decNumber/example4.c +61 -0
- package/deps/jq/src/decNumber/example5.c +36 -0
- package/deps/jq/src/decNumber/example6.c +61 -0
- package/deps/jq/src/decNumber/example7.c +35 -0
- package/deps/jq/src/decNumber/example8.c +39 -0
- package/deps/jq/src/decNumber/readme.txt +81 -0
- package/deps/jq/src/exec_stack.h +5 -3
- package/deps/jq/src/execute.c +126 -44
- package/deps/jq/src/inject_errors.c +0 -2
- package/deps/jq/src/jq.h +10 -1
- package/deps/jq/src/jq_test.c +222 -11
- package/deps/jq/src/jv.c +807 -176
- package/deps/jq/src/jv.h +22 -1
- package/deps/jq/src/jv_alloc.c +33 -26
- package/deps/jq/src/jv_alloc.h +0 -11
- package/deps/jq/src/jv_aux.c +153 -67
- package/deps/jq/src/jv_dtoa.c +12 -2
- package/deps/jq/src/jv_dtoa_tsd.c +51 -0
- package/deps/jq/src/jv_dtoa_tsd.h +4 -0
- package/deps/jq/src/jv_parse.c +70 -15
- package/deps/jq/src/jv_print.c +56 -60
- package/deps/jq/src/jv_private.h +7 -0
- package/deps/jq/src/jv_thread.h +76 -0
- package/deps/jq/src/jv_unicode.c +18 -0
- package/deps/jq/src/jv_unicode.h +2 -0
- package/deps/jq/src/lexer.c +782 -543
- package/deps/jq/src/lexer.h +438 -64
- package/deps/jq/src/lexer.l +10 -3
- package/deps/jq/src/libm.h +16 -6
- package/deps/jq/src/linker.c +97 -40
- package/deps/jq/src/locfile.c +2 -1
- package/deps/jq/src/main.c +384 -336
- package/deps/jq/src/opcode_list.h +5 -2
- package/deps/jq/src/parser.c +2260 -1898
- package/deps/jq/src/parser.h +115 -98
- package/deps/jq/src/parser.y +124 -89
- package/deps/jq/src/util.c +854 -55
- package/deps/jq/src/util.h +6 -4
- package/deps/jq/tests/jq.test +762 -26
- package/deps/jq/tests/jq_fuzz_compile.c +27 -0
- package/deps/jq/tests/jq_fuzz_execute.cpp +42 -0
- package/deps/jq/tests/jq_fuzz_fixed.cpp +297 -0
- package/deps/jq/tests/jq_fuzz_load_file.c +28 -0
- package/deps/jq/tests/jq_fuzz_parse.c +21 -0
- package/deps/jq/tests/jq_fuzz_parse_extended.c +36 -0
- package/deps/jq/tests/jq_fuzz_parse_stream.c +21 -0
- package/deps/jq/tests/local.supp +14 -0
- package/deps/jq/tests/man.test +979 -0
- package/deps/jq/tests/manonig.test +76 -0
- package/deps/jq/tests/manonigtest +5 -0
- package/deps/jq/tests/mantest +1 -2
- package/deps/jq/tests/modules/home2/.jq/g.jq +1 -0
- package/deps/jq/tests/modules/shadow1.jq +2 -0
- package/deps/jq/tests/modules/shadow2.jq +1 -0
- package/deps/jq/tests/modules/test_bind_order0.jq +1 -0
- package/deps/jq/tests/modules/test_bind_order1.jq +1 -1
- package/deps/jq/tests/modules/test_bind_order2.jq +0 -1
- package/deps/jq/tests/no-main-program.jq +1 -0
- package/deps/jq/tests/onig.test +77 -2
- package/deps/jq/tests/setup +7 -2
- package/deps/jq/tests/shtest +478 -59
- package/deps/jq/tests/uri.test +38 -0
- package/deps/jq/tests/uritest +5 -0
- package/deps/jq/tests/yes-main-program.jq +2 -0
- package/lib/index.js +3 -0
- package/lib/jq.js +15 -1
- package/lib/templateAsync.js +137 -0
- package/package.json +7 -7
- package/src/binding.cc +623 -146
- package/src/binding.h +3 -4
- package/test/santiy-async.test.js +171 -0
- package/test/santiy.test.js +2 -2
- package/test/template-async.test.js +182 -0
- package/test/template.test.js +3 -3
- package/deps/jq/.travis.yml +0 -202
- package/deps/jq/NEWS +0 -89
- package/deps/jq/appveyor.yml +0 -53
- package/deps/jq/docs/Gemfile +0 -7
- package/deps/jq/docs/Gemfile.lock +0 -63
- package/deps/jq/docs/Rakefile +0 -24
- package/deps/jq/docs/Rakefile.manual +0 -49
- package/deps/jq/docs/Rakefile.website +0 -76
- package/deps/jq/docs/content/1.tutorial/default.yml +0 -327
- package/deps/jq/docs/content/2.download/default.yml +0 -193
- package/deps/jq/docs/content/index/index.yml +0 -73
- package/deps/jq/docs/public/css/base.scss +0 -181
- package/deps/jq/docs/public/jq.png +0 -0
- package/deps/jq/docs/site.yml +0 -9
- package/deps/jq/docs/templates/default.liquid +0 -34
- package/deps/jq/docs/templates/index.liquid +0 -73
- package/deps/jq/docs/templates/manual.liquid +0 -99
- package/deps/jq/docs/templates/shared/_footer.liquid +0 -10
- package/deps/jq/docs/templates/shared/_head.liquid +0 -17
- package/deps/jq/docs/templates/shared/_navbar.liquid +0 -27
- package/deps/jq/modules/oniguruma/README.ja +0 -195
- package/deps/jq/modules/oniguruma/cmake/dist.cmake +0 -321
- package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +0 -31
- package/deps/jq/modules/oniguruma/dist.info +0 -10
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +0 -2250
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +0 -203
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +0 -113
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +0 -1225
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +0 -24742
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +0 -4846
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +0 -2571
- /package/deps/jq/sig/{jq-release.key → jq-release-old.key} +0 -0
- /package/deps/jq/tests/modules/{.jq → home1/.jq} +0 -0
|
@@ -31,9 +31,10 @@ search(regex_t* reg, unsigned char* str, unsigned char* end)
|
|
|
31
31
|
}
|
|
32
32
|
else { /* error */
|
|
33
33
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
34
|
-
onig_error_code_to_str(s, r);
|
|
34
|
+
onig_error_code_to_str((UChar* )s, r);
|
|
35
35
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
36
36
|
fprintf(stderr, " (%s)\n", ONIGENC_NAME(onig_get_encoding(reg)));
|
|
37
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
37
38
|
return -1;
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -59,7 +60,7 @@ exec(OnigEncoding enc, OnigOptionType options,
|
|
|
59
60
|
options, enc, ONIG_SYNTAX_DEFAULT, &einfo);
|
|
60
61
|
if (r != ONIG_NORMAL) {
|
|
61
62
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
62
|
-
onig_error_code_to_str(s, r, &einfo);
|
|
63
|
+
onig_error_code_to_str((UChar* )s, r, &einfo);
|
|
63
64
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
64
65
|
return -1;
|
|
65
66
|
}
|
|
@@ -72,55 +73,6 @@ exec(OnigEncoding enc, OnigOptionType options,
|
|
|
72
73
|
return 0;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
static OnigCaseFoldType CF = ONIGENC_CASE_FOLD_MIN;
|
|
76
|
-
|
|
77
|
-
#if 0
|
|
78
|
-
static void
|
|
79
|
-
set_case_fold(OnigCaseFoldType cf)
|
|
80
|
-
{
|
|
81
|
-
CF = cf;
|
|
82
|
-
}
|
|
83
|
-
#endif
|
|
84
|
-
|
|
85
|
-
static int
|
|
86
|
-
exec_deluxe(OnigEncoding pattern_enc, OnigEncoding str_enc,
|
|
87
|
-
OnigOptionType options, char* apattern, char* astr)
|
|
88
|
-
{
|
|
89
|
-
int r;
|
|
90
|
-
unsigned char *end;
|
|
91
|
-
regex_t* reg;
|
|
92
|
-
OnigCompileInfo ci;
|
|
93
|
-
OnigErrorInfo einfo;
|
|
94
|
-
UChar* pattern = (UChar* )apattern;
|
|
95
|
-
UChar* str = (UChar* )astr;
|
|
96
|
-
|
|
97
|
-
onig_initialize(&str_enc, 1);
|
|
98
|
-
|
|
99
|
-
ci.num_of_elements = 5;
|
|
100
|
-
ci.pattern_enc = pattern_enc;
|
|
101
|
-
ci.target_enc = str_enc;
|
|
102
|
-
ci.syntax = ONIG_SYNTAX_DEFAULT;
|
|
103
|
-
ci.option = options;
|
|
104
|
-
ci.case_fold_flag = CF;
|
|
105
|
-
|
|
106
|
-
r = onig_new_deluxe(®, pattern,
|
|
107
|
-
pattern + onigenc_str_bytelen_null(pattern_enc, pattern),
|
|
108
|
-
&ci, &einfo);
|
|
109
|
-
if (r != ONIG_NORMAL) {
|
|
110
|
-
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
111
|
-
onig_error_code_to_str(s, r, &einfo);
|
|
112
|
-
fprintf(stderr, "ERROR: %s\n", s);
|
|
113
|
-
return -1;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
end = str + onigenc_str_bytelen_null(str_enc, str);
|
|
117
|
-
r = search(reg, str, end);
|
|
118
|
-
|
|
119
|
-
onig_free(reg);
|
|
120
|
-
onig_end();
|
|
121
|
-
return 0;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
76
|
extern int main(int argc, char* argv[])
|
|
125
77
|
{
|
|
126
78
|
int r;
|
|
@@ -129,55 +81,55 @@ extern int main(int argc, char* argv[])
|
|
|
129
81
|
static unsigned char pattern[] = { 0xe7, 0xf6, 0xde, '\\', 'w', '+', 0x00 };
|
|
130
82
|
|
|
131
83
|
r = exec(ONIG_ENCODING_SJIS, ONIG_OPTION_NONE,
|
|
132
|
-
|
|
84
|
+
"^a\\p{Hiragana}c$", "a\202\274c");
|
|
133
85
|
|
|
134
86
|
r = exec(ONIG_ENCODING_EUC_JP, ONIG_OPTION_NONE,
|
|
135
|
-
|
|
87
|
+
"^a\\p{Hiragana}c$", "a\244\276c");
|
|
136
88
|
|
|
137
89
|
r = exec(ONIG_ENCODING_CP1251, ONIG_OPTION_IGNORECASE,
|
|
138
|
-
|
|
90
|
+
"aBc", " AbC");
|
|
139
91
|
|
|
140
92
|
r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE,
|
|
141
|
-
|
|
93
|
+
" [a-c\337z] ", " SS ");
|
|
142
94
|
r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE,
|
|
143
|
-
|
|
95
|
+
" [\330-\341] ", " SS ");
|
|
144
96
|
|
|
145
97
|
r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE,
|
|
146
|
-
|
|
98
|
+
"\337 ", " Ss ");
|
|
147
99
|
r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE,
|
|
148
|
-
|
|
100
|
+
"SS ", " \337 ");
|
|
149
101
|
r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE,
|
|
150
|
-
|
|
102
|
+
"\\A\\S\\z", "ss");
|
|
151
103
|
|
|
152
104
|
r = exec(ONIG_ENCODING_ISO_8859_2, ONIG_OPTION_IGNORECASE,
|
|
153
|
-
|
|
105
|
+
"[ac]+", "bbbaAaCCC");
|
|
154
106
|
|
|
155
107
|
r = exec(ONIG_ENCODING_ISO_8859_3, ONIG_OPTION_IGNORECASE,
|
|
156
|
-
|
|
108
|
+
"[ac]+", "bbbaAaCCC");
|
|
157
109
|
r = exec(ONIG_ENCODING_ISO_8859_4, ONIG_OPTION_IGNORECASE,
|
|
158
|
-
|
|
110
|
+
"[ac]+", "bbbaAaCCC");
|
|
159
111
|
r = exec(ONIG_ENCODING_ISO_8859_5, ONIG_OPTION_IGNORECASE,
|
|
160
|
-
|
|
112
|
+
"[ac]+", "bbbaAaCCC");
|
|
161
113
|
r = exec(ONIG_ENCODING_ISO_8859_6, ONIG_OPTION_IGNORECASE,
|
|
162
|
-
|
|
114
|
+
"[ac]+", "bbbaAaCCC");
|
|
163
115
|
r = exec(ONIG_ENCODING_ISO_8859_7, ONIG_OPTION_IGNORECASE,
|
|
164
|
-
|
|
116
|
+
"[ac]+", "bbbaAaCCC");
|
|
165
117
|
r = exec(ONIG_ENCODING_ISO_8859_8, ONIG_OPTION_IGNORECASE,
|
|
166
|
-
|
|
118
|
+
"[ac]+", "bbbaAaCCC");
|
|
167
119
|
r = exec(ONIG_ENCODING_ISO_8859_9, ONIG_OPTION_IGNORECASE,
|
|
168
|
-
|
|
120
|
+
"[ac]+", "bbbaAaCCC");
|
|
169
121
|
r = exec(ONIG_ENCODING_ISO_8859_10, ONIG_OPTION_IGNORECASE,
|
|
170
|
-
|
|
122
|
+
"[ac]+", "bbbaAaCCC");
|
|
171
123
|
r = exec(ONIG_ENCODING_ISO_8859_11, ONIG_OPTION_IGNORECASE,
|
|
172
|
-
|
|
124
|
+
"[ac]+", "bbbaAaCCC");
|
|
173
125
|
r = exec(ONIG_ENCODING_ISO_8859_13, ONIG_OPTION_IGNORECASE,
|
|
174
|
-
|
|
126
|
+
"[ac]+", "bbbaAaCCC");
|
|
175
127
|
r = exec(ONIG_ENCODING_ISO_8859_14, ONIG_OPTION_IGNORECASE,
|
|
176
|
-
|
|
128
|
+
"[ac]+", "bbbaAaCCC");
|
|
177
129
|
r = exec(ONIG_ENCODING_ISO_8859_15, ONIG_OPTION_IGNORECASE,
|
|
178
|
-
|
|
130
|
+
(char* )pattern, (char* )str);
|
|
179
131
|
r = exec(ONIG_ENCODING_ISO_8859_16, ONIG_OPTION_IGNORECASE,
|
|
180
|
-
|
|
132
|
+
(char* )pattern, (char* )str);
|
|
181
133
|
|
|
182
134
|
r = exec(ONIG_ENCODING_KOI8_R, ONIG_OPTION_NONE, "a+", "bbbaaaccc");
|
|
183
135
|
r = exec(ONIG_ENCODING_EUC_TW, ONIG_OPTION_NONE, "b*a+?c+", "bbbaaaccc");
|
|
@@ -196,92 +148,50 @@ extern int main(int argc, char* argv[])
|
|
|
196
148
|
r = exec(ONIG_ENCODING_ISO_8859_1, ONIG_OPTION_IGNORECASE,
|
|
197
149
|
"is", "iss");
|
|
198
150
|
|
|
199
|
-
r = exec_deluxe(ONIG_ENCODING_ASCII, ONIG_ENCODING_UTF16_BE,
|
|
200
|
-
ONIG_OPTION_NONE, "a+",
|
|
201
|
-
"\000b\000a\000a\000a\000c\000c\000\000");
|
|
202
|
-
|
|
203
|
-
r = exec_deluxe(ONIG_ENCODING_ASCII, ONIG_ENCODING_UTF16_LE,
|
|
204
|
-
ONIG_OPTION_NONE, "a+",
|
|
205
|
-
"b\000a\000a\000a\000a\000c\000\000\000");
|
|
206
|
-
|
|
207
|
-
r = exec_deluxe(ONIG_ENCODING_UTF16_BE, ONIG_ENCODING_UTF16_LE,
|
|
208
|
-
ONIG_OPTION_NONE,
|
|
209
|
-
"\000b\000a\000a\000a\000c\000c\000\000",
|
|
210
|
-
"x\000b\000a\000a\000a\000c\000c\000\000\000");
|
|
211
|
-
|
|
212
|
-
r = exec_deluxe(ONIG_ENCODING_ISO_8859_1, ONIG_ENCODING_UTF16_BE,
|
|
213
|
-
ONIG_OPTION_IGNORECASE,
|
|
214
|
-
"\337", "\000S\000S\000\000");
|
|
215
|
-
|
|
216
|
-
r = exec_deluxe(ONIG_ENCODING_ISO_8859_1, ONIG_ENCODING_UTF16_BE,
|
|
217
|
-
ONIG_OPTION_IGNORECASE,
|
|
218
|
-
"SS", "\000\337\000\000");
|
|
219
|
-
|
|
220
|
-
r = exec_deluxe(ONIG_ENCODING_ISO_8859_1, ONIG_ENCODING_UTF16_LE,
|
|
221
|
-
ONIG_OPTION_IGNORECASE,
|
|
222
|
-
"\337", "S\000S\000\000\000");
|
|
223
|
-
|
|
224
|
-
r = exec_deluxe(ONIG_ENCODING_ISO_8859_1, ONIG_ENCODING_UTF32_BE,
|
|
225
|
-
ONIG_OPTION_IGNORECASE,
|
|
226
|
-
"SS", "\000\000\000\337\000\000\000\000");
|
|
227
|
-
|
|
228
|
-
r = exec_deluxe(ONIG_ENCODING_ISO_8859_1, ONIG_ENCODING_UTF32_LE,
|
|
229
|
-
ONIG_OPTION_IGNORECASE,
|
|
230
|
-
"\337", "S\000\000\000S\000\000\000\000\000\000\000");
|
|
231
|
-
|
|
232
151
|
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_NONE,
|
|
233
|
-
|
|
152
|
+
"\000[\000[\000:\000a\000l\000n\000u\000m\000:\000]\000]\000+\000\000",
|
|
234
153
|
"\000#\002\120\000a\000Z\012\077\012\076\012\075\000\000");
|
|
235
154
|
/* 0x0a3d == \012\075 : is not alnum */
|
|
236
155
|
/* 0x0a3e == \012\076 : is alnum */
|
|
237
156
|
|
|
238
157
|
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_NONE,
|
|
239
|
-
|
|
158
|
+
"\000\\\000d\000+\000\000",
|
|
240
159
|
"\0003\0001\377\020\377\031\377\032\000\000");
|
|
241
160
|
|
|
242
161
|
r = exec(ONIG_ENCODING_GB18030, ONIG_OPTION_IGNORECASE,
|
|
243
|
-
|
|
162
|
+
"(Aa\\d)+", "BaA5Aa0234");
|
|
244
163
|
|
|
245
|
-
r =
|
|
246
|
-
|
|
247
|
-
"^\\P{Hiragana}\\p{^Hiragana}(\\p{Hiragana}+)$",
|
|
248
|
-
"\060\100\060\240\060\101\060\102\060\226\060\237\000\000");
|
|
164
|
+
r = exec(ONIG_ENCODING_GB18030, ONIG_OPTION_NONE,
|
|
165
|
+
"[[^\\w]]+[^\xee\xef]\xee\xef", "[[^\\w]]+[^\xee\xef]\xee\xef");
|
|
249
166
|
|
|
250
|
-
r =
|
|
251
|
-
|
|
252
|
-
"\000[\000\337\000]\000\000", "\000S\000S\000\000");
|
|
167
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
168
|
+
"\000[\000\337\000]\000\000", "\000S\000S\000\000");
|
|
253
169
|
|
|
254
|
-
r =
|
|
255
|
-
|
|
256
|
-
"\000[\000\337\000]\000\000", "\000s\000S\000\000");
|
|
170
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
171
|
+
"\000[\000\337\000]\000\000", "\000s\000S\000\000");
|
|
257
172
|
|
|
258
|
-
r =
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
"\000s\000S\000\000");
|
|
173
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
174
|
+
"\000^\000[\000\001\000-\377\375\000]\000$\000\000",
|
|
175
|
+
"\000s\000S\000\000");
|
|
262
176
|
|
|
263
|
-
r =
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
"\000S\000T\000\337\000\000");
|
|
177
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
178
|
+
"\000S\000S\000\000",
|
|
179
|
+
"\000S\000T\000\337\000\000");
|
|
267
180
|
|
|
268
|
-
r =
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
"\000S\000t\000s\000S\000\000");
|
|
181
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
182
|
+
"\000S\000T\000S\000S\000\000",
|
|
183
|
+
"\000S\000t\000s\000S\000\000");
|
|
272
184
|
|
|
273
185
|
{
|
|
274
186
|
UChar pat[] = { 0x1f, 0xfc, 0x00, 0x00 };
|
|
275
187
|
UChar str1[] = { 0x21, 0x26, 0x1f, 0xbe, 0x00, 0x00 };
|
|
276
188
|
UChar str2[] = { 0x1f, 0xf3, 0x00, 0x00 };
|
|
277
189
|
|
|
278
|
-
r =
|
|
279
|
-
|
|
280
|
-
(char* )pat, (char* )str1);
|
|
190
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
191
|
+
(char* )pat, (char* )str1);
|
|
281
192
|
|
|
282
|
-
r =
|
|
283
|
-
|
|
284
|
-
(char* )pat, (char* )str2);
|
|
193
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
194
|
+
(char* )pat, (char* )str2);
|
|
285
195
|
}
|
|
286
196
|
|
|
287
197
|
#if 0
|
|
@@ -289,17 +199,14 @@ extern int main(int argc, char* argv[])
|
|
|
289
199
|
|
|
290
200
|
set_case_fold(ONIGENC_CASE_FOLD_TURKISH_AZERI);
|
|
291
201
|
|
|
292
|
-
r =
|
|
293
|
-
|
|
294
|
-
"Ii", "\304\261\304\260");
|
|
202
|
+
r = exec(ONIG_ENCODING_UTF8, ONIG_ENCODING_UTF8, ONIG_OPTION_IGNORECASE,
|
|
203
|
+
"Ii", "\304\261\304\260");
|
|
295
204
|
|
|
296
|
-
r =
|
|
297
|
-
|
|
298
|
-
"\000I\000i\000\000", "\001\061\001\060\000\000");
|
|
205
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
206
|
+
"\000I\000i\000\000", "\001\061\001\060\000\000");
|
|
299
207
|
|
|
300
|
-
r =
|
|
301
|
-
|
|
302
|
-
"\001\061\001\060\000\000", "\000I\000i\000\000");
|
|
208
|
+
r = exec(ONIG_ENCODING_UTF16_BE, ONIG_OPTION_IGNORECASE,
|
|
209
|
+
"\001\061\001\060\000\000", "\000I\000i\000\000");
|
|
303
210
|
|
|
304
211
|
set_case_fold(ONIGENC_CASE_FOLD_MIN);
|
|
305
212
|
#endif
|
|
@@ -24,7 +24,7 @@ node_callback(int group, int beg, int end, int level, int at, void* arg)
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
extern int ex(unsigned char* str, unsigned char* pattern,
|
|
27
|
-
OnigSyntaxType* syntax)
|
|
27
|
+
OnigSyntaxType* syntax, OnigOptionType options)
|
|
28
28
|
{
|
|
29
29
|
int r;
|
|
30
30
|
unsigned char *start, *range, *end;
|
|
@@ -33,10 +33,10 @@ extern int ex(unsigned char* str, unsigned char* pattern,
|
|
|
33
33
|
OnigRegion *region;
|
|
34
34
|
|
|
35
35
|
r = onig_new(®, pattern, pattern + strlen((char* )pattern),
|
|
36
|
-
|
|
36
|
+
options, ONIG_ENCODING_ASCII, syntax, &einfo);
|
|
37
37
|
if (r != ONIG_NORMAL) {
|
|
38
38
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
39
|
-
onig_error_code_to_str(s, r, &einfo);
|
|
39
|
+
onig_error_code_to_str((UChar* )s, r, &einfo);
|
|
40
40
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
41
41
|
return -1;
|
|
42
42
|
}
|
|
@@ -68,7 +68,9 @@ extern int ex(unsigned char* str, unsigned char* pattern,
|
|
|
68
68
|
}
|
|
69
69
|
else { /* error */
|
|
70
70
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
71
|
-
onig_error_code_to_str(s, r);
|
|
71
|
+
onig_error_code_to_str((UChar* )s, r);
|
|
72
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
73
|
+
onig_free(reg);
|
|
72
74
|
return -1;
|
|
73
75
|
}
|
|
74
76
|
|
|
@@ -82,6 +84,7 @@ extern int main(int argc, char* argv[])
|
|
|
82
84
|
{
|
|
83
85
|
int r;
|
|
84
86
|
OnigSyntaxType syn;
|
|
87
|
+
OnigEncoding use_encs[1];
|
|
85
88
|
|
|
86
89
|
static UChar* str1 = (UChar* )"((())())";
|
|
87
90
|
static UChar* pattern1
|
|
@@ -93,17 +96,22 @@ extern int main(int argc, char* argv[])
|
|
|
93
96
|
static UChar* str3 = (UChar* )"0123";
|
|
94
97
|
static UChar* pattern3 = (UChar* )"(?@.)(?@.)(?@.)(?@.)";
|
|
95
98
|
|
|
96
|
-
|
|
99
|
+
static UChar* str4 = (UChar* )"(((a))(a)) ((((a))(a)))";
|
|
100
|
+
static UChar* pattern4
|
|
101
|
+
= (UChar* )"\\g<p>(?@<p>\\(\\g<s>\\)){0}(?@<s>(?:\\g<p>)*|a){0}";
|
|
102
|
+
|
|
103
|
+
use_encs[0] = ONIG_ENCODING_ASCII;
|
|
97
104
|
onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
|
|
98
105
|
|
|
99
|
-
/* enable capture
|
|
106
|
+
/* enable capture history */
|
|
100
107
|
onig_copy_syntax(&syn, ONIG_SYNTAX_DEFAULT);
|
|
101
|
-
onig_set_syntax_op2(&syn,
|
|
108
|
+
onig_set_syntax_op2(&syn,
|
|
102
109
|
onig_get_syntax_op2(&syn) | ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY);
|
|
103
110
|
|
|
104
|
-
r = ex(str1, pattern1, &syn);
|
|
105
|
-
r = ex(str2, pattern2, &syn);
|
|
106
|
-
r = ex(str3, pattern3, &syn);
|
|
111
|
+
r = ex(str1, pattern1, &syn, ONIG_OPTION_NONE);
|
|
112
|
+
r = ex(str2, pattern2, &syn, ONIG_OPTION_NONE);
|
|
113
|
+
r = ex(str3, pattern3, &syn, ONIG_OPTION_NONE);
|
|
114
|
+
r = ex(str4, pattern4, &syn, ONIG_OPTION_FIND_LONGEST);
|
|
107
115
|
|
|
108
116
|
onig_end();
|
|
109
117
|
return r;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
static int
|
|
9
9
|
name_callback(const UChar* name, const UChar* name_end,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
int ngroup_num, int* group_nums,
|
|
11
|
+
regex_t* reg, void* arg)
|
|
12
12
|
{
|
|
13
13
|
int i, gn, ref;
|
|
14
14
|
char* s;
|
|
@@ -31,18 +31,19 @@ extern int main(int argc, char* argv[])
|
|
|
31
31
|
regex_t* reg;
|
|
32
32
|
OnigErrorInfo einfo;
|
|
33
33
|
OnigRegion *region;
|
|
34
|
+
OnigEncoding use_encs[1];
|
|
34
35
|
|
|
35
36
|
static UChar* pattern = (UChar* )"(?<foo>a*)(?<bar>b*)(?<foo>c*)";
|
|
36
37
|
static UChar* str = (UChar* )"aaabbbbcc";
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
use_encs[0] = ONIG_ENCODING_ASCII;
|
|
39
40
|
onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
|
|
40
41
|
|
|
41
42
|
r = onig_new(®, pattern, pattern + strlen((char* )pattern),
|
|
42
|
-
|
|
43
|
+
ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
|
|
43
44
|
if (r != ONIG_NORMAL) {
|
|
44
45
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
45
|
-
onig_error_code_to_str(s, r, &einfo);
|
|
46
|
+
onig_error_code_to_str((UChar* )s, r, &einfo);
|
|
46
47
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
47
48
|
return -1;
|
|
48
49
|
}
|
|
@@ -64,7 +65,10 @@ extern int main(int argc, char* argv[])
|
|
|
64
65
|
}
|
|
65
66
|
else { /* error */
|
|
66
67
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
67
|
-
onig_error_code_to_str(s, r);
|
|
68
|
+
onig_error_code_to_str((UChar* )s, r);
|
|
69
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
70
|
+
onig_free(reg);
|
|
71
|
+
onig_end();
|
|
68
72
|
return -1;
|
|
69
73
|
}
|
|
70
74
|
|
|
@@ -16,6 +16,7 @@ static int x(regex_t* reg, unsigned char* pattern, unsigned char* str)
|
|
|
16
16
|
if (r != 0 && r != REG_NOMATCH) {
|
|
17
17
|
regerror(r, reg, buf, sizeof(buf));
|
|
18
18
|
fprintf(stderr, "ERROR: %s\n", buf);
|
|
19
|
+
regfree(reg);
|
|
19
20
|
return -1;
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -28,6 +29,7 @@ static int x(regex_t* reg, unsigned char* pattern, unsigned char* str)
|
|
|
28
29
|
fprintf(stderr, "%d: %d-%d\n", i, pmatch[i].rm_so, pmatch[i].rm_eo);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
32
|
+
regfree(reg);
|
|
31
33
|
return 0;
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -40,12 +42,14 @@ extern int main(int argc, char* argv[])
|
|
|
40
42
|
|
|
41
43
|
reg_set_encoding(REG_POSIX_ENCODING_ASCII);
|
|
42
44
|
|
|
43
|
-
/* default syntax (
|
|
45
|
+
/* default syntax (ONIG_SYNTAX_ONIGURUMA) */
|
|
44
46
|
pattern = (UChar* )"^a+b{2,7}[c-f]?$|uuu";
|
|
45
47
|
r = regcomp(®, (char* )pattern, REG_EXTENDED);
|
|
46
48
|
if (r) {
|
|
47
49
|
regerror(r, ®, buf, sizeof(buf));
|
|
48
50
|
fprintf(stderr, "ERROR: %s\n", buf);
|
|
51
|
+
regfree(®);
|
|
52
|
+
onig_end();
|
|
49
53
|
return -1;
|
|
50
54
|
}
|
|
51
55
|
x(®, pattern, (UChar* )"aaabbbbd");
|
|
@@ -56,6 +60,8 @@ extern int main(int argc, char* argv[])
|
|
|
56
60
|
if (r) {
|
|
57
61
|
regerror(r, ®, buf, sizeof(buf));
|
|
58
62
|
fprintf(stderr, "ERROR: %s\n", buf);
|
|
63
|
+
regfree(®);
|
|
64
|
+
onig_end();
|
|
59
65
|
return -1;
|
|
60
66
|
}
|
|
61
67
|
x(®, pattern, (UChar* )"a+b{2,7}d?|uuu");
|
|
@@ -66,6 +72,8 @@ extern int main(int argc, char* argv[])
|
|
|
66
72
|
if (r) {
|
|
67
73
|
regerror(r, ®, buf, sizeof(buf));
|
|
68
74
|
fprintf(stderr, "ERROR: %s\n", buf);
|
|
75
|
+
regfree(®);
|
|
76
|
+
onig_end();
|
|
69
77
|
return -1;
|
|
70
78
|
}
|
|
71
79
|
x(®, pattern, (UChar* )"aaaabbbbbbd");
|
|
@@ -77,6 +85,8 @@ extern int main(int argc, char* argv[])
|
|
|
77
85
|
if (r) {
|
|
78
86
|
regerror(r, ®, buf, sizeof(buf));
|
|
79
87
|
fprintf(stderr, "ERROR: %s\n", buf);
|
|
88
|
+
regfree(®);
|
|
89
|
+
onig_end();
|
|
80
90
|
return -1;
|
|
81
91
|
}
|
|
82
92
|
x(®, pattern, (UChar* )"aaabbbbd)");
|
|
@@ -86,11 +96,12 @@ extern int main(int argc, char* argv[])
|
|
|
86
96
|
if (r) {
|
|
87
97
|
regerror(r, ®, buf, sizeof(buf));
|
|
88
98
|
fprintf(stderr, "ERROR: %s\n", buf);
|
|
99
|
+
regfree(®);
|
|
100
|
+
onig_end();
|
|
89
101
|
return -1;
|
|
90
102
|
}
|
|
91
103
|
x(®, pattern, (UChar* )"a\nb\n");
|
|
92
104
|
|
|
93
|
-
regfree(®);
|
|
94
105
|
onig_end();
|
|
95
106
|
return 0;
|
|
96
107
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* regset.c
|
|
3
|
+
*/
|
|
4
|
+
#include <stdio.h>
|
|
5
|
+
#include <string.h>
|
|
6
|
+
#include "oniguruma.h"
|
|
7
|
+
|
|
8
|
+
extern int main(int argc, char* argv[])
|
|
9
|
+
{
|
|
10
|
+
int r;
|
|
11
|
+
int i, n;
|
|
12
|
+
int match_pos;
|
|
13
|
+
unsigned char *start, *range, *end;
|
|
14
|
+
OnigRegSet* set;
|
|
15
|
+
OnigRegSetLead lead;
|
|
16
|
+
regex_t* reg;
|
|
17
|
+
OnigErrorInfo einfo;
|
|
18
|
+
char ebuf[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
19
|
+
OnigEncoding use_encs[1];
|
|
20
|
+
|
|
21
|
+
static UChar* str = (UChar* )"aaaaaaaaaaaaaaaaaaaaaaca";
|
|
22
|
+
|
|
23
|
+
static char* pat[] = {
|
|
24
|
+
"a(.*)b|a(.)c",
|
|
25
|
+
"^(abc)",
|
|
26
|
+
"a(.....)c"
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
use_encs[0] = ONIG_ENCODING_UTF8;
|
|
30
|
+
onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
|
|
31
|
+
|
|
32
|
+
r = onig_regset_new(&set, 0, NULL);
|
|
33
|
+
if (r != ONIG_NORMAL) {
|
|
34
|
+
onig_error_code_to_str((UChar* )ebuf, r);
|
|
35
|
+
fprintf(stderr, "ERROR: %s\n", ebuf);
|
|
36
|
+
onig_end();
|
|
37
|
+
return -1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
n = sizeof(pat) / sizeof(pat[0]);
|
|
41
|
+
|
|
42
|
+
for (i = 0; i < n; i++) {
|
|
43
|
+
r = onig_new(®, (UChar* )pat[i], (UChar* )(pat[i] + strlen(pat[i])),
|
|
44
|
+
ONIG_OPTION_DEFAULT, ONIG_ENCODING_UTF8, ONIG_SYNTAX_DEFAULT,
|
|
45
|
+
&einfo);
|
|
46
|
+
if (r != ONIG_NORMAL) {
|
|
47
|
+
onig_error_code_to_str((UChar* )ebuf, r, &einfo);
|
|
48
|
+
fprintf(stderr, "ERROR: %s\n", ebuf);
|
|
49
|
+
onig_regset_free(set);
|
|
50
|
+
onig_end();
|
|
51
|
+
return -1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
r = onig_regset_add(set, reg);
|
|
55
|
+
if (r != ONIG_NORMAL) {
|
|
56
|
+
onig_free(reg);
|
|
57
|
+
onig_regset_free(set);
|
|
58
|
+
onig_end();
|
|
59
|
+
return -1;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
end = str + strlen((char* )str);
|
|
64
|
+
start = str;
|
|
65
|
+
range = end;
|
|
66
|
+
lead = ONIG_REGSET_POSITION_LEAD;
|
|
67
|
+
//lead = ONIG_REGSET_PRIORITY_TO_REGEX_ORDER;
|
|
68
|
+
r = onig_regset_search(set, str, end, start, range, lead, ONIG_OPTION_NONE,
|
|
69
|
+
&match_pos);
|
|
70
|
+
if (r >= 0) {
|
|
71
|
+
OnigRegion *region;
|
|
72
|
+
|
|
73
|
+
fprintf(stderr, "match regex index: %d\n", r);
|
|
74
|
+
fprintf(stderr, "match position: %d\n", match_pos);
|
|
75
|
+
|
|
76
|
+
region = onig_regset_get_region(set, r);
|
|
77
|
+
for (i = 0; i < region->num_regs; i++) {
|
|
78
|
+
fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else if (r == ONIG_MISMATCH) {
|
|
82
|
+
fprintf(stderr, "search fail\n");
|
|
83
|
+
}
|
|
84
|
+
else { /* error */
|
|
85
|
+
onig_error_code_to_str((UChar* )ebuf, r);
|
|
86
|
+
fprintf(stderr, "ERROR: %s\n", ebuf);
|
|
87
|
+
onig_regset_free(set);
|
|
88
|
+
onig_end();
|
|
89
|
+
return -1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
onig_regset_free(set);
|
|
93
|
+
onig_end();
|
|
94
|
+
return 0;
|
|
95
|
+
}
|
|
@@ -21,14 +21,14 @@ scan_callback(int n, int r, OnigRegion* region, void* arg)
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
static int
|
|
24
|
-
scan(regex_t* reg, unsigned char* str, unsigned char* end)
|
|
24
|
+
scan(regex_t* reg, OnigOptionType options, unsigned char* str, unsigned char* end)
|
|
25
25
|
{
|
|
26
26
|
int r;
|
|
27
27
|
OnigRegion *region;
|
|
28
28
|
|
|
29
29
|
region = onig_region_new();
|
|
30
30
|
|
|
31
|
-
r = onig_scan(reg, str, end, region,
|
|
31
|
+
r = onig_scan(reg, str, end, region, options, scan_callback, NULL);
|
|
32
32
|
if (r >= 0) {
|
|
33
33
|
fprintf(stdout, "total: %d match\n", r);
|
|
34
34
|
}
|
|
@@ -36,6 +36,7 @@ scan(regex_t* reg, unsigned char* str, unsigned char* end)
|
|
|
36
36
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
37
37
|
onig_error_code_to_str((OnigUChar* )s, r);
|
|
38
38
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
39
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
39
40
|
return -1;
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -44,7 +45,7 @@ scan(regex_t* reg, unsigned char* str, unsigned char* end)
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
static int
|
|
47
|
-
exec(OnigEncoding enc, OnigOptionType options, char* apattern, char* astr)
|
|
48
|
+
exec(OnigEncoding enc, OnigOptionType options, OnigOptionType runtime_options, char* apattern, char* astr)
|
|
48
49
|
{
|
|
49
50
|
int r;
|
|
50
51
|
unsigned char *end;
|
|
@@ -63,11 +64,12 @@ exec(OnigEncoding enc, OnigOptionType options, char* apattern, char* astr)
|
|
|
63
64
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
64
65
|
onig_error_code_to_str((OnigUChar* )s, r, &einfo);
|
|
65
66
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
67
|
+
onig_end();
|
|
66
68
|
return -1;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
end = str + onigenc_str_bytelen_null(enc, str);
|
|
70
|
-
r = scan(reg, str, end);
|
|
72
|
+
r = scan(reg, runtime_options, str, end);
|
|
71
73
|
|
|
72
74
|
onig_free(reg);
|
|
73
75
|
onig_end();
|
|
@@ -77,11 +79,23 @@ exec(OnigEncoding enc, OnigOptionType options, char* apattern, char* astr)
|
|
|
77
79
|
|
|
78
80
|
extern int main(int argc, char* argv[])
|
|
79
81
|
{
|
|
80
|
-
exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE,
|
|
82
|
+
exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NONE,
|
|
81
83
|
"\\Ga+\\s*", "a aa aaa baaa");
|
|
84
|
+
fprintf(stdout, "\n");
|
|
85
|
+
|
|
86
|
+
exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NOT_BEGIN_POSITION,
|
|
87
|
+
"\\Ga+\\s*", "a aa aaa baaa");
|
|
88
|
+
fprintf(stdout, "\n");
|
|
82
89
|
|
|
90
|
+
exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NONE,
|
|
91
|
+
"(?!\\G)a+\\s*", "a aa aaa baaa");
|
|
83
92
|
fprintf(stdout, "\n");
|
|
84
|
-
|
|
93
|
+
|
|
94
|
+
exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NOT_BEGIN_POSITION,
|
|
95
|
+
"(?!\\G)a+\\s*", "a aa aaa baaa");
|
|
96
|
+
fprintf(stdout, "\n");
|
|
97
|
+
|
|
98
|
+
exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, ONIG_OPTION_NONE,
|
|
85
99
|
"a+\\s*", "a aa aaa baaa");
|
|
86
100
|
|
|
87
101
|
return 0;
|
|
@@ -12,18 +12,19 @@ extern int main(int argc, char* argv[])
|
|
|
12
12
|
regex_t* reg;
|
|
13
13
|
OnigErrorInfo einfo;
|
|
14
14
|
OnigRegion *region;
|
|
15
|
+
OnigEncoding use_encs[1];
|
|
15
16
|
|
|
16
17
|
static UChar* pattern = (UChar* )"a(.*)b|[e-f]+";
|
|
17
18
|
static UChar* str = (UChar* )"zzzzaffffffffb";
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
use_encs[0] = ONIG_ENCODING_ASCII;
|
|
20
21
|
onig_initialize(use_encs, sizeof(use_encs)/sizeof(use_encs[0]));
|
|
21
22
|
|
|
22
23
|
r = onig_new(®, pattern, pattern + strlen((char* )pattern),
|
|
23
|
-
|
|
24
|
+
ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
|
|
24
25
|
if (r != ONIG_NORMAL) {
|
|
25
26
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
26
|
-
onig_error_code_to_str(s, r, &einfo);
|
|
27
|
+
onig_error_code_to_str((UChar* )s, r, &einfo);
|
|
27
28
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
28
29
|
return -1;
|
|
29
30
|
}
|
|
@@ -47,8 +48,11 @@ extern int main(int argc, char* argv[])
|
|
|
47
48
|
}
|
|
48
49
|
else { /* error */
|
|
49
50
|
char s[ONIG_MAX_ERROR_MESSAGE_LEN];
|
|
50
|
-
onig_error_code_to_str(s, r);
|
|
51
|
+
onig_error_code_to_str((UChar* )s, r);
|
|
51
52
|
fprintf(stderr, "ERROR: %s\n", s);
|
|
53
|
+
onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
|
|
54
|
+
onig_free(reg);
|
|
55
|
+
onig_end();
|
|
52
56
|
return -1;
|
|
53
57
|
}
|
|
54
58
|
|