@port-labs/jq-node-bindings 0.0.4 → 0.0.6
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/binding.gyp +3 -3
- package/configure +8 -6
- package/deps/jq/.travis.yml +184 -35
- package/deps/jq/AUTHORS +31 -30
- package/deps/jq/COPYING +2 -2
- package/deps/jq/KEYS +8 -0
- package/deps/jq/Makefile.am +85 -70
- package/deps/jq/NEWS +5 -4
- package/deps/jq/README.md +18 -9
- package/deps/jq/appveyor.yml +53 -0
- package/deps/jq/compile-ios.sh +5 -5
- package/deps/jq/config/m4/check-math-func.m4 +7 -2
- package/deps/jq/configure.ac +130 -68
- package/deps/jq/docs/Rakefile +14 -135
- package/deps/jq/docs/Rakefile.manual +49 -0
- package/deps/jq/docs/Rakefile.website +76 -0
- package/deps/jq/docs/content/2.download/default.yml +115 -39
- package/deps/jq/docs/content/3.manual/manual.yml +641 -231
- package/deps/jq/docs/content/3.manual/v1.3/manual.yml +130 -130
- package/deps/jq/docs/content/3.manual/v1.4/manual.yml +160 -160
- package/deps/jq/docs/content/3.manual/v1.5/manual.yml +2878 -0
- package/deps/jq/docs/content/3.manual/v1.6/manual.yml +3287 -0
- package/deps/jq/docs/content/index/index.yml +28 -6
- package/deps/jq/docs/public/.htaccess +2 -2
- package/deps/jq/docs/public/css/base.scss +141 -59
- package/deps/jq/docs/public/js/manual-search.js +52 -0
- package/deps/jq/docs/site.yml +1 -10
- package/deps/jq/docs/templates/default.liquid +10 -10
- package/deps/jq/docs/templates/index.liquid +45 -32
- package/deps/jq/docs/templates/manual.liquid +67 -90
- package/deps/jq/docs/templates/shared/_footer.liquid +10 -5
- package/deps/jq/docs/templates/shared/_head.liquid +17 -12
- package/deps/jq/docs/templates/shared/_navbar.liquid +27 -0
- package/deps/jq/jq.1.prebuilt +523 -139
- package/deps/jq/modules/oniguruma/AUTHORS +1 -0
- package/deps/jq/modules/oniguruma/CMakeLists.txt +86 -0
- package/deps/jq/modules/oniguruma/COPYING +28 -0
- package/deps/jq/modules/oniguruma/ChangeLog +0 -0
- package/deps/jq/modules/oniguruma/HISTORY +2138 -0
- package/deps/jq/modules/oniguruma/Makefile.am +33 -0
- package/deps/jq/modules/oniguruma/NEWS +0 -0
- package/deps/jq/modules/oniguruma/README +189 -0
- package/deps/jq/modules/oniguruma/README.ja +195 -0
- package/deps/jq/modules/oniguruma/README.md +203 -0
- package/deps/jq/modules/oniguruma/cmake/dist.cmake +321 -0
- package/deps/jq/modules/oniguruma/compile +348 -0
- package/deps/jq/modules/oniguruma/config.guess +1754 -0
- package/deps/jq/modules/oniguruma/config.sub +1890 -0
- package/deps/jq/modules/oniguruma/configure.ac +87 -0
- package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +31 -0
- package/deps/jq/modules/oniguruma/depcomp +791 -0
- package/deps/jq/modules/oniguruma/dist.info +10 -0
- package/deps/jq/modules/oniguruma/doc/API +660 -0
- package/deps/jq/modules/oniguruma/doc/API.ja +667 -0
- package/deps/jq/modules/oniguruma/doc/FAQ +12 -0
- package/deps/jq/modules/oniguruma/doc/FAQ.ja +22 -0
- package/deps/jq/modules/oniguruma/doc/RE +436 -0
- package/deps/jq/modules/oniguruma/doc/RE.ja +448 -0
- package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +698 -0
- package/deps/jq/modules/oniguruma/index.html +181 -0
- package/deps/jq/modules/oniguruma/index_ja.html +184 -0
- package/deps/jq/modules/oniguruma/install-sh +541 -0
- package/deps/jq/modules/oniguruma/m4/.whatever +0 -0
- package/deps/jq/modules/oniguruma/make_win32.bat +3 -0
- package/deps/jq/modules/oniguruma/make_win64.bat +3 -0
- package/deps/jq/modules/oniguruma/missing +215 -0
- package/deps/jq/modules/oniguruma/onig-config.in +78 -0
- package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +13 -0
- package/deps/jq/modules/oniguruma/oniguruma.pc.in +14 -0
- package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +28 -0
- package/deps/jq/modules/oniguruma/sample/Makefile.am +34 -0
- package/deps/jq/modules/oniguruma/sample/bug_fix.c +131 -0
- package/deps/jq/modules/oniguruma/sample/crnl.c +127 -0
- package/deps/jq/modules/oniguruma/sample/encode.c +308 -0
- package/deps/jq/modules/oniguruma/sample/listcap.c +110 -0
- package/deps/jq/modules/oniguruma/sample/names.c +75 -0
- package/deps/jq/modules/oniguruma/sample/posix.c +96 -0
- package/deps/jq/modules/oniguruma/sample/scan.c +88 -0
- package/deps/jq/modules/oniguruma/sample/simple.c +59 -0
- package/deps/jq/modules/oniguruma/sample/sql.c +76 -0
- package/deps/jq/modules/oniguruma/sample/syntax.c +76 -0
- package/deps/jq/modules/oniguruma/sample/user_property.c +87 -0
- package/deps/jq/modules/oniguruma/src/Makefile.am +58 -0
- package/deps/jq/modules/oniguruma/src/Makefile.windows +183 -0
- package/deps/jq/modules/oniguruma/src/ascii.c +61 -0
- package/deps/jq/modules/oniguruma/src/big5.c +190 -0
- package/deps/jq/modules/oniguruma/src/config.h.cmake.in +71 -0
- package/deps/jq/modules/oniguruma/src/config.h.win32 +84 -0
- package/deps/jq/modules/oniguruma/src/config.h.win64 +84 -0
- package/deps/jq/modules/oniguruma/src/cp1251.c +203 -0
- package/deps/jq/modules/oniguruma/src/euc_jp.c +310 -0
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +158 -0
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +27 -0
- package/deps/jq/modules/oniguruma/src/euc_kr.c +188 -0
- package/deps/jq/modules/oniguruma/src/euc_tw.c +171 -0
- package/deps/jq/modules/oniguruma/src/gb18030.c +538 -0
- package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +67 -0
- package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +55 -0
- package/deps/jq/modules/oniguruma/src/iso8859_1.c +275 -0
- package/deps/jq/modules/oniguruma/src/iso8859_10.c +242 -0
- package/deps/jq/modules/oniguruma/src/iso8859_11.c +99 -0
- package/deps/jq/modules/oniguruma/src/iso8859_13.c +231 -0
- package/deps/jq/modules/oniguruma/src/iso8859_14.c +244 -0
- package/deps/jq/modules/oniguruma/src/iso8859_15.c +238 -0
- package/deps/jq/modules/oniguruma/src/iso8859_16.c +240 -0
- package/deps/jq/modules/oniguruma/src/iso8859_2.c +238 -0
- package/deps/jq/modules/oniguruma/src/iso8859_3.c +238 -0
- package/deps/jq/modules/oniguruma/src/iso8859_4.c +240 -0
- package/deps/jq/modules/oniguruma/src/iso8859_5.c +229 -0
- package/deps/jq/modules/oniguruma/src/iso8859_6.c +99 -0
- package/deps/jq/modules/oniguruma/src/iso8859_7.c +225 -0
- package/deps/jq/modules/oniguruma/src/iso8859_8.c +99 -0
- package/deps/jq/modules/oniguruma/src/iso8859_9.c +231 -0
- package/deps/jq/modules/oniguruma/src/koi8.c +253 -0
- package/deps/jq/modules/oniguruma/src/koi8_r.c +215 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +22 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +306 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +18 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +545 -0
- package/deps/jq/modules/oniguruma/src/mktable.c +1184 -0
- package/deps/jq/modules/oniguruma/src/onig_init.c +45 -0
- package/deps/jq/modules/oniguruma/src/oniggnu.h +85 -0
- package/deps/jq/modules/oniguruma/src/onigposix.h +169 -0
- package/deps/jq/modules/oniguruma/src/oniguruma.h +841 -0
- package/deps/jq/modules/oniguruma/src/regcomp.c +6300 -0
- package/deps/jq/modules/oniguruma/src/regenc.c +917 -0
- package/deps/jq/modules/oniguruma/src/regenc.h +243 -0
- package/deps/jq/modules/oniguruma/src/regerror.c +393 -0
- package/deps/jq/modules/oniguruma/src/regexec.c +3856 -0
- package/deps/jq/modules/oniguruma/src/regext.c +202 -0
- package/deps/jq/modules/oniguruma/src/reggnu.c +147 -0
- package/deps/jq/modules/oniguruma/src/regint.h +779 -0
- package/deps/jq/modules/oniguruma/src/regparse.c +5403 -0
- package/deps/jq/modules/oniguruma/src/regparse.h +351 -0
- package/deps/jq/modules/oniguruma/src/regposerr.c +105 -0
- package/deps/jq/modules/oniguruma/src/regposix.c +306 -0
- package/deps/jq/modules/oniguruma/src/regsyntax.c +315 -0
- package/deps/jq/modules/oniguruma/src/regtrav.c +76 -0
- package/deps/jq/modules/oniguruma/src/regversion.c +57 -0
- package/deps/jq/modules/oniguruma/src/sjis.c +341 -0
- package/deps/jq/modules/oniguruma/src/sjis_prop.c +158 -0
- package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +27 -0
- package/deps/jq/modules/oniguruma/src/st.c +589 -0
- package/deps/jq/modules/oniguruma/src/st.h +68 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +2250 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +203 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +113 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +1225 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +24742 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +4846 -0
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +2571 -0
- package/deps/jq/modules/oniguruma/src/unicode.c +664 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +2548 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +203 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +113 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1366 -0
- package/deps/jq/modules/oniguruma/src/unicode_property_data.c +25306 -0
- package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +4940 -0
- package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +2854 -0
- package/deps/jq/modules/oniguruma/src/utf16_be.c +235 -0
- package/deps/jq/modules/oniguruma/src/utf16_le.c +245 -0
- package/deps/jq/modules/oniguruma/src/utf32_be.c +194 -0
- package/deps/jq/modules/oniguruma/src/utf32_le.c +194 -0
- package/deps/jq/modules/oniguruma/src/utf8.c +335 -0
- package/deps/jq/modules/oniguruma/test/Makefile.am +28 -0
- package/deps/jq/modules/oniguruma/test/testc.c +874 -0
- package/deps/jq/modules/oniguruma/test/testu.c +916 -0
- package/deps/jq/modules/oniguruma/test-driver +153 -0
- package/deps/jq/modules/oniguruma/windows/testc.c +869 -0
- package/deps/jq/scripts/crosscompile +2 -1
- package/deps/jq/scripts/gen_utf8_tables.py +2 -3
- package/deps/jq/scripts/update-website +29 -0
- package/deps/jq/scripts/version +7 -2
- package/deps/jq/sig/jq-release.key +41 -0
- package/deps/jq/sig/v1.3/jq-linux-x86.asc +17 -0
- package/deps/jq/sig/v1.3/jq-linux-x86_64.asc +17 -0
- package/deps/jq/sig/v1.3/jq-osx-x86.asc +17 -0
- package/deps/jq/sig/v1.3/jq-osx-x86_64.asc +17 -0
- package/deps/jq/sig/v1.3/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.3/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.3/sha256sum.txt +6 -0
- package/deps/jq/sig/v1.4/jq-linux-x86.asc +17 -0
- package/deps/jq/sig/v1.4/jq-linux-x86_64.asc +17 -0
- package/deps/jq/sig/v1.4/jq-osx-x86.asc +17 -0
- package/deps/jq/sig/v1.4/jq-osx-x86_64.asc +17 -0
- package/deps/jq/sig/v1.4/jq-solaris11-32.asc +17 -0
- package/deps/jq/sig/v1.4/jq-solaris11-64.asc +17 -0
- package/deps/jq/sig/v1.4/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.4/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.4/sha256sum.txt +8 -0
- package/deps/jq/sig/v1.5/jq-linux32-no-oniguruma.asc +17 -0
- package/deps/jq/sig/v1.5/jq-linux32.asc +17 -0
- package/deps/jq/sig/v1.5/jq-linux64.asc +17 -0
- package/deps/jq/sig/v1.5/jq-osx-amd64.asc +17 -0
- package/deps/jq/sig/v1.5/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.5/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.5/sha256sum.txt +5 -0
- package/deps/jq/sig/v1.5rc1/jq-linux-x86_64-static.asc +17 -0
- package/deps/jq/sig/v1.5rc1/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.5rc1/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.5rc1/sha256sum.txt +3 -0
- package/deps/jq/sig/v1.5rc2/jq-linux-x86.asc +17 -0
- package/deps/jq/sig/v1.5rc2/jq-linux-x86_64.asc +17 -0
- package/deps/jq/sig/v1.5rc2/jq-osx-x86_64.asc +17 -0
- package/deps/jq/sig/v1.5rc2/jq-win32.exe.asc +17 -0
- package/deps/jq/sig/v1.5rc2/jq-win64.exe.asc +17 -0
- package/deps/jq/sig/v1.5rc2/sha256sum.txt +5 -0
- package/deps/jq/sig/v1.6/jq-linux32.asc +16 -0
- package/deps/jq/sig/v1.6/jq-linux64.asc +16 -0
- package/deps/jq/sig/v1.6/jq-osx-amd64.asc +16 -0
- package/deps/jq/sig/v1.6/jq-win32.exe.asc +16 -0
- package/deps/jq/sig/v1.6/jq-win64.exe.asc +16 -0
- package/deps/jq/sig/v1.6/sha256sum.txt +5 -0
- package/deps/jq/{builtin.c → src/builtin.c} +449 -344
- package/deps/jq/{builtin.h → src/builtin.h} +0 -0
- package/deps/jq/src/builtin.jq +311 -0
- package/deps/jq/{bytecode.c → src/bytecode.c} +0 -0
- package/deps/jq/{bytecode.h → src/bytecode.h} +0 -0
- package/deps/jq/{compile.c → src/compile.c} +213 -37
- package/deps/jq/{compile.h → src/compile.h} +7 -2
- package/deps/jq/{exec_stack.h → src/exec_stack.h} +0 -0
- package/deps/jq/{execute.c → src/execute.c} +127 -24
- package/deps/jq/{inject_errors.c → src/inject_errors.c} +0 -0
- package/deps/jq/{jq.h → src/jq.h} +13 -2
- package/deps/jq/{jq_parser.h → src/jq_parser.h} +0 -0
- package/deps/jq/{jq_test.c → src/jq_test.c} +1 -1
- package/deps/jq/{jv.c → src/jv.c} +24 -5
- package/deps/jq/{jv.h → src/jv.h} +46 -11
- package/deps/jq/{jv_alloc.c → src/jv_alloc.c} +0 -0
- package/deps/jq/{jv_alloc.h → src/jv_alloc.h} +0 -0
- package/deps/jq/{jv_aux.c → src/jv_aux.c} +38 -14
- package/deps/jq/{jv_dtoa.c → src/jv_dtoa.c} +4 -5
- package/deps/jq/{jv_dtoa.h → src/jv_dtoa.h} +0 -0
- package/deps/jq/src/jv_file.c +81 -0
- package/deps/jq/{jv_parse.c → src/jv_parse.c} +8 -2
- package/deps/jq/{jv_print.c → src/jv_print.c} +80 -27
- package/deps/jq/{jv_unicode.c → src/jv_unicode.c} +28 -4
- package/deps/jq/{jv_unicode.h → src/jv_unicode.h} +1 -0
- package/deps/jq/{jv_utf8_tables.h → src/jv_utf8_tables.h} +0 -0
- package/deps/jq/{lexer.c → src/lexer.c} +317 -292
- package/deps/jq/{lexer.h → src/lexer.h} +16 -12
- package/deps/jq/{lexer.l → src/lexer.l} +5 -4
- package/deps/jq/src/libm.h +291 -0
- package/deps/jq/{linker.c → src/linker.c} +5 -3
- package/deps/jq/{linker.h → src/linker.h} +0 -0
- package/deps/jq/{locfile.c → src/locfile.c} +1 -1
- package/deps/jq/{locfile.h → src/locfile.h} +0 -0
- package/deps/jq/{main.c → src/main.c} +202 -100
- package/deps/jq/{opcode_list.h → src/opcode_list.h} +4 -0
- package/deps/jq/{parser.c → src/parser.c} +1149 -1069
- package/deps/jq/{parser.h → src/parser.h} +28 -24
- package/deps/jq/{parser.y → src/parser.y} +108 -52
- package/deps/jq/{util.c → src/util.c} +12 -9
- package/deps/jq/{util.h → src/util.h} +0 -0
- package/deps/jq/tests/base64.test +35 -0
- package/deps/jq/tests/base64test +5 -0
- package/deps/jq/tests/jq-f-test.sh +4 -0
- package/deps/jq/tests/jq.test +305 -21
- package/deps/jq/tests/jqtest +1 -1
- package/deps/jq/tests/mantest +1 -1
- package/deps/jq/tests/onig.test +13 -0
- package/deps/jq/tests/onigtest +1 -1
- package/deps/jq/tests/optional.test +20 -0
- package/deps/jq/tests/optionaltest +5 -0
- package/deps/jq/tests/setup +7 -1
- package/deps/jq/tests/shtest +133 -29
- package/deps/jq/tests/utf8-truncate.jq +3 -0
- package/deps/jq/tests/utf8test +10 -0
- package/lib/index.js +7 -1
- package/package.json +3 -3
- package/test/santiy.test.js +24 -0
- package/deps/jq/docs/default_manpage.md +0 -22
- package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.css +0 -1058
- package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.min.css +0 -9
- package/deps/jq/docs/public/bootstrap/css/bootstrap.css +0 -5224
- package/deps/jq/docs/public/bootstrap/css/bootstrap.min.css +0 -9
- package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings-white.png +0 -0
- package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings.png +0 -0
- package/deps/jq/docs/public/bootstrap/js/bootstrap.js +0 -2027
- package/deps/jq/docs/public/bootstrap/js/bootstrap.min.js +0 -6
- package/deps/jq/docs/templates/shared/_header.liquid +0 -26
- package/deps/jq/jq.1.default +0 -39
- package/deps/jq/jv_file.c +0 -49
- package/deps/jq/libm.h +0 -160
- package/deps/jq/setup.sh +0 -33
- package/reports/jest-port-api.xml +0 -35
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
big5.c - Oniguruma (regular expression library)
|
|
3
|
+
**********************************************************************/
|
|
4
|
+
/*-
|
|
5
|
+
* Copyright (c) 2002-2016 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions
|
|
10
|
+
* are met:
|
|
11
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
|
13
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
14
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
15
|
+
* documentation and/or other materials provided with the distribution.
|
|
16
|
+
*
|
|
17
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
18
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
19
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
20
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
21
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
22
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
23
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
24
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
25
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
26
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
27
|
+
* SUCH DAMAGE.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#include "regenc.h"
|
|
31
|
+
|
|
32
|
+
static const int EncLen_BIG5[] = {
|
|
33
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
34
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
35
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
36
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
37
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
38
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
39
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
40
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
41
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
42
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
43
|
+
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
44
|
+
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
45
|
+
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
46
|
+
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
47
|
+
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
48
|
+
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
static int
|
|
52
|
+
big5_mbc_enc_len(const UChar* p)
|
|
53
|
+
{
|
|
54
|
+
return EncLen_BIG5[*p];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
static int
|
|
58
|
+
is_valid_mbc_string(const UChar* p, const UChar* end)
|
|
59
|
+
{
|
|
60
|
+
while (p < end) {
|
|
61
|
+
if (*p < 0x80) {
|
|
62
|
+
p++;
|
|
63
|
+
}
|
|
64
|
+
else if (*p < 0xa1) {
|
|
65
|
+
return FALSE;
|
|
66
|
+
}
|
|
67
|
+
else if (*p < 0xff) {
|
|
68
|
+
p++;
|
|
69
|
+
if (p >= end) return FALSE;
|
|
70
|
+
if (*p < 0x40) return FALSE;
|
|
71
|
+
if (*p > 0x7e && *p < 0xa1) return FALSE;
|
|
72
|
+
if (*p == 0xff) return FALSE;
|
|
73
|
+
p++;
|
|
74
|
+
}
|
|
75
|
+
else
|
|
76
|
+
return FALSE;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return TRUE;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static OnigCodePoint
|
|
83
|
+
big5_mbc_to_code(const UChar* p, const UChar* end)
|
|
84
|
+
{
|
|
85
|
+
return onigenc_mbn_mbc_to_code(ONIG_ENCODING_BIG5, p, end);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
static int
|
|
89
|
+
big5_code_to_mbc(OnigCodePoint code, UChar *buf)
|
|
90
|
+
{
|
|
91
|
+
return onigenc_mb2_code_to_mbc(ONIG_ENCODING_BIG5, code, buf);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static int
|
|
95
|
+
big5_mbc_case_fold(OnigCaseFoldType flag, const UChar** pp, const UChar* end,
|
|
96
|
+
UChar* lower)
|
|
97
|
+
{
|
|
98
|
+
return onigenc_mbn_mbc_case_fold(ONIG_ENCODING_BIG5, flag,
|
|
99
|
+
pp, end, lower);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#if 0
|
|
103
|
+
static int
|
|
104
|
+
big5_is_mbc_ambiguous(OnigCaseFoldType flag,
|
|
105
|
+
const UChar** pp, const UChar* end)
|
|
106
|
+
{
|
|
107
|
+
return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_BIG5, flag, pp, end);
|
|
108
|
+
}
|
|
109
|
+
#endif
|
|
110
|
+
|
|
111
|
+
static int
|
|
112
|
+
big5_is_code_ctype(OnigCodePoint code, unsigned int ctype)
|
|
113
|
+
{
|
|
114
|
+
return onigenc_mb2_is_code_ctype(ONIG_ENCODING_BIG5, code, ctype);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
static const char BIG5_CAN_BE_TRAIL_TABLE[256] = {
|
|
118
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
119
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
120
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
121
|
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
122
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
123
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
124
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
125
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
|
|
126
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
127
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
128
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
129
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
130
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
131
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
132
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
133
|
+
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
#define BIG5_ISMB_FIRST(byte) (EncLen_BIG5[byte] > 1)
|
|
137
|
+
#define BIG5_ISMB_TRAIL(byte) BIG5_CAN_BE_TRAIL_TABLE[(byte)]
|
|
138
|
+
|
|
139
|
+
static UChar*
|
|
140
|
+
big5_left_adjust_char_head(const UChar* start, const UChar* s)
|
|
141
|
+
{
|
|
142
|
+
const UChar *p;
|
|
143
|
+
int len;
|
|
144
|
+
|
|
145
|
+
if (s <= start) return (UChar* )s;
|
|
146
|
+
p = s;
|
|
147
|
+
|
|
148
|
+
if (BIG5_ISMB_TRAIL(*p)) {
|
|
149
|
+
while (p > start) {
|
|
150
|
+
if (! BIG5_ISMB_FIRST(*--p)) {
|
|
151
|
+
p++;
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
len = enclen(ONIG_ENCODING_BIG5, p);
|
|
157
|
+
if (p + len > s) return (UChar* )p;
|
|
158
|
+
p += len;
|
|
159
|
+
return (UChar* )(p + ((s - p) & ~1));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
static int
|
|
163
|
+
big5_is_allowed_reverse_match(const UChar* s, const UChar* end ARG_UNUSED)
|
|
164
|
+
{
|
|
165
|
+
const UChar c = *s;
|
|
166
|
+
|
|
167
|
+
return (BIG5_ISMB_TRAIL(c) ? FALSE : TRUE);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
OnigEncodingType OnigEncodingBIG5 = {
|
|
171
|
+
big5_mbc_enc_len,
|
|
172
|
+
"Big5", /* name */
|
|
173
|
+
2, /* max enc length */
|
|
174
|
+
1, /* min enc length */
|
|
175
|
+
onigenc_is_mbc_newline_0x0a,
|
|
176
|
+
big5_mbc_to_code,
|
|
177
|
+
onigenc_mb2_code_to_mbclen,
|
|
178
|
+
big5_code_to_mbc,
|
|
179
|
+
big5_mbc_case_fold,
|
|
180
|
+
onigenc_ascii_apply_all_case_fold,
|
|
181
|
+
onigenc_ascii_get_case_fold_codes_by_str,
|
|
182
|
+
onigenc_minimum_property_name_to_ctype,
|
|
183
|
+
big5_is_code_ctype,
|
|
184
|
+
onigenc_not_support_get_ctype_code_range,
|
|
185
|
+
big5_left_adjust_char_head,
|
|
186
|
+
big5_is_allowed_reverse_match,
|
|
187
|
+
NULL, /* init */
|
|
188
|
+
NULL, /* is_initialized */
|
|
189
|
+
is_valid_mbc_string
|
|
190
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
|
2
|
+
systems. This function is required for `alloca.c' support on those systems.
|
|
3
|
+
*/
|
|
4
|
+
#cmakedefine CRAY_STACKSEG_END
|
|
5
|
+
|
|
6
|
+
/* Define to 1 if using `alloca.c'. */
|
|
7
|
+
#cmakedefine C_ALLOCA
|
|
8
|
+
|
|
9
|
+
/* Define to 1 if you have `alloca', as a function or macro. */
|
|
10
|
+
#cmakedefine HAVE_ALLOCA ${HAVE_ALLOCA}
|
|
11
|
+
|
|
12
|
+
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
|
13
|
+
*/
|
|
14
|
+
#cmakedefine HAVE_ALLOCA_H ${HAVE_ALLOCA_H}
|
|
15
|
+
|
|
16
|
+
/* Define if compilerr supports prototypes */
|
|
17
|
+
#cmakedefine HAVE_PROTOTYPES ${HAVE_PROTOTYPES}
|
|
18
|
+
|
|
19
|
+
/* Define if compiler supports stdarg prototypes */
|
|
20
|
+
#cmakedefine HAVE_STDARG_PROTOTYPES ${HAVE_STDARG_PROTOTYPES}
|
|
21
|
+
|
|
22
|
+
/* Define to 1 if you have the <stdint.h> header file. */
|
|
23
|
+
#cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H}
|
|
24
|
+
|
|
25
|
+
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
26
|
+
#cmakedefine HAVE_STDLIB_H ${HAVE_STDLIB_H}
|
|
27
|
+
|
|
28
|
+
/* Define to 1 if you have the <strings.h> header file. */
|
|
29
|
+
#cmakedefine HAVE_STRINGS_H ${HAVE_STRINGS_H}
|
|
30
|
+
|
|
31
|
+
/* Define to 1 if you have the <string.h> header file. */
|
|
32
|
+
#cmakedefine HAVE_STRING_H ${HAVE_STRING_H}
|
|
33
|
+
|
|
34
|
+
/* Define to 1 if you have the <sys/times.h> header file. */
|
|
35
|
+
#cmakedefine HAVE_SYS_TIMES_H ${HAVE_SYS_TIMES_H}
|
|
36
|
+
|
|
37
|
+
/* Define to 1 if you have the <sys/time.h> header file. */
|
|
38
|
+
#cmakedefine HAVE_SYS_TIME_H ${HAVE_SYS_TIME_H}
|
|
39
|
+
|
|
40
|
+
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
41
|
+
#cmakedefine HAVE_SYS_TYPES_H ${HAVE_SYS_TYPES_H}
|
|
42
|
+
|
|
43
|
+
/* Define to 1 if you have the <unistd.h> header file. */
|
|
44
|
+
#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
|
|
45
|
+
|
|
46
|
+
/* Name of package */
|
|
47
|
+
#cmakedefine PACKAGE ${PACKAGE}
|
|
48
|
+
|
|
49
|
+
/* Define to the version of this package. */
|
|
50
|
+
#cmakedefine PACKAGE_VERSION ${PACKAGE_VERSION}
|
|
51
|
+
|
|
52
|
+
/* The size of `int', as computed by sizeof. */
|
|
53
|
+
#cmakedefine SIZEOF_INT ${SIZEOF_INT}
|
|
54
|
+
|
|
55
|
+
/* The size of `long', as computed by sizeof. */
|
|
56
|
+
#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
|
|
57
|
+
|
|
58
|
+
/* The size of `short', as computed by sizeof. */
|
|
59
|
+
#cmakedefine SIZEOF_SHORT ${SIZEOF_SHORT}
|
|
60
|
+
|
|
61
|
+
/* Define to 1 if you have the ANSI C header files. */
|
|
62
|
+
#cmakedefine STDC_HEADERS ${STDC_HEADERS}
|
|
63
|
+
|
|
64
|
+
/* Define if combination explosion check */
|
|
65
|
+
#cmakedefine USE_COMBINATION_EXPLOSION_CHECK ${USE_COMBINATION_EXPLOSION_CHECK}
|
|
66
|
+
|
|
67
|
+
/* Define if enable CR+NL as line terminator */
|
|
68
|
+
#cmakedefine USE_CRNL_AS_LINE_TERMINATOR ${USE_CRNL_AS_LINE_TERMINATOR}
|
|
69
|
+
|
|
70
|
+
/* Version number of package */
|
|
71
|
+
#cmakedefine VERSION ${VERSION}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#define STDC_HEADERS 1
|
|
2
|
+
#define HAVE_SYS_TYPES_H 1
|
|
3
|
+
#define HAVE_SYS_STAT_H 1
|
|
4
|
+
#define HAVE_STDLIB_H 1
|
|
5
|
+
#define HAVE_STRING_H 1
|
|
6
|
+
#define HAVE_MEMORY_H 1
|
|
7
|
+
#define HAVE_FLOAT_H 1
|
|
8
|
+
#define HAVE_OFF_T 1
|
|
9
|
+
#define SIZEOF_INT 4
|
|
10
|
+
#define SIZEOF_SHORT 2
|
|
11
|
+
#define SIZEOF_LONG 4
|
|
12
|
+
#define SIZEOF_LONG_LONG 0
|
|
13
|
+
#define SIZEOF___INT64 8
|
|
14
|
+
#define SIZEOF_OFF_T 4
|
|
15
|
+
#define SIZEOF_VOIDP 4
|
|
16
|
+
#define SIZEOF_FLOAT 4
|
|
17
|
+
#define SIZEOF_DOUBLE 8
|
|
18
|
+
#define HAVE_PROTOTYPES 1
|
|
19
|
+
#define TOKEN_PASTE(x,y) x##y
|
|
20
|
+
#define HAVE_STDARG_PROTOTYPES 1
|
|
21
|
+
#ifndef NORETURN
|
|
22
|
+
#if _MSC_VER > 1100
|
|
23
|
+
#define NORETURN(x) __declspec(noreturn) x
|
|
24
|
+
#else
|
|
25
|
+
#define NORETURN(x) x
|
|
26
|
+
#endif
|
|
27
|
+
#endif
|
|
28
|
+
#define HAVE_DECL_SYS_NERR 1
|
|
29
|
+
#define STDC_HEADERS 1
|
|
30
|
+
#define HAVE_STDLIB_H 1
|
|
31
|
+
#define HAVE_STRING_H 1
|
|
32
|
+
#define HAVE_LIMITS_H 1
|
|
33
|
+
#define HAVE_FCNTL_H 1
|
|
34
|
+
#define HAVE_SYS_UTIME_H 1
|
|
35
|
+
#define HAVE_MEMORY_H 1
|
|
36
|
+
#define uid_t int
|
|
37
|
+
#define gid_t int
|
|
38
|
+
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
|
39
|
+
#define HAVE_ST_RDEV 1
|
|
40
|
+
#define GETGROUPS_T int
|
|
41
|
+
#define RETSIGTYPE void
|
|
42
|
+
#define HAVE_ALLOCA 1
|
|
43
|
+
#define HAVE_DUP2 1
|
|
44
|
+
#define HAVE_MEMCMP 1
|
|
45
|
+
#define HAVE_MEMMOVE 1
|
|
46
|
+
#define HAVE_MKDIR 1
|
|
47
|
+
#define HAVE_STRCASECMP 1
|
|
48
|
+
#define HAVE_STRNCASECMP 1
|
|
49
|
+
#define HAVE_STRERROR 1
|
|
50
|
+
#define HAVE_STRFTIME 1
|
|
51
|
+
#define HAVE_STRCHR 1
|
|
52
|
+
#define HAVE_STRSTR 1
|
|
53
|
+
#define HAVE_STRTOD 1
|
|
54
|
+
#define HAVE_STRTOL 1
|
|
55
|
+
#define HAVE_STRTOUL 1
|
|
56
|
+
#define HAVE_FLOCK 1
|
|
57
|
+
#define HAVE_VSNPRINTF 1
|
|
58
|
+
#define HAVE_FINITE 1
|
|
59
|
+
#define HAVE_FMOD 1
|
|
60
|
+
#define HAVE_FREXP 1
|
|
61
|
+
#define HAVE_HYPOT 1
|
|
62
|
+
#define HAVE_MODF 1
|
|
63
|
+
#define HAVE_WAITPID 1
|
|
64
|
+
#define HAVE_CHSIZE 1
|
|
65
|
+
#define HAVE_TIMES 1
|
|
66
|
+
#define HAVE__SETJMP 1
|
|
67
|
+
#define HAVE_TELLDIR 1
|
|
68
|
+
#define HAVE_SEEKDIR 1
|
|
69
|
+
#define HAVE_MKTIME 1
|
|
70
|
+
#define HAVE_COSH 1
|
|
71
|
+
#define HAVE_SINH 1
|
|
72
|
+
#define HAVE_TANH 1
|
|
73
|
+
#define HAVE_EXECVE 1
|
|
74
|
+
#define HAVE_TZNAME 1
|
|
75
|
+
#define HAVE_DAYLIGHT 1
|
|
76
|
+
#define SETPGRP_VOID 1
|
|
77
|
+
#define inline __inline
|
|
78
|
+
#define NEED_IO_SEEK_BETWEEN_RW 1
|
|
79
|
+
#define RSHIFT(x,y) ((x)>>(int)y)
|
|
80
|
+
#define FILE_COUNT _cnt
|
|
81
|
+
#define FILE_READPTR _ptr
|
|
82
|
+
#define DEFAULT_KCODE KCODE_NONE
|
|
83
|
+
#define DLEXT ".so"
|
|
84
|
+
#define DLEXT2 ".dll"
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#define STDC_HEADERS 1
|
|
2
|
+
#define HAVE_SYS_TYPES_H 1
|
|
3
|
+
#define HAVE_SYS_STAT_H 1
|
|
4
|
+
#define HAVE_STDLIB_H 1
|
|
5
|
+
#define HAVE_STRING_H 1
|
|
6
|
+
#define HAVE_MEMORY_H 1
|
|
7
|
+
#define HAVE_FLOAT_H 1
|
|
8
|
+
#define HAVE_OFF_T 1
|
|
9
|
+
#define SIZEOF_INT 4
|
|
10
|
+
#define SIZEOF_SHORT 2
|
|
11
|
+
#define SIZEOF_LONG 4
|
|
12
|
+
#define SIZEOF_LONG_LONG 0
|
|
13
|
+
#define SIZEOF___INT64 8
|
|
14
|
+
#define SIZEOF_OFF_T 4
|
|
15
|
+
#define SIZEOF_VOIDP 8
|
|
16
|
+
#define SIZEOF_FLOAT 4
|
|
17
|
+
#define SIZEOF_DOUBLE 8
|
|
18
|
+
#define HAVE_PROTOTYPES 1
|
|
19
|
+
#define TOKEN_PASTE(x,y) x##y
|
|
20
|
+
#define HAVE_STDARG_PROTOTYPES 1
|
|
21
|
+
#ifndef NORETURN
|
|
22
|
+
#if _MSC_VER > 1100
|
|
23
|
+
#define NORETURN(x) __declspec(noreturn) x
|
|
24
|
+
#else
|
|
25
|
+
#define NORETURN(x) x
|
|
26
|
+
#endif
|
|
27
|
+
#endif
|
|
28
|
+
#define HAVE_DECL_SYS_NERR 1
|
|
29
|
+
#define STDC_HEADERS 1
|
|
30
|
+
#define HAVE_STDLIB_H 1
|
|
31
|
+
#define HAVE_STRING_H 1
|
|
32
|
+
#define HAVE_LIMITS_H 1
|
|
33
|
+
#define HAVE_FCNTL_H 1
|
|
34
|
+
#define HAVE_SYS_UTIME_H 1
|
|
35
|
+
#define HAVE_MEMORY_H 1
|
|
36
|
+
#define uid_t int
|
|
37
|
+
#define gid_t int
|
|
38
|
+
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
|
39
|
+
#define HAVE_ST_RDEV 1
|
|
40
|
+
#define GETGROUPS_T int
|
|
41
|
+
#define RETSIGTYPE void
|
|
42
|
+
#define HAVE_ALLOCA 1
|
|
43
|
+
#define HAVE_DUP2 1
|
|
44
|
+
#define HAVE_MEMCMP 1
|
|
45
|
+
#define HAVE_MEMMOVE 1
|
|
46
|
+
#define HAVE_MKDIR 1
|
|
47
|
+
#define HAVE_STRCASECMP 1
|
|
48
|
+
#define HAVE_STRNCASECMP 1
|
|
49
|
+
#define HAVE_STRERROR 1
|
|
50
|
+
#define HAVE_STRFTIME 1
|
|
51
|
+
#define HAVE_STRCHR 1
|
|
52
|
+
#define HAVE_STRSTR 1
|
|
53
|
+
#define HAVE_STRTOD 1
|
|
54
|
+
#define HAVE_STRTOL 1
|
|
55
|
+
#define HAVE_STRTOUL 1
|
|
56
|
+
#define HAVE_FLOCK 1
|
|
57
|
+
#define HAVE_VSNPRINTF 1
|
|
58
|
+
#define HAVE_FINITE 1
|
|
59
|
+
#define HAVE_FMOD 1
|
|
60
|
+
#define HAVE_FREXP 1
|
|
61
|
+
#define HAVE_HYPOT 1
|
|
62
|
+
#define HAVE_MODF 1
|
|
63
|
+
#define HAVE_WAITPID 1
|
|
64
|
+
#define HAVE_CHSIZE 1
|
|
65
|
+
#define HAVE_TIMES 1
|
|
66
|
+
#define HAVE__SETJMP 1
|
|
67
|
+
#define HAVE_TELLDIR 1
|
|
68
|
+
#define HAVE_SEEKDIR 1
|
|
69
|
+
#define HAVE_MKTIME 1
|
|
70
|
+
#define HAVE_COSH 1
|
|
71
|
+
#define HAVE_SINH 1
|
|
72
|
+
#define HAVE_TANH 1
|
|
73
|
+
#define HAVE_EXECVE 1
|
|
74
|
+
#define HAVE_TZNAME 1
|
|
75
|
+
#define HAVE_DAYLIGHT 1
|
|
76
|
+
#define SETPGRP_VOID 1
|
|
77
|
+
#define inline __inline
|
|
78
|
+
#define NEED_IO_SEEK_BETWEEN_RW 1
|
|
79
|
+
#define RSHIFT(x,y) ((x)>>(int)y)
|
|
80
|
+
#define FILE_COUNT _cnt
|
|
81
|
+
#define FILE_READPTR _ptr
|
|
82
|
+
#define DEFAULT_KCODE KCODE_NONE
|
|
83
|
+
#define DLEXT ".so"
|
|
84
|
+
#define DLEXT2 ".dll"
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
cp1251.c - Oniguruma (regular expression library)
|
|
3
|
+
**********************************************************************/
|
|
4
|
+
/*-
|
|
5
|
+
* Copyright (c) 2006-2016 Byte <byte AT mail DOT kna DOT ru>
|
|
6
|
+
* K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
|
|
7
|
+
* All rights reserved.
|
|
8
|
+
*
|
|
9
|
+
* Redistribution and use in source and binary forms, with or without
|
|
10
|
+
* modification, are permitted provided that the following conditions
|
|
11
|
+
* are met:
|
|
12
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
13
|
+
* notice, this list of conditions and the following disclaimer.
|
|
14
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
15
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
16
|
+
* documentation and/or other materials provided with the distribution.
|
|
17
|
+
*
|
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
20
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
21
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
22
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
24
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
25
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
26
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
27
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
28
|
+
* SUCH DAMAGE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
#include "regenc.h"
|
|
32
|
+
|
|
33
|
+
#define ENC_CP1251_TO_LOWER_CASE(c) EncCP1251_ToLowerCaseTable[c]
|
|
34
|
+
#define ENC_IS_CP1251_CTYPE(code,ctype) \
|
|
35
|
+
((EncCP1251_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
|
|
36
|
+
|
|
37
|
+
static const UChar EncCP1251_ToLowerCaseTable[256] = {
|
|
38
|
+
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
|
|
39
|
+
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
|
|
40
|
+
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
|
|
41
|
+
'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
|
|
42
|
+
'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
|
|
43
|
+
'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
|
|
44
|
+
'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
|
|
45
|
+
'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
|
|
46
|
+
'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
|
47
|
+
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
|
48
|
+
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
|
49
|
+
'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
|
|
50
|
+
'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
|
51
|
+
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
|
52
|
+
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
|
53
|
+
'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
|
|
54
|
+
'\220', '\203', '\202', '\203', '\204', '\205', '\206', '\207',
|
|
55
|
+
'\210', '\211', '\232', '\213', '\234', '\235', '\236', '\237',
|
|
56
|
+
'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
|
|
57
|
+
'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
|
|
58
|
+
'\240', '\242', '\242', '\274', '\244', '\264', '\246', '\247',
|
|
59
|
+
'\270', '\251', '\272', '\253', '\254', '\255', '\256', '\277',
|
|
60
|
+
'\260', '\261', '\263', '\263', '\264', '\265', '\266', '\267',
|
|
61
|
+
'\270', '\271', '\272', '\273', '\274', '\276', '\276', '\277',
|
|
62
|
+
'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
|
63
|
+
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
|
64
|
+
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
|
65
|
+
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
|
|
66
|
+
'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
|
67
|
+
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
|
68
|
+
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
|
69
|
+
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377'
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
static const unsigned short EncCP1251_CtypeTable[256] = {
|
|
73
|
+
0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
|
|
74
|
+
0x4008, 0x428c, 0x4209, 0x4208, 0x4208, 0x4208, 0x4008, 0x4008,
|
|
75
|
+
0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
|
|
76
|
+
0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008, 0x4008,
|
|
77
|
+
0x4284, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
|
|
78
|
+
0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
|
|
79
|
+
0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0, 0x78b0,
|
|
80
|
+
0x78b0, 0x78b0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x41a0,
|
|
81
|
+
0x41a0, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x7ca2, 0x74a2,
|
|
82
|
+
0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
|
|
83
|
+
0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2, 0x74a2,
|
|
84
|
+
0x74a2, 0x74a2, 0x74a2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x51a0,
|
|
85
|
+
0x41a0, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x78e2, 0x70e2,
|
|
86
|
+
0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
|
|
87
|
+
0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2, 0x70e2,
|
|
88
|
+
0x70e2, 0x70e2, 0x70e2, 0x41a0, 0x41a0, 0x41a0, 0x41a0, 0x4008,
|
|
89
|
+
0x34a2, 0x34a2, 0x01a0, 0x30e2, 0x01a0, 0x01a0, 0x01a0, 0x01a0,
|
|
90
|
+
0x0000, 0x01a0, 0x34a2, 0x01a0, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
|
|
91
|
+
0x30e2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0,
|
|
92
|
+
0x0008, 0x0000, 0x30e2, 0x01a0, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
|
|
93
|
+
0x0280, 0x34a2, 0x30e2, 0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x01a0,
|
|
94
|
+
0x34a2, 0x01a0, 0x34a2, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x34a2,
|
|
95
|
+
0x01a0, 0x01a0, 0x34a2, 0x30e2, 0x30e2, 0x31e2, 0x01a0, 0x01a0,
|
|
96
|
+
0x30e2, 0x0000, 0x30e2, 0x01a0, 0x30e2, 0x34a2, 0x30e2, 0x30e2,
|
|
97
|
+
0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
|
|
98
|
+
0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
|
|
99
|
+
0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
|
|
100
|
+
0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2, 0x34a2,
|
|
101
|
+
0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
|
|
102
|
+
0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
|
|
103
|
+
0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2,
|
|
104
|
+
0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
static int
|
|
108
|
+
cp1251_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
|
|
109
|
+
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
|
|
110
|
+
{
|
|
111
|
+
const UChar* p = *pp;
|
|
112
|
+
|
|
113
|
+
*lower = ENC_CP1251_TO_LOWER_CASE(*p);
|
|
114
|
+
(*pp)++;
|
|
115
|
+
return 1;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
static int
|
|
119
|
+
cp1251_is_code_ctype(OnigCodePoint code, unsigned int ctype)
|
|
120
|
+
{
|
|
121
|
+
if (code < 256)
|
|
122
|
+
return ENC_IS_CP1251_CTYPE(code, ctype);
|
|
123
|
+
else
|
|
124
|
+
return FALSE;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static const OnigPairCaseFoldCodes CaseFoldMap[] = {
|
|
128
|
+
{ 0xb8, 0xa8 },
|
|
129
|
+
|
|
130
|
+
{ 0xe0, 0xc0 },
|
|
131
|
+
{ 0xe1, 0xc1 },
|
|
132
|
+
{ 0xe2, 0xc2 },
|
|
133
|
+
{ 0xe3, 0xc3 },
|
|
134
|
+
{ 0xe4, 0xc4 },
|
|
135
|
+
{ 0xe5, 0xc5 },
|
|
136
|
+
{ 0xe6, 0xc6 },
|
|
137
|
+
{ 0xe7, 0xc7 },
|
|
138
|
+
{ 0xe8, 0xc8 },
|
|
139
|
+
{ 0xe9, 0xc9 },
|
|
140
|
+
{ 0xea, 0xca },
|
|
141
|
+
{ 0xeb, 0xcb },
|
|
142
|
+
{ 0xec, 0xcc },
|
|
143
|
+
{ 0xed, 0xcd },
|
|
144
|
+
{ 0xee, 0xce },
|
|
145
|
+
{ 0xef, 0xcf },
|
|
146
|
+
|
|
147
|
+
{ 0xf0, 0xd0 },
|
|
148
|
+
{ 0xf1, 0xd1 },
|
|
149
|
+
{ 0xf2, 0xd2 },
|
|
150
|
+
{ 0xf3, 0xd3 },
|
|
151
|
+
{ 0xf4, 0xd4 },
|
|
152
|
+
{ 0xf5, 0xd5 },
|
|
153
|
+
{ 0xf6, 0xd6 },
|
|
154
|
+
{ 0xf7, 0xd7 },
|
|
155
|
+
{ 0xf8, 0xd8 },
|
|
156
|
+
{ 0xf9, 0xd9 },
|
|
157
|
+
{ 0xfa, 0xda },
|
|
158
|
+
{ 0xfb, 0xdb },
|
|
159
|
+
{ 0xfc, 0xdc },
|
|
160
|
+
{ 0xfd, 0xdd },
|
|
161
|
+
{ 0xfe, 0xde },
|
|
162
|
+
{ 0xff, 0xdf }
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
static int
|
|
166
|
+
cp1251_apply_all_case_fold(OnigCaseFoldType flag,
|
|
167
|
+
OnigApplyAllCaseFoldFunc f, void* arg)
|
|
168
|
+
{
|
|
169
|
+
return onigenc_apply_all_case_fold_with_map(
|
|
170
|
+
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
|
171
|
+
flag, f, arg);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
static int
|
|
175
|
+
cp1251_get_case_fold_codes_by_str(OnigCaseFoldType flag,
|
|
176
|
+
const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])
|
|
177
|
+
{
|
|
178
|
+
return onigenc_get_case_fold_codes_by_str_with_map(
|
|
179
|
+
sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0,
|
|
180
|
+
flag, p, end, items);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
OnigEncodingType OnigEncodingCP1251 = {
|
|
184
|
+
onigenc_single_byte_mbc_enc_len,
|
|
185
|
+
"CP1251", /* name */
|
|
186
|
+
1, /* max enc length */
|
|
187
|
+
1, /* min enc length */
|
|
188
|
+
onigenc_is_mbc_newline_0x0a,
|
|
189
|
+
onigenc_single_byte_mbc_to_code,
|
|
190
|
+
onigenc_single_byte_code_to_mbclen,
|
|
191
|
+
onigenc_single_byte_code_to_mbc,
|
|
192
|
+
cp1251_mbc_case_fold,
|
|
193
|
+
cp1251_apply_all_case_fold,
|
|
194
|
+
cp1251_get_case_fold_codes_by_str,
|
|
195
|
+
onigenc_minimum_property_name_to_ctype,
|
|
196
|
+
cp1251_is_code_ctype,
|
|
197
|
+
onigenc_not_support_get_ctype_code_range,
|
|
198
|
+
onigenc_single_byte_left_adjust_char_head,
|
|
199
|
+
onigenc_always_true_is_allowed_reverse_match,
|
|
200
|
+
NULL, /* init */
|
|
201
|
+
NULL, /* is_initialized */
|
|
202
|
+
onigenc_always_true_is_valid_mbc_string
|
|
203
|
+
};
|