/* This file was converted by gperf_fold_key_conv.py from gperf output file. */ /* ANSI-C code produced by gperf version 3.1 */ /* Command-line: gperf -n -C -T -c -t -j1 -L ANSI-C -F,-1 -N onigenc_unicode_fold1_key unicode_fold1_key.gperf */ /* Computed positions: -k'1-3' */ /* This gperf source file was generated by make_unicode_fold_data.py */ /*- * Copyright (c) 2017-2021 K.Kosako * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "regint.h" #define TOTAL_KEYWORDS 1396 #define MIN_WORD_LENGTH 3 #define MAX_WORD_LENGTH 3 #define MIN_HASH_VALUE 4 #define MAX_HASH_VALUE 1868 /* maximum key range = 1865, duplicates = 0 */ #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif /*ARGSUSED*/ static unsigned int hash(OnigCodePoint codes[]) { static const unsigned short asso_values[] = { 4, 2, 15, 124, 1, 9, 1317, 928, 1309, 908, 1306, 248, 91, 245, 1477, 216, 99, 171, 1474, 26, 1301, 885, 1269, 827, 144, 167, 1473, 122, 1469, 745, 0, 27, 1457, 32, 1447, 451, 131, 411, 779, 3, 768, 207, 669, 463, 5, 95, 1030, 198, 763, 149, 1019, 1443, 1011, 1440, 575, 1375, 755, 36, 744, 1079, 1299, 1432, 1288, 1098, 1172, 1423, 909, 1000, 556, 724, 289, 194, 713, 1415, 700, 1364, 687, 1497, 536, 1459, 528, 626, 509, 915, 486, 867, 431, 706, 662, 104, 454, 818, 642, 78, 992, 207, 1280, 102, 1262, 693, 65, 229, 298, 143, 45, 1250, 412, 1404, 402, 1383, 25, 1120, 632, 555, 614, 1368, 337, 29, 327, 1358, 585, 1243, 475, 1352, 242, 871, 958, 218, 775, 556, 1221, 803, 1109, 167, 969, 240, 1233, 174, 1353, 130, 1438, 119, 1198, 6, 1490, 7, 1480, 1869, 1340, 95, 317, 0, 1337, 1869, 955, 66, 162, 178, 275, 57, 645, 268, 675, 371, 947, 29, 17, 6, 937, 346, 1219, 1168, 1211, 123, 1322, 1110, 864, 963, 1159, 740, 810, 613, 1127, 1461, 900, 408, 855, 600, 604, 211, 844, 184, 841, 185, 833, 442, 822, 1404, 803, 1294, 1107, 1104, 1068, 1090, 799, 267, 1066, 1063, 358, 471, 1062, 493, 258, 1055, 596, 1049, 567, 980, 172, 798, 155, 794, 231, 790, 136, 1032, 76, 787, 85, 1057, 124, 1051, 116, 423, 202, 1050, 188, 1308, 394, 1048, 381, 1009, 375, 1203, 732, 996, 366, 424, 441, 345, 58, 306, 1042, 892, 548, 35, 1256, 249, 386 }; return asso_values[(unsigned char)onig_codes_byte_at(codes, 2)+3] + asso_values[(unsigned char)onig_codes_byte_at(codes, 1)] + asso_values[(unsigned char)onig_codes_byte_at(codes, 0)]; } int onigenc_unicode_fold1_key(OnigCodePoint codes[]) { static const short int wordlist[] = { -1, -1, -1, -1, 1906, 1867, 210, 171, 3438, 1927, 3279, 231, 366, 1315, 1276, 3144, 3270, 3699, 1336, 541, 502, 2096, 1135, 387, 559, 703, 2795, 3300, 3696, 2027, 1063, 324, 2240, 27, 2291, 3240, 1612, 49, 1378, 3477, 2243, 916, 1399, 159, 658, 2594, 3087, 1609, 670, 2018, 1054, 315, 4050, 12, 2723, 3231, 4071, 2261, 1360, 1606, 2387, 3648, 2222, 1261, 643, 2453, 3078, 2321, 3678, 2011, 1047, 309, 4032, 0, 2720, 3225, 2372, 3666, 1348, 3576, 2186, 1225, 456, 1029, 637, 2885, 3072, 2702, 3582, 2189, 1228, 459, 4020, 80, 2888, 1879, 2360, 183, 3441, 2984, 2906, 369, 3011, 1885, 1288, 189, 1789, 1041, 2909, 1017, 514, 2714, 1294, 2690, 706, 1795, 2438, 3432, 520, 3594, 2195, 1234, 465, 619, 92, 2951, 2987, 3588, 2192, 1231, 462, 2993, 86, 2891, 3717, 1915, 363, 219, 697, 3570, 2183, 1222, 453, 3420, 1324, 2882, 1807, 2441, 1897, 691, 201, 9, 3453, 1630, 1801, 2237, 1357, 1306, 3558, 2177, 1216, 1579, 2282, 532, 2876, 3348, 1783, 1120, 375, 3861, 4029, 2780, 3285, 3669, 2369, 2276, 2174, 1213, 3867, 1507, 1447, 2873, 3345, 3129, 378, 1771, 682, 1459, 1513, 3672, 2930, 3606, 2201, 1240, 471, 3765, 105, 3519, 2942, 962, 267, 3447, 1765, 2636, 857, 3600, 2198, 1237, 468, 3879, 99, 2543, 1035, 860, 1684, 1690, 2708, 3873, 1819, 1525, 2549, 2975, 4014, 2903, 348, 2339, 631, 1519, 3252, 3855, 3002, 1429, 1813, 3366, 3564, 2180, 1219, 3, 2297, 1501, 2879, 1678, 1351, 2966, 866, 4101, 2048, 1084, 3843, 2417, 71, 2561, 863, 1453, 2483, 1420, 4023, 165, 1489, 2555, 2363, 1777, 2165, 1204, 854, 3837, 2969, 2864, 3342, 4092, 2945, 2537, 1192, 2408, 381, 1483, 2495, 3339, 2474, 3684, 1123, 3891, 4008, 848, 2783, 3288, 3675, 712, 1747, 2432, 2525, 1537, 3516, 1966, 959, 3885, 3132, 1726, 2633, 3180, 845, 3996, 2015, 1050, 312, 1531, 6, 2519, 3228, 3651, 3026, 1354, 785, 792, 147, 2939, 872, 640, 3990, 3075, 2336, 2087, 1111, 2573, 3849, 4026, 2771, 3276, 3363, 2366, 869, 2039, 1075, 336, 1495, 52, 2738, 2567, 3120, 778, 1402, 2036, 1072, 333, 2933, 46, 727, 2927, 3645, -1, 1396, 3819, 1594, 144, 4074, 3351, 667, 3705, 2390, 851, 3798, 1465, 2159, 2456, 4068, -1, 2531, 2858, 2384, 3636, 2216, 1255, 483, 2450, 135, 2900, 1618, 4002, 3624, 2210, 1249, 480, 3690, 123, 3618, 2207, 1246, 477, 1735, 117, 2234, 1273, 499, 2501, 168, 830, 1849, 3612, 2204, 1243, 474, 1600, 111, -1, 3972, 1837, 2024, 1060, 321, 1582, 4215, 1831, 3237, 3951, 405, 1372, 2021, 1057, 318, 3750, 18, 652, 3234, 3084, 1825, 1366, 3597, 3639, 4119, 4044, 4134, 96, 138, 3081, 890, 1990, 1008, 288, 1666, 4038, 2681, 3204, 2285, 2378, 3642, 2219, 1258, 487, 1576, 141, 613, 3807, 3051, 1810, 1852, 718, -1, -1, 1996, 1020, 294, 4173, 2348, 2693, 3210, 715, 3435, -1, 3909, 1567, 3411, 1855, 1696, 622, 3903, 3057, 1198, 429, 1555, 2045, 1081, 342, 2279, 65, 1549, 2354, 839, 3897, 1414, 1597, 1987, 1002, 285, 3423, 887, 2675, 3201, 1543, -1, 432, -1, 1738, 4086, 881, 3960, 607, 2402, 3048, -1, 878, 3005, 2468, 3552, 1984, 996, 282, 3882, 2345, 2669, 3198, 4137, -1, 875, 1744, 2429, 3405, 1528, 1570, 601, -1, 3045, 3546, 1981, 990, 279, 3768, 762, 2663, 3195, 3540, 1978, 984, 276, -1, 1573, 2657, 3192, 598, 3399, 3042, 2999, 3660, 2228, 1267, 493, 595, 156, 3038, 2564, 3510, 1963, 950, 351, 37, 3810, 2627, 3177, 3393, 1387, 1435, 798, 2171, 1210, -1, 4149, 3387, 2870, 3023, 3468, 1942, 906, 243, 4059, 4107, 2585, 3156, 3816, 2330, 3921, 2042, 1078, 339, 2489, 59, 574, 3357, 1462, 1759, 1408, 842, 2168, 1207, -1, 721, 673, 2867, 2312, -1, 2129, 1168, 408, 3756, 4080, 2828, 3318, 3759, 2396, 3963, 2033, 1069, 330, 2462, 40, 4143, 3246, -1, 1753, 1390, 2498, 3549, 1672, 993, 4125, 664, 1675, 2666, 2030, 1066, 327, 3969, 34, 4062, 3243, 1654, -1, 1384, 1999, 1026, 297, -1, 1126, 2699, 3213, 3090, 2786, 3291, 3681, -1, -1, 4056, 3831, 625, 2444, 3060, 709, 3396, 1993, 1014, 291, -1, 1477, 2687, 3207, 1924, -1, 228, 893, -1, -1, 3141, 1129, 3429, 1333, 3054, 2789, 3294, 3687, -1, 556, 3825, 3534, 1975, 977, 2351, -1, -1, 2651, 3189, -1, 1471, 2300, 3417, 2513, 3528, 1972, 971, 592, -1, 3035, 2645, 3186, 1011, 634, 3984, 4212, 2684, 3522, 1969, 965, 589, 4017, 3032, 2639, 3183, 2357, 616, 3381, 3513, 768, 954, 264, 2507, 773, 2630, 3029, 3630, 2213, 1252, -1, 3375, 129, 748, 3978, 586, 2342, 3414, 399, 3480, 1948, 919, 249, 3735, 3369, 2597, 3162, 2333, 1864, -1, 3474, 1945, 913, 246, 1843, 3360, 2591, 3159, 3450, 1933, 3017, 237, 1648, 2423, 1921, 3150, 225, 2324, 1342, -1, 3138, 2054, 1090, 1330, 565, 1918, -1, 222, 2318, 553, 1432, 3135, 3579, -1, 1327, 3567, 676, 77, 450, 3561, 550, 2294, 447, 3555, 4104, 2153, 444, 421, 2420, 2144, 2852, 354, 2288, 2486, 2843, 3333, 2117, 1156, 1441, 1792, 2435, 2816, 1780, 3738, 679, 1023, 1774, 3915, 2141, 2696, 1768, 1723, -1, 2840, 3330, 1705, -1, 1561, 4113, 2138, 1177, 414, 1651, 2426, 2837, 3327, 2981, 2135, 1174, 411, 2132, 1171, 2834, 3324, 1699, 2831, 3321, 3762, -1, 3426, 2273, 2126, 1165, -1, 3020, 1693, 2825, 3315, 3753, 3014, 2111, 1150, 396, 1687, 1005, 2810, 1681, 3726, 2678, 345, 3008, 74, 3864, 3249, -1, 3852, 1423, 1669, 610, 3846, 4131, -1, 1510, 3840, 3795, 1498, 1639, 3657, 3777, 1492, 4095, -1, 153, 1486, 2411, 730, 2123, 1162, 3408, 2477, -1, 2822, 3312, 3747, 3504, 1960, 944, 3771, 2267, -1, 2621, 3174, 999, -1, 2546, -1, 2672, 2534, 2963, 826, 580, 2528, 1663, 806, -1, 2522, 604, -1, 4005, -1, 745, 2255, 3999, 2099, 1138, 390, 3993, 3948, 2798, 3303, 3702, 3930, 802, 2093, 1132, 384, 3402, -1, 2792, 3297, 3693, 2249, 1117, 795, 2051, 1087, 2777, 3282, 3663, 1615, 3924, 789, -1, 1426, 782, 2063, 3729, 357, 3126, 1603, 2747, 3261, -1, 4206, 1450, 765, 2957, 4098, 441, -1, 685, 2414, 3096, 1858, 736, 1642, 2480, 1588, 2002, 1032, 300, 3633, 4164, 2705, 3216, 3507, 132, 947, 261, 2921, -1, 2624, 1762, 628, 3621, 3063, 3462, 1939, 899, 120, 2897, 583, 2579, -1, 3456, 1936, -1, 240, 1846, 2915, 758, 3153, 571, 2327, 1345, 3444, 1930, 3573, 234, -1, 568, 1834, 3147, -1, 2306, 1339, -1, 3654, 2225, 1264, 490, 562, 150, 3615, -1, 3603, 3591, 438, 114, 2894, 102, 89, 3585, 435, 1786, -1, -1, 83, 2162, 1201, 1195, 425, 2156, 2861, 2150, 3834, -1, 2855, -1, 2849, 1828, 1756, 1816, 1804, 3483, 1480, 922, 1750, 724, 1798, 2600, 3918, -1, 739, 1741, 1732, 4128, 1189, 1729, -1, 1717, 1564, 3336, 3495, 3906, 934, 255, -1, -1, 2612, -1, 1186, 417, 2147, 1552, 2060, 1096, 2516, 2846, 577, 2744, 3258, 1720, 3723, 1444, -1, 884, 3858, 3987, -1, 31, 2735, 3093, 2120, 1159, 1381, 1714, 1504, 2819, 1711, 3741, 661, 1636, 3900, 3828, 3888, 3876, 1585, -1, 4053, 3822, 4209, 3870, 1546, 1474, 1534, 1522, 3813, 3804, 1657, 1468, 3801, 1516, 3789, -1, 2114, 1153, -1, -1, 2540, 2813, 4176, 3732, -1, -1, -1, 393, 3498, 1957, 937, 4011, 3711, 4170, 2615, 3171, 3792, 2510, 2570, 2558, -1, 4146, 1645, 2504, 836, 2552, 4122, 833, 3981, 820, 3786, 1624, -1, 3783, 3975, 2075, 1099, 4116, -1, 3627, 2759, 3966, 3957, -1, 126, 3954, -1, 3942, 2105, 1144, 700, 823, 3108, 2804, 3309, 3714, 2102, 1141, 2057, 1093, -1, 2801, 3306, 3708, 3255, 816, 1840, 1438, 813, 3945, 2066, 733, 360, -1, 1627, 2750, 3264, -1, -1, 1456, -1, 4110, 1621, 3939, 62, 2741, 3936, 3099, 752, 1411, 2492, 15, 2726, 2231, 1270, 496, 1363, 162, -1, 2008, 1044, 306, 646, 4083, 2717, 3222, 1894, 2399, 198, -1, 4035, -1, 2465, -1, 2375, 1303, 3069, 2005, 1038, 303, 742, 529, 2711, 3219, 3492, 1954, 931, -1, -1, 3912, 2609, 3168, 1183, 2270, 3066, 3486, 1951, 925, 1891, 1558, 195, 2603, 3165, 1876, 3609, 180, 1873, 1300, 177, 108, -1, -1, 1285, 526, 1870, 1282, 174, 1708, 511, 2108, 1147, 508, -1, 1279, 2807, 2264, 3720, 4200, -1, 505, 2258, 1822, -1, 2252, 2090, 1114, 372, 2084, 1108, 2774, -1, 2246, 2768, 3273, -1, 1633, -1, -1, -1, -1, 2069, 3123, 1591, 68, 3117, 2753, 3267, -1, 1417, 56, 3531, 2960, 974, 273, 1405, 688, 2648, 3102, -1, 43, -1, 3471, 4089, 909, 1393, -1, 2405, 2588, 4077, -1, 3780, 2471, 2393, -1, 24, 2732, -1, 2459, 4065, 1375, -1, -1, 2381, 2954, 3894, 655, 3378, 2447, 2924, 2315, -1, 2918, 1180, 4047, 1540, 21, 2729, -1, -1, 2912, 1369, 3525, -1, 968, 270, 810, 649, 2642, 4203, 3501, -1, 940, 258, -1, 4041, 2618, -1, 1702, 3489, 4158, 928, 252, -1, 3933, 2606, 2072, 3465, 4152, 902, 3459, 2756, 896, 2582, -1, 1912, 2576, 216, 3372, 4140, -1, 694, -1, 3105, 1321, 1909, 3543, 213, 987, -1, 547, 402, 2660, -1, 1318, 2309, 3744, 1903, 2303, 207, 544, 1900, 1888, 204, 192, 1882, 1312, 186, 2081, 1105, 1309, 1297, 538, 2765, 1291, 1660, 535, 523, 2078, 1102, 517, 3774, 3390, 2762, 3537, 3114, 980, -1, 4179, -1, 2654, -1, -1, -1, -1, 3111, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4191, 1861, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3384, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2996, -1, -1, -1, 3927, -1, -1, -1, -1, -1, 2990, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2978, -1, -1, -1, 2972, 2948, -1, -1, 2936, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 755, -1, -1, -1, -1, -1, -1, -1, 4194, -1, -1, -1, -1, -1, 3354, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4188, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4182, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4167, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4197, -1, -1, -1, -1, -1, -1, -1, -1, 4185, -1, -1, -1, -1, -1, -1, -1, 4161, -1, -1, 4155 }; { int key = hash(codes); if (key <= MAX_HASH_VALUE) { int index = wordlist[key]; if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds1 + index, 1) == 0) return index; } } return -1; }