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.
- checksums.yaml +7 -0
- data/LICENSE-mruby.txt +22 -0
- data/LICENSE-spinel.txt +19 -0
- data/LICENSE.txt +21 -0
- data/README.md +61 -0
- data/ext/qr_reader_native/SPINEL_VERSION +1 -0
- data/ext/qr_reader_native/extconf.rb +8 -0
- data/ext/qr_reader_native/mruby/error.h +13 -0
- data/ext/qr_reader_native/mruby/internal.h +145 -0
- data/ext/qr_reader_native/mruby/string.h +22 -0
- data/ext/qr_reader_native/mruby.h +93 -0
- data/ext/qr_reader_native/mruby_shim.h +118 -0
- data/ext/qr_reader_native/qr_reader_native.c +13513 -0
- data/ext/qr_reader_native/qr_reader_native.h +29 -0
- data/ext/qr_reader_native/qr_reader_native_ext.c +598 -0
- data/ext/qr_reader_native/re_cased.h +71 -0
- data/ext/qr_reader_native/re_compile.c +5784 -0
- data/ext/qr_reader_native/re_ctype.h +3540 -0
- data/ext/qr_reader_native/re_exec.c +2190 -0
- data/ext/qr_reader_native/re_internal.h +671 -0
- data/ext/qr_reader_native/re_prop.h +4629 -0
- data/ext/qr_reader_native/re_spinel.c +363 -0
- data/ext/qr_reader_native/re_spinel.h +22 -0
- data/ext/qr_reader_native/re_spinel_utf8.inc +97 -0
- data/ext/qr_reader_native/re_utf8.c +156 -0
- data/ext/qr_reader_native/sp_alloc.c +1447 -0
- data/ext/qr_reader_native/sp_alloc.h +1196 -0
- data/ext/qr_reader_native/sp_argf.h +33 -0
- data/ext/qr_reader_native/sp_array.c +1052 -0
- data/ext/qr_reader_native/sp_array.h +456 -0
- data/ext/qr_reader_native/sp_bigint.c +5826 -0
- data/ext/qr_reader_native/sp_bigint.h +117 -0
- data/ext/qr_reader_native/sp_cold.c +5259 -0
- data/ext/qr_reader_native/sp_compat.h +402 -0
- data/ext/qr_reader_native/sp_core.c +818 -0
- data/ext/qr_reader_native/sp_core.h +56 -0
- data/ext/qr_reader_native/sp_crypto.c +877 -0
- data/ext/qr_reader_native/sp_crypto.h +169 -0
- data/ext/qr_reader_native/sp_dtoa.c +1533 -0
- data/ext/qr_reader_native/sp_dtoa.h +29 -0
- data/ext/qr_reader_native/sp_encoding_names.h +172 -0
- data/ext/qr_reader_native/sp_enum.h +86 -0
- data/ext/qr_reader_native/sp_exc.c +1185 -0
- data/ext/qr_reader_native/sp_exc.h +186 -0
- data/ext/qr_reader_native/sp_exc_ctx.h +56 -0
- data/ext/qr_reader_native/sp_fiber.c +889 -0
- data/ext/qr_reader_native/sp_fiber.h +162 -0
- data/ext/qr_reader_native/sp_fiber_ctx.h +84 -0
- data/ext/qr_reader_native/sp_format.c +695 -0
- data/ext/qr_reader_native/sp_format.h +83 -0
- data/ext/qr_reader_native/sp_gc.c +1793 -0
- data/ext/qr_reader_native/sp_gc.h +762 -0
- data/ext/qr_reader_native/sp_hash.c +131 -0
- data/ext/qr_reader_native/sp_hash.h +131 -0
- data/ext/qr_reader_native/sp_inspect.c +215 -0
- data/ext/qr_reader_native/sp_inspect.h +128 -0
- data/ext/qr_reader_native/sp_io.c +1676 -0
- data/ext/qr_reader_native/sp_io.h +272 -0
- data/ext/qr_reader_native/sp_iobuffer.c +1014 -0
- data/ext/qr_reader_native/sp_iobuffer.h +167 -0
- data/ext/qr_reader_native/sp_marshal.c +487 -0
- data/ext/qr_reader_native/sp_marshal.h +60 -0
- data/ext/qr_reader_native/sp_net.c +1029 -0
- data/ext/qr_reader_native/sp_net.h +205 -0
- data/ext/qr_reader_native/sp_pack.c +1254 -0
- data/ext/qr_reader_native/sp_poly_cold.c +1220 -0
- data/ext/qr_reader_native/sp_proc.c +410 -0
- data/ext/qr_reader_native/sp_proc.h +327 -0
- data/ext/qr_reader_native/sp_process.c +547 -0
- data/ext/qr_reader_native/sp_process_status.c +211 -0
- data/ext/qr_reader_native/sp_process_status.h +66 -0
- data/ext/qr_reader_native/sp_random.c +287 -0
- data/ext/qr_reader_native/sp_random.h +52 -0
- data/ext/qr_reader_native/sp_range.h +144 -0
- data/ext/qr_reader_native/sp_re.c +1379 -0
- data/ext/qr_reader_native/sp_re.h +186 -0
- data/ext/qr_reader_native/sp_re_names.h +59 -0
- data/ext/qr_reader_native/sp_sched.c +4044 -0
- data/ext/qr_reader_native/sp_sched.h +295 -0
- data/ext/qr_reader_native/sp_slab.c +1507 -0
- data/ext/qr_reader_native/sp_str.c +1462 -0
- data/ext/qr_reader_native/sp_str.h +306 -0
- data/ext/qr_reader_native/sp_str_crypt.c +23 -0
- data/ext/qr_reader_native/sp_string.c +92 -0
- data/ext/qr_reader_native/sp_string.h +253 -0
- data/ext/qr_reader_native/sp_system.c +78 -0
- data/ext/qr_reader_native/sp_system.h +18 -0
- data/ext/qr_reader_native/sp_time.c +860 -0
- data/ext/qr_reader_native/sp_time.h +100 -0
- data/ext/qr_reader_native/sp_types.h +292 -0
- data/ext/qr_reader_native/spinel_rt.h +19017 -0
- data/ext/qr_reader_native/unicase.c +399 -0
- data/ext/qr_reader_native/unicase.h +901 -0
- data/lib/qr_reader/native.rb +6 -0
- 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 */
|