qr_reader-native 0.0.1

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 (95) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE-mruby.txt +22 -0
  3. data/LICENSE-spinel.txt +19 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +61 -0
  6. data/ext/qr_reader_native/SPINEL_VERSION +1 -0
  7. data/ext/qr_reader_native/extconf.rb +8 -0
  8. data/ext/qr_reader_native/mruby/error.h +13 -0
  9. data/ext/qr_reader_native/mruby/internal.h +145 -0
  10. data/ext/qr_reader_native/mruby/string.h +22 -0
  11. data/ext/qr_reader_native/mruby.h +93 -0
  12. data/ext/qr_reader_native/mruby_shim.h +118 -0
  13. data/ext/qr_reader_native/qr_reader_native.c +13513 -0
  14. data/ext/qr_reader_native/qr_reader_native.h +29 -0
  15. data/ext/qr_reader_native/qr_reader_native_ext.c +598 -0
  16. data/ext/qr_reader_native/re_cased.h +71 -0
  17. data/ext/qr_reader_native/re_compile.c +5784 -0
  18. data/ext/qr_reader_native/re_ctype.h +3540 -0
  19. data/ext/qr_reader_native/re_exec.c +2190 -0
  20. data/ext/qr_reader_native/re_internal.h +671 -0
  21. data/ext/qr_reader_native/re_prop.h +4629 -0
  22. data/ext/qr_reader_native/re_spinel.c +363 -0
  23. data/ext/qr_reader_native/re_spinel.h +22 -0
  24. data/ext/qr_reader_native/re_spinel_utf8.inc +97 -0
  25. data/ext/qr_reader_native/re_utf8.c +156 -0
  26. data/ext/qr_reader_native/sp_alloc.c +1447 -0
  27. data/ext/qr_reader_native/sp_alloc.h +1196 -0
  28. data/ext/qr_reader_native/sp_argf.h +33 -0
  29. data/ext/qr_reader_native/sp_array.c +1052 -0
  30. data/ext/qr_reader_native/sp_array.h +456 -0
  31. data/ext/qr_reader_native/sp_bigint.c +5826 -0
  32. data/ext/qr_reader_native/sp_bigint.h +117 -0
  33. data/ext/qr_reader_native/sp_cold.c +5259 -0
  34. data/ext/qr_reader_native/sp_compat.h +402 -0
  35. data/ext/qr_reader_native/sp_core.c +818 -0
  36. data/ext/qr_reader_native/sp_core.h +56 -0
  37. data/ext/qr_reader_native/sp_crypto.c +877 -0
  38. data/ext/qr_reader_native/sp_crypto.h +169 -0
  39. data/ext/qr_reader_native/sp_dtoa.c +1533 -0
  40. data/ext/qr_reader_native/sp_dtoa.h +29 -0
  41. data/ext/qr_reader_native/sp_encoding_names.h +172 -0
  42. data/ext/qr_reader_native/sp_enum.h +86 -0
  43. data/ext/qr_reader_native/sp_exc.c +1185 -0
  44. data/ext/qr_reader_native/sp_exc.h +186 -0
  45. data/ext/qr_reader_native/sp_exc_ctx.h +56 -0
  46. data/ext/qr_reader_native/sp_fiber.c +889 -0
  47. data/ext/qr_reader_native/sp_fiber.h +162 -0
  48. data/ext/qr_reader_native/sp_fiber_ctx.h +84 -0
  49. data/ext/qr_reader_native/sp_format.c +695 -0
  50. data/ext/qr_reader_native/sp_format.h +83 -0
  51. data/ext/qr_reader_native/sp_gc.c +1793 -0
  52. data/ext/qr_reader_native/sp_gc.h +762 -0
  53. data/ext/qr_reader_native/sp_hash.c +131 -0
  54. data/ext/qr_reader_native/sp_hash.h +131 -0
  55. data/ext/qr_reader_native/sp_inspect.c +215 -0
  56. data/ext/qr_reader_native/sp_inspect.h +128 -0
  57. data/ext/qr_reader_native/sp_io.c +1676 -0
  58. data/ext/qr_reader_native/sp_io.h +272 -0
  59. data/ext/qr_reader_native/sp_iobuffer.c +1014 -0
  60. data/ext/qr_reader_native/sp_iobuffer.h +167 -0
  61. data/ext/qr_reader_native/sp_marshal.c +487 -0
  62. data/ext/qr_reader_native/sp_marshal.h +60 -0
  63. data/ext/qr_reader_native/sp_net.c +1029 -0
  64. data/ext/qr_reader_native/sp_net.h +205 -0
  65. data/ext/qr_reader_native/sp_pack.c +1254 -0
  66. data/ext/qr_reader_native/sp_poly_cold.c +1220 -0
  67. data/ext/qr_reader_native/sp_proc.c +410 -0
  68. data/ext/qr_reader_native/sp_proc.h +327 -0
  69. data/ext/qr_reader_native/sp_process.c +547 -0
  70. data/ext/qr_reader_native/sp_process_status.c +211 -0
  71. data/ext/qr_reader_native/sp_process_status.h +66 -0
  72. data/ext/qr_reader_native/sp_random.c +287 -0
  73. data/ext/qr_reader_native/sp_random.h +52 -0
  74. data/ext/qr_reader_native/sp_range.h +144 -0
  75. data/ext/qr_reader_native/sp_re.c +1379 -0
  76. data/ext/qr_reader_native/sp_re.h +186 -0
  77. data/ext/qr_reader_native/sp_re_names.h +59 -0
  78. data/ext/qr_reader_native/sp_sched.c +4044 -0
  79. data/ext/qr_reader_native/sp_sched.h +295 -0
  80. data/ext/qr_reader_native/sp_slab.c +1507 -0
  81. data/ext/qr_reader_native/sp_str.c +1462 -0
  82. data/ext/qr_reader_native/sp_str.h +306 -0
  83. data/ext/qr_reader_native/sp_str_crypt.c +23 -0
  84. data/ext/qr_reader_native/sp_string.c +92 -0
  85. data/ext/qr_reader_native/sp_string.h +253 -0
  86. data/ext/qr_reader_native/sp_system.c +78 -0
  87. data/ext/qr_reader_native/sp_system.h +18 -0
  88. data/ext/qr_reader_native/sp_time.c +860 -0
  89. data/ext/qr_reader_native/sp_time.h +100 -0
  90. data/ext/qr_reader_native/sp_types.h +292 -0
  91. data/ext/qr_reader_native/spinel_rt.h +19017 -0
  92. data/ext/qr_reader_native/unicase.c +399 -0
  93. data/ext/qr_reader_native/unicase.h +901 -0
  94. data/lib/qr_reader/native.rb +6 -0
  95. metadata +153 -0
@@ -0,0 +1,71 @@
1
+ /*
2
+ ** re_cased.h - codepoints /i cannot answer without Unicode case data
3
+ **
4
+ ** Generated by mrbgems/mruby-regexp/tools/gen_cased.rb from the Unicode
5
+ ** 17.0.0 character database. Do not edit by hand.
6
+ **
7
+ ** A build narrowing /i to ASCII refuses to compile a pattern holding one
8
+ ** of these, rather than folding ASCII and answering wrongly.
9
+ ** The test is whether a codepoint has a case folding, not whether it is
10
+ ** non-ASCII: a script without case has nothing to fold, so /日本/i and the
11
+ ** like are unaffected and stay out of the table.
12
+ **
13
+ ** U+017F and U+212A are out of the table as well, for the opposite reason:
14
+ ** they fold to "s" and "k", so every build carries them and can answer.
15
+ **
16
+ ** Ranges are coarse. 309 uncased codepoints fall inside them and are
17
+ ** refused too, which costs a pattern ASCII folding would have got right
18
+ ** and buys a table a tenth the size of the mapping.
19
+ **
20
+ ** See Copyright Notice in mruby.h
21
+ */
22
+
23
+ #ifndef MRB_RE_CASED_H
24
+ #define MRB_RE_CASED_H
25
+
26
+ /* Inclusive (lo, hi) pairs, ascending and disjoint. */
27
+ static const uint32_t re_cased_ranges[][2] = {
28
+ { 0x000B5, 0x0017E },
29
+ { 0x00180, 0x0029E },
30
+ { 0x00345, 0x00345 },
31
+ { 0x00370, 0x00587 },
32
+ { 0x010A0, 0x010FF },
33
+ { 0x013A0, 0x013FD },
34
+ { 0x01C80, 0x01CBF },
35
+ { 0x01D79, 0x01D8E },
36
+ { 0x01E00, 0x01FFC },
37
+ { 0x02126, 0x02129 },
38
+ { 0x0212B, 0x02132 },
39
+ { 0x0214E, 0x0214E },
40
+ { 0x02160, 0x02184 },
41
+ { 0x024B6, 0x024E9 },
42
+ { 0x02C00, 0x02D2D },
43
+ { 0x0A640, 0x0A66D },
44
+ { 0x0A680, 0x0A69B },
45
+ { 0x0A722, 0x0A7DC },
46
+ { 0x0A7F5, 0x0A7F6 },
47
+ { 0x0AB53, 0x0AB53 },
48
+ { 0x0AB70, 0x0ABBF },
49
+ { 0x0FB00, 0x0FB17 },
50
+ { 0x0FF21, 0x0FF5A },
51
+ { 0x10400, 0x1044F },
52
+ { 0x104B0, 0x104FB },
53
+ { 0x10570, 0x105BC },
54
+ { 0x10C80, 0x10CF2 },
55
+ { 0x10D50, 0x10D85 },
56
+ { 0x118A0, 0x118DF },
57
+ { 0x16E40, 0x16E7F },
58
+ { 0x16EA0, 0x16ED3 },
59
+ { 0x1E900, 0x1E943 },
60
+ };
61
+
62
+ #define RE_CASED_RANGE_COUNT (sizeof(re_cased_ranges) / sizeof(re_cased_ranges[0]))
63
+
64
+ /* Lowest and highest codepoint covered, so a lookup that cannot hit
65
+ anything costs one comparison. */
66
+ #define RE_CASED_MIN 0x000B5
67
+ #define RE_CASED_MAX 0x1E943
68
+
69
+ /* 2982 cased codepoints in 32 ranges spanning 3291. */
70
+
71
+ #endif /* MRB_RE_CASED_H */