@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.
Files changed (286) hide show
  1. package/binding.gyp +3 -3
  2. package/configure +8 -6
  3. package/deps/jq/.travis.yml +184 -35
  4. package/deps/jq/AUTHORS +31 -30
  5. package/deps/jq/COPYING +2 -2
  6. package/deps/jq/KEYS +8 -0
  7. package/deps/jq/Makefile.am +85 -70
  8. package/deps/jq/NEWS +5 -4
  9. package/deps/jq/README.md +18 -9
  10. package/deps/jq/appveyor.yml +53 -0
  11. package/deps/jq/compile-ios.sh +5 -5
  12. package/deps/jq/config/m4/check-math-func.m4 +7 -2
  13. package/deps/jq/configure.ac +130 -68
  14. package/deps/jq/docs/Rakefile +14 -135
  15. package/deps/jq/docs/Rakefile.manual +49 -0
  16. package/deps/jq/docs/Rakefile.website +76 -0
  17. package/deps/jq/docs/content/2.download/default.yml +115 -39
  18. package/deps/jq/docs/content/3.manual/manual.yml +641 -231
  19. package/deps/jq/docs/content/3.manual/v1.3/manual.yml +130 -130
  20. package/deps/jq/docs/content/3.manual/v1.4/manual.yml +160 -160
  21. package/deps/jq/docs/content/3.manual/v1.5/manual.yml +2878 -0
  22. package/deps/jq/docs/content/3.manual/v1.6/manual.yml +3287 -0
  23. package/deps/jq/docs/content/index/index.yml +28 -6
  24. package/deps/jq/docs/public/.htaccess +2 -2
  25. package/deps/jq/docs/public/css/base.scss +141 -59
  26. package/deps/jq/docs/public/js/manual-search.js +52 -0
  27. package/deps/jq/docs/site.yml +1 -10
  28. package/deps/jq/docs/templates/default.liquid +10 -10
  29. package/deps/jq/docs/templates/index.liquid +45 -32
  30. package/deps/jq/docs/templates/manual.liquid +67 -90
  31. package/deps/jq/docs/templates/shared/_footer.liquid +10 -5
  32. package/deps/jq/docs/templates/shared/_head.liquid +17 -12
  33. package/deps/jq/docs/templates/shared/_navbar.liquid +27 -0
  34. package/deps/jq/jq.1.prebuilt +523 -139
  35. package/deps/jq/modules/oniguruma/AUTHORS +1 -0
  36. package/deps/jq/modules/oniguruma/CMakeLists.txt +86 -0
  37. package/deps/jq/modules/oniguruma/COPYING +28 -0
  38. package/deps/jq/modules/oniguruma/ChangeLog +0 -0
  39. package/deps/jq/modules/oniguruma/HISTORY +2138 -0
  40. package/deps/jq/modules/oniguruma/Makefile.am +33 -0
  41. package/deps/jq/modules/oniguruma/NEWS +0 -0
  42. package/deps/jq/modules/oniguruma/README +189 -0
  43. package/deps/jq/modules/oniguruma/README.ja +195 -0
  44. package/deps/jq/modules/oniguruma/README.md +203 -0
  45. package/deps/jq/modules/oniguruma/cmake/dist.cmake +321 -0
  46. package/deps/jq/modules/oniguruma/compile +348 -0
  47. package/deps/jq/modules/oniguruma/config.guess +1754 -0
  48. package/deps/jq/modules/oniguruma/config.sub +1890 -0
  49. package/deps/jq/modules/oniguruma/configure.ac +87 -0
  50. package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +31 -0
  51. package/deps/jq/modules/oniguruma/depcomp +791 -0
  52. package/deps/jq/modules/oniguruma/dist.info +10 -0
  53. package/deps/jq/modules/oniguruma/doc/API +660 -0
  54. package/deps/jq/modules/oniguruma/doc/API.ja +667 -0
  55. package/deps/jq/modules/oniguruma/doc/FAQ +12 -0
  56. package/deps/jq/modules/oniguruma/doc/FAQ.ja +22 -0
  57. package/deps/jq/modules/oniguruma/doc/RE +436 -0
  58. package/deps/jq/modules/oniguruma/doc/RE.ja +448 -0
  59. package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +698 -0
  60. package/deps/jq/modules/oniguruma/index.html +181 -0
  61. package/deps/jq/modules/oniguruma/index_ja.html +184 -0
  62. package/deps/jq/modules/oniguruma/install-sh +541 -0
  63. package/deps/jq/modules/oniguruma/m4/.whatever +0 -0
  64. package/deps/jq/modules/oniguruma/make_win32.bat +3 -0
  65. package/deps/jq/modules/oniguruma/make_win64.bat +3 -0
  66. package/deps/jq/modules/oniguruma/missing +215 -0
  67. package/deps/jq/modules/oniguruma/onig-config.in +78 -0
  68. package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +13 -0
  69. package/deps/jq/modules/oniguruma/oniguruma.pc.in +14 -0
  70. package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +28 -0
  71. package/deps/jq/modules/oniguruma/sample/Makefile.am +34 -0
  72. package/deps/jq/modules/oniguruma/sample/bug_fix.c +131 -0
  73. package/deps/jq/modules/oniguruma/sample/crnl.c +127 -0
  74. package/deps/jq/modules/oniguruma/sample/encode.c +308 -0
  75. package/deps/jq/modules/oniguruma/sample/listcap.c +110 -0
  76. package/deps/jq/modules/oniguruma/sample/names.c +75 -0
  77. package/deps/jq/modules/oniguruma/sample/posix.c +96 -0
  78. package/deps/jq/modules/oniguruma/sample/scan.c +88 -0
  79. package/deps/jq/modules/oniguruma/sample/simple.c +59 -0
  80. package/deps/jq/modules/oniguruma/sample/sql.c +76 -0
  81. package/deps/jq/modules/oniguruma/sample/syntax.c +76 -0
  82. package/deps/jq/modules/oniguruma/sample/user_property.c +87 -0
  83. package/deps/jq/modules/oniguruma/src/Makefile.am +58 -0
  84. package/deps/jq/modules/oniguruma/src/Makefile.windows +183 -0
  85. package/deps/jq/modules/oniguruma/src/ascii.c +61 -0
  86. package/deps/jq/modules/oniguruma/src/big5.c +190 -0
  87. package/deps/jq/modules/oniguruma/src/config.h.cmake.in +71 -0
  88. package/deps/jq/modules/oniguruma/src/config.h.win32 +84 -0
  89. package/deps/jq/modules/oniguruma/src/config.h.win64 +84 -0
  90. package/deps/jq/modules/oniguruma/src/cp1251.c +203 -0
  91. package/deps/jq/modules/oniguruma/src/euc_jp.c +310 -0
  92. package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +158 -0
  93. package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +27 -0
  94. package/deps/jq/modules/oniguruma/src/euc_kr.c +188 -0
  95. package/deps/jq/modules/oniguruma/src/euc_tw.c +171 -0
  96. package/deps/jq/modules/oniguruma/src/gb18030.c +538 -0
  97. package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +67 -0
  98. package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +55 -0
  99. package/deps/jq/modules/oniguruma/src/iso8859_1.c +275 -0
  100. package/deps/jq/modules/oniguruma/src/iso8859_10.c +242 -0
  101. package/deps/jq/modules/oniguruma/src/iso8859_11.c +99 -0
  102. package/deps/jq/modules/oniguruma/src/iso8859_13.c +231 -0
  103. package/deps/jq/modules/oniguruma/src/iso8859_14.c +244 -0
  104. package/deps/jq/modules/oniguruma/src/iso8859_15.c +238 -0
  105. package/deps/jq/modules/oniguruma/src/iso8859_16.c +240 -0
  106. package/deps/jq/modules/oniguruma/src/iso8859_2.c +238 -0
  107. package/deps/jq/modules/oniguruma/src/iso8859_3.c +238 -0
  108. package/deps/jq/modules/oniguruma/src/iso8859_4.c +240 -0
  109. package/deps/jq/modules/oniguruma/src/iso8859_5.c +229 -0
  110. package/deps/jq/modules/oniguruma/src/iso8859_6.c +99 -0
  111. package/deps/jq/modules/oniguruma/src/iso8859_7.c +225 -0
  112. package/deps/jq/modules/oniguruma/src/iso8859_8.c +99 -0
  113. package/deps/jq/modules/oniguruma/src/iso8859_9.c +231 -0
  114. package/deps/jq/modules/oniguruma/src/koi8.c +253 -0
  115. package/deps/jq/modules/oniguruma/src/koi8_r.c +215 -0
  116. package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +22 -0
  117. package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +306 -0
  118. package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +18 -0
  119. package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +545 -0
  120. package/deps/jq/modules/oniguruma/src/mktable.c +1184 -0
  121. package/deps/jq/modules/oniguruma/src/onig_init.c +45 -0
  122. package/deps/jq/modules/oniguruma/src/oniggnu.h +85 -0
  123. package/deps/jq/modules/oniguruma/src/onigposix.h +169 -0
  124. package/deps/jq/modules/oniguruma/src/oniguruma.h +841 -0
  125. package/deps/jq/modules/oniguruma/src/regcomp.c +6300 -0
  126. package/deps/jq/modules/oniguruma/src/regenc.c +917 -0
  127. package/deps/jq/modules/oniguruma/src/regenc.h +243 -0
  128. package/deps/jq/modules/oniguruma/src/regerror.c +393 -0
  129. package/deps/jq/modules/oniguruma/src/regexec.c +3856 -0
  130. package/deps/jq/modules/oniguruma/src/regext.c +202 -0
  131. package/deps/jq/modules/oniguruma/src/reggnu.c +147 -0
  132. package/deps/jq/modules/oniguruma/src/regint.h +779 -0
  133. package/deps/jq/modules/oniguruma/src/regparse.c +5403 -0
  134. package/deps/jq/modules/oniguruma/src/regparse.h +351 -0
  135. package/deps/jq/modules/oniguruma/src/regposerr.c +105 -0
  136. package/deps/jq/modules/oniguruma/src/regposix.c +306 -0
  137. package/deps/jq/modules/oniguruma/src/regsyntax.c +315 -0
  138. package/deps/jq/modules/oniguruma/src/regtrav.c +76 -0
  139. package/deps/jq/modules/oniguruma/src/regversion.c +57 -0
  140. package/deps/jq/modules/oniguruma/src/sjis.c +341 -0
  141. package/deps/jq/modules/oniguruma/src/sjis_prop.c +158 -0
  142. package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +27 -0
  143. package/deps/jq/modules/oniguruma/src/st.c +589 -0
  144. package/deps/jq/modules/oniguruma/src/st.h +68 -0
  145. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +2250 -0
  146. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +203 -0
  147. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +113 -0
  148. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +1225 -0
  149. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +24742 -0
  150. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +4846 -0
  151. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +2571 -0
  152. package/deps/jq/modules/oniguruma/src/unicode.c +664 -0
  153. package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +2548 -0
  154. package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +203 -0
  155. package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +113 -0
  156. package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1366 -0
  157. package/deps/jq/modules/oniguruma/src/unicode_property_data.c +25306 -0
  158. package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +4940 -0
  159. package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +2854 -0
  160. package/deps/jq/modules/oniguruma/src/utf16_be.c +235 -0
  161. package/deps/jq/modules/oniguruma/src/utf16_le.c +245 -0
  162. package/deps/jq/modules/oniguruma/src/utf32_be.c +194 -0
  163. package/deps/jq/modules/oniguruma/src/utf32_le.c +194 -0
  164. package/deps/jq/modules/oniguruma/src/utf8.c +335 -0
  165. package/deps/jq/modules/oniguruma/test/Makefile.am +28 -0
  166. package/deps/jq/modules/oniguruma/test/testc.c +874 -0
  167. package/deps/jq/modules/oniguruma/test/testu.c +916 -0
  168. package/deps/jq/modules/oniguruma/test-driver +153 -0
  169. package/deps/jq/modules/oniguruma/windows/testc.c +869 -0
  170. package/deps/jq/scripts/crosscompile +2 -1
  171. package/deps/jq/scripts/gen_utf8_tables.py +2 -3
  172. package/deps/jq/scripts/update-website +29 -0
  173. package/deps/jq/scripts/version +7 -2
  174. package/deps/jq/sig/jq-release.key +41 -0
  175. package/deps/jq/sig/v1.3/jq-linux-x86.asc +17 -0
  176. package/deps/jq/sig/v1.3/jq-linux-x86_64.asc +17 -0
  177. package/deps/jq/sig/v1.3/jq-osx-x86.asc +17 -0
  178. package/deps/jq/sig/v1.3/jq-osx-x86_64.asc +17 -0
  179. package/deps/jq/sig/v1.3/jq-win32.exe.asc +17 -0
  180. package/deps/jq/sig/v1.3/jq-win64.exe.asc +17 -0
  181. package/deps/jq/sig/v1.3/sha256sum.txt +6 -0
  182. package/deps/jq/sig/v1.4/jq-linux-x86.asc +17 -0
  183. package/deps/jq/sig/v1.4/jq-linux-x86_64.asc +17 -0
  184. package/deps/jq/sig/v1.4/jq-osx-x86.asc +17 -0
  185. package/deps/jq/sig/v1.4/jq-osx-x86_64.asc +17 -0
  186. package/deps/jq/sig/v1.4/jq-solaris11-32.asc +17 -0
  187. package/deps/jq/sig/v1.4/jq-solaris11-64.asc +17 -0
  188. package/deps/jq/sig/v1.4/jq-win32.exe.asc +17 -0
  189. package/deps/jq/sig/v1.4/jq-win64.exe.asc +17 -0
  190. package/deps/jq/sig/v1.4/sha256sum.txt +8 -0
  191. package/deps/jq/sig/v1.5/jq-linux32-no-oniguruma.asc +17 -0
  192. package/deps/jq/sig/v1.5/jq-linux32.asc +17 -0
  193. package/deps/jq/sig/v1.5/jq-linux64.asc +17 -0
  194. package/deps/jq/sig/v1.5/jq-osx-amd64.asc +17 -0
  195. package/deps/jq/sig/v1.5/jq-win32.exe.asc +17 -0
  196. package/deps/jq/sig/v1.5/jq-win64.exe.asc +17 -0
  197. package/deps/jq/sig/v1.5/sha256sum.txt +5 -0
  198. package/deps/jq/sig/v1.5rc1/jq-linux-x86_64-static.asc +17 -0
  199. package/deps/jq/sig/v1.5rc1/jq-win32.exe.asc +17 -0
  200. package/deps/jq/sig/v1.5rc1/jq-win64.exe.asc +17 -0
  201. package/deps/jq/sig/v1.5rc1/sha256sum.txt +3 -0
  202. package/deps/jq/sig/v1.5rc2/jq-linux-x86.asc +17 -0
  203. package/deps/jq/sig/v1.5rc2/jq-linux-x86_64.asc +17 -0
  204. package/deps/jq/sig/v1.5rc2/jq-osx-x86_64.asc +17 -0
  205. package/deps/jq/sig/v1.5rc2/jq-win32.exe.asc +17 -0
  206. package/deps/jq/sig/v1.5rc2/jq-win64.exe.asc +17 -0
  207. package/deps/jq/sig/v1.5rc2/sha256sum.txt +5 -0
  208. package/deps/jq/sig/v1.6/jq-linux32.asc +16 -0
  209. package/deps/jq/sig/v1.6/jq-linux64.asc +16 -0
  210. package/deps/jq/sig/v1.6/jq-osx-amd64.asc +16 -0
  211. package/deps/jq/sig/v1.6/jq-win32.exe.asc +16 -0
  212. package/deps/jq/sig/v1.6/jq-win64.exe.asc +16 -0
  213. package/deps/jq/sig/v1.6/sha256sum.txt +5 -0
  214. package/deps/jq/{builtin.c → src/builtin.c} +449 -344
  215. package/deps/jq/{builtin.h → src/builtin.h} +0 -0
  216. package/deps/jq/src/builtin.jq +311 -0
  217. package/deps/jq/{bytecode.c → src/bytecode.c} +0 -0
  218. package/deps/jq/{bytecode.h → src/bytecode.h} +0 -0
  219. package/deps/jq/{compile.c → src/compile.c} +213 -37
  220. package/deps/jq/{compile.h → src/compile.h} +7 -2
  221. package/deps/jq/{exec_stack.h → src/exec_stack.h} +0 -0
  222. package/deps/jq/{execute.c → src/execute.c} +127 -24
  223. package/deps/jq/{inject_errors.c → src/inject_errors.c} +0 -0
  224. package/deps/jq/{jq.h → src/jq.h} +13 -2
  225. package/deps/jq/{jq_parser.h → src/jq_parser.h} +0 -0
  226. package/deps/jq/{jq_test.c → src/jq_test.c} +1 -1
  227. package/deps/jq/{jv.c → src/jv.c} +24 -5
  228. package/deps/jq/{jv.h → src/jv.h} +46 -11
  229. package/deps/jq/{jv_alloc.c → src/jv_alloc.c} +0 -0
  230. package/deps/jq/{jv_alloc.h → src/jv_alloc.h} +0 -0
  231. package/deps/jq/{jv_aux.c → src/jv_aux.c} +38 -14
  232. package/deps/jq/{jv_dtoa.c → src/jv_dtoa.c} +4 -5
  233. package/deps/jq/{jv_dtoa.h → src/jv_dtoa.h} +0 -0
  234. package/deps/jq/src/jv_file.c +81 -0
  235. package/deps/jq/{jv_parse.c → src/jv_parse.c} +8 -2
  236. package/deps/jq/{jv_print.c → src/jv_print.c} +80 -27
  237. package/deps/jq/{jv_unicode.c → src/jv_unicode.c} +28 -4
  238. package/deps/jq/{jv_unicode.h → src/jv_unicode.h} +1 -0
  239. package/deps/jq/{jv_utf8_tables.h → src/jv_utf8_tables.h} +0 -0
  240. package/deps/jq/{lexer.c → src/lexer.c} +317 -292
  241. package/deps/jq/{lexer.h → src/lexer.h} +16 -12
  242. package/deps/jq/{lexer.l → src/lexer.l} +5 -4
  243. package/deps/jq/src/libm.h +291 -0
  244. package/deps/jq/{linker.c → src/linker.c} +5 -3
  245. package/deps/jq/{linker.h → src/linker.h} +0 -0
  246. package/deps/jq/{locfile.c → src/locfile.c} +1 -1
  247. package/deps/jq/{locfile.h → src/locfile.h} +0 -0
  248. package/deps/jq/{main.c → src/main.c} +202 -100
  249. package/deps/jq/{opcode_list.h → src/opcode_list.h} +4 -0
  250. package/deps/jq/{parser.c → src/parser.c} +1149 -1069
  251. package/deps/jq/{parser.h → src/parser.h} +28 -24
  252. package/deps/jq/{parser.y → src/parser.y} +108 -52
  253. package/deps/jq/{util.c → src/util.c} +12 -9
  254. package/deps/jq/{util.h → src/util.h} +0 -0
  255. package/deps/jq/tests/base64.test +35 -0
  256. package/deps/jq/tests/base64test +5 -0
  257. package/deps/jq/tests/jq-f-test.sh +4 -0
  258. package/deps/jq/tests/jq.test +305 -21
  259. package/deps/jq/tests/jqtest +1 -1
  260. package/deps/jq/tests/mantest +1 -1
  261. package/deps/jq/tests/onig.test +13 -0
  262. package/deps/jq/tests/onigtest +1 -1
  263. package/deps/jq/tests/optional.test +20 -0
  264. package/deps/jq/tests/optionaltest +5 -0
  265. package/deps/jq/tests/setup +7 -1
  266. package/deps/jq/tests/shtest +133 -29
  267. package/deps/jq/tests/utf8-truncate.jq +3 -0
  268. package/deps/jq/tests/utf8test +10 -0
  269. package/lib/index.js +7 -1
  270. package/package.json +3 -3
  271. package/test/santiy.test.js +24 -0
  272. package/deps/jq/docs/default_manpage.md +0 -22
  273. package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.css +0 -1058
  274. package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.min.css +0 -9
  275. package/deps/jq/docs/public/bootstrap/css/bootstrap.css +0 -5224
  276. package/deps/jq/docs/public/bootstrap/css/bootstrap.min.css +0 -9
  277. package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings-white.png +0 -0
  278. package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings.png +0 -0
  279. package/deps/jq/docs/public/bootstrap/js/bootstrap.js +0 -2027
  280. package/deps/jq/docs/public/bootstrap/js/bootstrap.min.js +0 -6
  281. package/deps/jq/docs/templates/shared/_header.liquid +0 -26
  282. package/deps/jq/jq.1.default +0 -39
  283. package/deps/jq/jv_file.c +0 -49
  284. package/deps/jq/libm.h +0 -160
  285. package/deps/jq/setup.sh +0 -33
  286. package/reports/jest-port-api.xml +0 -35
@@ -0,0 +1,215 @@
1
+ #! /bin/sh
2
+ # Common wrapper for a few potentially missing GNU programs.
3
+
4
+ scriptversion=2018-03-07.03; # UTC
5
+
6
+ # Copyright (C) 1996-2021 Free Software Foundation, Inc.
7
+ # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
+
9
+ # This program is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation; either version 2, or (at your option)
12
+ # any later version.
13
+
14
+ # This program is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ # GNU General Public License for more details.
18
+
19
+ # You should have received a copy of the GNU General Public License
20
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
21
+
22
+ # As a special exception to the GNU General Public License, if you
23
+ # distribute this file as part of a program that contains a
24
+ # configuration script generated by Autoconf, you may include it under
25
+ # the same distribution terms that you use for the rest of that program.
26
+
27
+ if test $# -eq 0; then
28
+ echo 1>&2 "Try '$0 --help' for more information"
29
+ exit 1
30
+ fi
31
+
32
+ case $1 in
33
+
34
+ --is-lightweight)
35
+ # Used by our autoconf macros to check whether the available missing
36
+ # script is modern enough.
37
+ exit 0
38
+ ;;
39
+
40
+ --run)
41
+ # Back-compat with the calling convention used by older automake.
42
+ shift
43
+ ;;
44
+
45
+ -h|--h|--he|--hel|--help)
46
+ echo "\
47
+ $0 [OPTION]... PROGRAM [ARGUMENT]...
48
+
49
+ Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
50
+ to PROGRAM being missing or too old.
51
+
52
+ Options:
53
+ -h, --help display this help and exit
54
+ -v, --version output version information and exit
55
+
56
+ Supported PROGRAM values:
57
+ aclocal autoconf autoheader autom4te automake makeinfo
58
+ bison yacc flex lex help2man
59
+
60
+ Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
61
+ 'g' are ignored when checking the name.
62
+
63
+ Send bug reports to <bug-automake@gnu.org>."
64
+ exit $?
65
+ ;;
66
+
67
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
68
+ echo "missing $scriptversion (GNU Automake)"
69
+ exit $?
70
+ ;;
71
+
72
+ -*)
73
+ echo 1>&2 "$0: unknown '$1' option"
74
+ echo 1>&2 "Try '$0 --help' for more information"
75
+ exit 1
76
+ ;;
77
+
78
+ esac
79
+
80
+ # Run the given program, remember its exit status.
81
+ "$@"; st=$?
82
+
83
+ # If it succeeded, we are done.
84
+ test $st -eq 0 && exit 0
85
+
86
+ # Also exit now if we it failed (or wasn't found), and '--version' was
87
+ # passed; such an option is passed most likely to detect whether the
88
+ # program is present and works.
89
+ case $2 in --version|--help) exit $st;; esac
90
+
91
+ # Exit code 63 means version mismatch. This often happens when the user
92
+ # tries to use an ancient version of a tool on a file that requires a
93
+ # minimum version.
94
+ if test $st -eq 63; then
95
+ msg="probably too old"
96
+ elif test $st -eq 127; then
97
+ # Program was missing.
98
+ msg="missing on your system"
99
+ else
100
+ # Program was found and executed, but failed. Give up.
101
+ exit $st
102
+ fi
103
+
104
+ perl_URL=https://www.perl.org/
105
+ flex_URL=https://github.com/westes/flex
106
+ gnu_software_URL=https://www.gnu.org/software
107
+
108
+ program_details ()
109
+ {
110
+ case $1 in
111
+ aclocal|automake)
112
+ echo "The '$1' program is part of the GNU Automake package:"
113
+ echo "<$gnu_software_URL/automake>"
114
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
115
+ echo "<$gnu_software_URL/autoconf>"
116
+ echo "<$gnu_software_URL/m4/>"
117
+ echo "<$perl_URL>"
118
+ ;;
119
+ autoconf|autom4te|autoheader)
120
+ echo "The '$1' program is part of the GNU Autoconf package:"
121
+ echo "<$gnu_software_URL/autoconf/>"
122
+ echo "It also requires GNU m4 and Perl in order to run:"
123
+ echo "<$gnu_software_URL/m4/>"
124
+ echo "<$perl_URL>"
125
+ ;;
126
+ esac
127
+ }
128
+
129
+ give_advice ()
130
+ {
131
+ # Normalize program name to check for.
132
+ normalized_program=`echo "$1" | sed '
133
+ s/^gnu-//; t
134
+ s/^gnu//; t
135
+ s/^g//; t'`
136
+
137
+ printf '%s\n' "'$1' is $msg."
138
+
139
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
140
+ case $normalized_program in
141
+ autoconf*)
142
+ echo "You should only need it if you modified 'configure.ac',"
143
+ echo "or m4 files included by it."
144
+ program_details 'autoconf'
145
+ ;;
146
+ autoheader*)
147
+ echo "You should only need it if you modified 'acconfig.h' or"
148
+ echo "$configure_deps."
149
+ program_details 'autoheader'
150
+ ;;
151
+ automake*)
152
+ echo "You should only need it if you modified 'Makefile.am' or"
153
+ echo "$configure_deps."
154
+ program_details 'automake'
155
+ ;;
156
+ aclocal*)
157
+ echo "You should only need it if you modified 'acinclude.m4' or"
158
+ echo "$configure_deps."
159
+ program_details 'aclocal'
160
+ ;;
161
+ autom4te*)
162
+ echo "You might have modified some maintainer files that require"
163
+ echo "the 'autom4te' program to be rebuilt."
164
+ program_details 'autom4te'
165
+ ;;
166
+ bison*|yacc*)
167
+ echo "You should only need it if you modified a '.y' file."
168
+ echo "You may want to install the GNU Bison package:"
169
+ echo "<$gnu_software_URL/bison/>"
170
+ ;;
171
+ lex*|flex*)
172
+ echo "You should only need it if you modified a '.l' file."
173
+ echo "You may want to install the Fast Lexical Analyzer package:"
174
+ echo "<$flex_URL>"
175
+ ;;
176
+ help2man*)
177
+ echo "You should only need it if you modified a dependency" \
178
+ "of a man page."
179
+ echo "You may want to install the GNU Help2man package:"
180
+ echo "<$gnu_software_URL/help2man/>"
181
+ ;;
182
+ makeinfo*)
183
+ echo "You should only need it if you modified a '.texi' file, or"
184
+ echo "any other file indirectly affecting the aspect of the manual."
185
+ echo "You might want to install the Texinfo package:"
186
+ echo "<$gnu_software_URL/texinfo/>"
187
+ echo "The spurious makeinfo call might also be the consequence of"
188
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
189
+ echo "want to install GNU make:"
190
+ echo "<$gnu_software_URL/make/>"
191
+ ;;
192
+ *)
193
+ echo "You might have modified some files without having the proper"
194
+ echo "tools for further handling them. Check the 'README' file, it"
195
+ echo "often tells you about the needed prerequisites for installing"
196
+ echo "this package. You may also peek at any GNU archive site, in"
197
+ echo "case some other package contains this missing '$1' program."
198
+ ;;
199
+ esac
200
+ }
201
+
202
+ give_advice "$1" | sed -e '1s/^/WARNING: /' \
203
+ -e '2,$s/^/ /' >&2
204
+
205
+ # Propagate the correct exit status (expected to be 127 for a program
206
+ # not found, 63 for a program that failed due to version mismatch).
207
+ exit $st
208
+
209
+ # Local variables:
210
+ # eval: (add-hook 'before-save-hook 'time-stamp)
211
+ # time-stamp-start: "scriptversion="
212
+ # time-stamp-format: "%:y-%02m-%02d.%02H"
213
+ # time-stamp-time-zone: "UTC0"
214
+ # time-stamp-end: "; # UTC"
215
+ # End:
@@ -0,0 +1,78 @@
1
+ #!/bin/sh
2
+ # Copyright (C) 2006 K.Kosako
3
+
4
+ ONIG_VERSION=@PACKAGE_VERSION@
5
+
6
+ show_usage()
7
+ {
8
+ cat <<EOF
9
+ Usage: onig-config [OPTION]
10
+
11
+ Values for OPTION are:
12
+ --prefix[=DIR] change prefix to DIR
13
+ --prefix print prefix
14
+ --exec-prefix[=DIR] change exec_prefix to DIR
15
+ --exec-prefix print exec_prefix
16
+ --cflags print C compiler flags
17
+ --libs print library information
18
+ --version print oniguruma version
19
+ --help print this help
20
+
21
+ EOF
22
+
23
+ exit 1
24
+ }
25
+
26
+ if test $# -eq 0; then
27
+ show_usage
28
+ fi
29
+
30
+ prefix=@prefix@
31
+ exec_prefix=@exec_prefix@
32
+ is_set_exec_prefix=no
33
+
34
+ while test $# -gt 0; do
35
+ case "$1" in
36
+ -*=*) val=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
37
+ ;;
38
+ *) val=
39
+ ;;
40
+ esac
41
+
42
+ case $1 in
43
+ --prefix=*)
44
+ prefix=$val
45
+ if test $is_set_exec_prefix = no ; then
46
+ exec_prefix=$val
47
+ fi
48
+ ;;
49
+ --prefix)
50
+ echo $prefix
51
+ ;;
52
+ --exec-prefix=*)
53
+ exec_prefix=$val
54
+ is_set_exec_prefix=yes
55
+ ;;
56
+ --exec-prefix)
57
+ echo $exec_prefix
58
+ ;;
59
+ --cflags)
60
+ if test @includedir@ != /usr/include ; then
61
+ show_includedir=-I@includedir@
62
+ fi
63
+ echo $show_includedir
64
+ ;;
65
+ --libs)
66
+ echo -L@libdir@ -lonig
67
+ ;;
68
+ --version)
69
+ echo $ONIG_VERSION
70
+ ;;
71
+ *)
72
+ show_usage
73
+ ;;
74
+ esac
75
+ shift
76
+ done
77
+
78
+ # END
@@ -0,0 +1,13 @@
1
+ prefix=@CMAKE_INSTALL_PREFIX@
2
+ exec_prefix=${prefix}
3
+ libdir=${exec_prefix}/lib
4
+ includedir=${prefix}/include
5
+ datarootdir=${prefix}/share
6
+ datadir=${prefix}/share
7
+
8
+ Name: oniguruma
9
+ Description: Regular expression library
10
+ Version: @PACKAGE_VERSION@
11
+ Requires:
12
+ Libs: -L${libdir} -lonig
13
+ Cflags: -I${includedir}
@@ -0,0 +1,14 @@
1
+ prefix=@prefix@
2
+ exec_prefix=@exec_prefix@
3
+ libdir=@libdir@
4
+ includedir=@includedir@
5
+ datarootdir=@datarootdir@
6
+ datadir=@datadir@
7
+
8
+ Name: oniguruma
9
+ Description: Regular expression library
10
+ Version: @PACKAGE_VERSION@
11
+ Requires:
12
+ Libs: -L${libdir} -lonig
13
+ Cflags: -I${includedir}
14
+
@@ -0,0 +1,28 @@
1
+
2
+ cmake_minimum_required(VERSION 2.8)
3
+ project(oniguruma_sample C)
4
+
5
+ add_executable(crnl crnl.c)
6
+ target_link_libraries(crnl onig)
7
+
8
+ add_executable(encode encode.c)
9
+ target_link_libraries(encode onig)
10
+
11
+ add_executable(listcap listcap.c)
12
+ target_link_libraries(listcap onig)
13
+
14
+ add_executable(names names.c)
15
+ target_link_libraries(names onig)
16
+
17
+ add_executable(posix posix.c)
18
+ target_link_libraries(posix onig)
19
+
20
+ add_executable(simple simple.c)
21
+ target_link_libraries(simple onig)
22
+
23
+ add_executable(sql sql.c)
24
+ target_link_libraries(sql onig)
25
+
26
+ add_executable(syntax syntax.c)
27
+ target_link_libraries(syntax onig)
28
+
@@ -0,0 +1,34 @@
1
+ #noinst_PROGRAMS = encode listcap names posix simple sql syntax crnl
2
+
3
+ lib_onig = ../src/libonig.la
4
+ LDADD = $(lib_onig)
5
+
6
+ AM_LDFLAGS = -L$(prefix)/lib
7
+ AM_CPPFLAGS = -I../src -I$(includedir)
8
+
9
+ TESTS = encode listcap names posix simple sql syntax user_property bug_fix
10
+
11
+ check_PROGRAMS = encode listcap names posix simple sql syntax user_property bug_fix
12
+
13
+ encode_SOURCES = encode.c
14
+ listcap_SOURCES = listcap.c
15
+ names_SOURCES = names.c
16
+ posix_SOURCES = posix.c
17
+ simple_SOURCES = simple.c
18
+ sql_SOURCES = sql.c
19
+ syntax_SOURCES = syntax.c
20
+ user_property_SOURCES = user_property.c
21
+ bug_fix = bug_fix.c
22
+
23
+ sampledir = .
24
+
25
+ test: encode listcap names posix simple sql syntax user_property bug_fix
26
+ $(sampledir)/encode
27
+ $(sampledir)/listcap
28
+ $(sampledir)/names
29
+ $(sampledir)/posix
30
+ $(sampledir)/simple
31
+ $(sampledir)/sql
32
+ $(sampledir)/syntax
33
+ $(sampledir)/user_property
34
+ $(sampledir)/bug_fix
@@ -0,0 +1,131 @@
1
+ /*
2
+ * bug_fix.c
3
+ */
4
+ #include <stdio.h>
5
+ #include "oniguruma.h"
6
+
7
+ static OnigCaseFoldType CF = ONIGENC_CASE_FOLD_MIN;
8
+
9
+ static int
10
+ search(regex_t* reg, unsigned char* str, unsigned char* end)
11
+ {
12
+ int r;
13
+ unsigned char *start, *range;
14
+ OnigRegion *region;
15
+
16
+ region = onig_region_new();
17
+
18
+ start = str;
19
+ range = end;
20
+ r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE);
21
+ if (r >= 0) {
22
+ int i;
23
+
24
+ fprintf(stderr, "match at %d (%s)\n", r,
25
+ ONIGENC_NAME(onig_get_encoding(reg)));
26
+ for (i = 0; i < region->num_regs; i++) {
27
+ fprintf(stderr, "%d: (%d-%d)\n", i, region->beg[i], region->end[i]);
28
+ }
29
+ }
30
+ else if (r == ONIG_MISMATCH) {
31
+ fprintf(stderr, "search fail (%s)\n",
32
+ ONIGENC_NAME(onig_get_encoding(reg)));
33
+ }
34
+ else { /* error */
35
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
36
+ onig_error_code_to_str(s, r);
37
+ fprintf(stderr, "ERROR: %s\n", s);
38
+ fprintf(stderr, " (%s)\n", ONIGENC_NAME(onig_get_encoding(reg)));
39
+ return -1;
40
+ }
41
+
42
+ onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
43
+ return 0;
44
+ }
45
+
46
+ static int
47
+ exec_deluxe(OnigEncoding pattern_enc, OnigEncoding str_enc,
48
+ OnigOptionType options, char* apattern, char* astr)
49
+ {
50
+ int r;
51
+ unsigned char *end;
52
+ regex_t* reg;
53
+ OnigCompileInfo ci;
54
+ OnigErrorInfo einfo;
55
+ UChar* pattern = (UChar* )apattern;
56
+ UChar* str = (UChar* )astr;
57
+
58
+ onig_initialize(&str_enc, 1);
59
+
60
+ ci.num_of_elements = 5;
61
+ ci.pattern_enc = pattern_enc;
62
+ ci.target_enc = str_enc;
63
+ ci.syntax = ONIG_SYNTAX_DEFAULT;
64
+ ci.option = options;
65
+ ci.case_fold_flag = CF;
66
+
67
+ r = onig_new_deluxe(&reg, pattern,
68
+ pattern + onigenc_str_bytelen_null(pattern_enc, pattern),
69
+ &ci, &einfo);
70
+ if (r != ONIG_NORMAL) {
71
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
72
+ onig_error_code_to_str(s, r, &einfo);
73
+ fprintf(stderr, "ERROR: %s\n", s);
74
+ return -1;
75
+ }
76
+
77
+ end = str + onigenc_str_bytelen_null(str_enc, str);
78
+ r = search(reg, str, end);
79
+
80
+ onig_free(reg);
81
+ onig_end();
82
+ return 0;
83
+ }
84
+
85
+ static int
86
+ exec(OnigEncoding enc, OnigOptionType options, char* apattern, char* astr)
87
+ {
88
+ int r;
89
+ unsigned char *end;
90
+ regex_t* reg;
91
+ OnigErrorInfo einfo;
92
+ UChar* pattern = (UChar* )apattern;
93
+ UChar* str = (UChar* )astr;
94
+
95
+ onig_initialize(&enc, 1);
96
+
97
+ r = onig_new(&reg, pattern,
98
+ pattern + onigenc_str_bytelen_null(enc, pattern),
99
+ options, enc, ONIG_SYNTAX_DEFAULT, &einfo);
100
+ if (r != ONIG_NORMAL) {
101
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
102
+ onig_error_code_to_str(s, r, &einfo);
103
+ fprintf(stderr, "ERROR: %s\n", s);
104
+ return -1;
105
+ }
106
+
107
+ end = str + onigenc_str_bytelen_null(enc, str);
108
+ r = search(reg, str, end);
109
+
110
+ onig_free(reg);
111
+ onig_end();
112
+ return 0;
113
+ }
114
+
115
+
116
+
117
+ extern int main(int argc, char* argv[])
118
+ {
119
+ /* fix ignore case in look-behind
120
+ commit: 3340ec2cc5627172665303fe248c9793354d2251 */
121
+ exec_deluxe(ONIG_ENCODING_UTF8, ONIG_ENCODING_UTF8,
122
+ ONIG_OPTION_IGNORECASE,
123
+ "(?<=\305\211)a", "\312\274na"); /* \u{0149}a \u{02bc}na */
124
+
125
+ exec(ONIG_ENCODING_UTF8, ONIG_OPTION_NONE, "(\\2)(\\1)", "aa"); /* fail. */
126
+
127
+ exec(ONIG_ENCODING_UTF8, ONIG_OPTION_FIND_LONGEST,
128
+ "a*", "aa aaa aaaa aaaaa "); /* match 12-17 */
129
+
130
+ return 0;
131
+ }
@@ -0,0 +1,127 @@
1
+ /*
2
+ * crnl.c 2007/05/30 K.Kosako
3
+ *
4
+ * !!! You should enable USE_CRNL_AS_LINE_TERMINATOR. !!!
5
+ *
6
+ * USE_CRNL_AS_LINE_TERMINATOR config test program.
7
+ */
8
+ #include <stdio.h>
9
+ #include <string.h>
10
+ #include "oniguruma.h"
11
+
12
+ static int nfail = 0;
13
+
14
+ static void result(int no, int from, int to,
15
+ int expected_from, int expected_to)
16
+ {
17
+ fprintf(stderr, "%3d: ", no);
18
+ if (from == expected_from && to == expected_to) {
19
+ fprintf(stderr, "Success\n");
20
+ }
21
+ else {
22
+ fprintf(stderr, "Fail: expected: (%d-%d), result: (%d-%d)\n",
23
+ expected_from, expected_to, from, to);
24
+
25
+ nfail++;
26
+ }
27
+ }
28
+
29
+ static int
30
+ x(int no, char* pattern_arg, char* str_arg,
31
+ int expected_from, int expected_to)
32
+ {
33
+ int r;
34
+ unsigned char *start, *range, *end;
35
+ regex_t* reg;
36
+ OnigErrorInfo einfo;
37
+ OnigRegion *region;
38
+ UChar *pattern, *str;
39
+
40
+ pattern = (UChar* )pattern_arg;
41
+ str = (UChar* )str_arg;
42
+
43
+ r = onig_new(&reg, pattern, pattern + strlen((char* )pattern),
44
+ ONIG_OPTION_DEFAULT, ONIG_ENCODING_ASCII, ONIG_SYNTAX_DEFAULT, &einfo);
45
+ if (r != ONIG_NORMAL) {
46
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
47
+ onig_error_code_to_str(s, r, &einfo);
48
+ fprintf(stderr, "ERROR: %s\n", s);
49
+ return -1;
50
+ }
51
+
52
+ region = onig_region_new();
53
+
54
+ end = str + strlen((char* )str);
55
+ start = str;
56
+ range = end;
57
+ r = onig_search(reg, str, end, start, range, region, ONIG_OPTION_NONE);
58
+ if (r >= 0 || r == ONIG_MISMATCH) {
59
+ result(no, region->beg[0], region->end[0], expected_from, expected_to);
60
+ }
61
+ else if (r == ONIG_MISMATCH) {
62
+ result(no, r, -1, expected_from, expected_to);
63
+ }
64
+ else { /* error */
65
+ char s[ONIG_MAX_ERROR_MESSAGE_LEN];
66
+ onig_error_code_to_str(s, r);
67
+ fprintf(stderr, "ERROR: %s\n", s);
68
+ return -1;
69
+ }
70
+
71
+ onig_region_free(region, 1 /* 1:free self, 0:free contents only */);
72
+ onig_free(reg);
73
+ return 0;
74
+ }
75
+
76
+ static int
77
+ f(int no, char* pattern_arg, char* str_arg)
78
+ {
79
+ return x(no, pattern_arg, str_arg, -1, -1);
80
+ }
81
+
82
+ extern int main(int argc, char* argv[])
83
+ {
84
+ x( 1, "", "\r\n", 0, 0);
85
+ x( 2, ".", "\r\n", 0, 1);
86
+ f( 3, "..", "\r\n");
87
+ x( 4, "^", "\r\n", 0, 0);
88
+ x( 5, "\\n^", "\r\nf", 1, 2);
89
+ x( 6, "\\n^a", "\r\na", 1, 3);
90
+ x( 7, "$", "\r\n", 0, 0);
91
+ x( 8, "T$", "T\r\n", 0, 1);
92
+ x( 9, "T$", "T\raT\r\n", 3, 4);
93
+ x(10, "\\z", "\r\n", 2, 2);
94
+ f(11, "a\\z", "a\r\n");
95
+ x(12, "\\Z", "\r\n", 0, 0);
96
+ x(13, "\\Z", "\r\na", 3, 3);
97
+ x(14, "\\Z", "\r\n\r\n\n", 4, 4);
98
+ x(15, "\\Z", "\r\n\r\nX", 5, 5);
99
+ x(16, "a\\Z", "a\r\n", 0, 1);
100
+ x(17, "aaaaaaaaaaaaaaa\\Z", "aaaaaaaaaaaaaaa\r\n", 0, 15);
101
+ x(18, "a|$", "b\r\n", 1, 1);
102
+ x(19, "$|b", "\rb", 1, 2);
103
+ x(20, "a$|ab$", "\r\nab\r\n", 2, 4);
104
+
105
+ x(21, "a|\\Z", "b\r\n", 1, 1);
106
+ x(22, "\\Z|b", "\rb", 1, 2);
107
+ x(23, "a\\Z|ab\\Z", "\r\nab\r\n", 2, 4);
108
+ x(24, "(?=a$).", "a\r\n", 0, 1);
109
+ f(25, "(?=a$).", "a\r");
110
+ x(26, "(?!a$)..", "a\r", 0, 2);
111
+ x(27, "(?<=a$).\\n", "a\r\n", 1, 3);
112
+ f(28, "(?<!a$).\\n", "a\r\n");
113
+ x(29, "(?=a\\Z).", "a\r\n", 0, 1);
114
+ f(30, "(?=a\\Z).", "a\r");
115
+ x(31, "(?!a\\Z)..", "a\r", 0, 2);
116
+
117
+ onig_end();
118
+
119
+ if (nfail > 0) {
120
+ fprintf(stderr, "\n");
121
+ fprintf(stderr, "!!! You have to enable USE_CRNL_AS_LINE_TERMINATOR\n");
122
+ fprintf(stderr, "!!! in regenc.h for this test program.\n");
123
+ fprintf(stderr, "\n");
124
+ }
125
+
126
+ return 0;
127
+ }