diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/CORE')
59 files changed, 16342 insertions, 4168 deletions
diff --git a/Master/tlpkg/tlperl/lib/CORE/XSUB.h b/Master/tlpkg/tlperl/lib/CORE/XSUB.h index e5614fb8457..187919158cc 100644 --- a/Master/tlpkg/tlperl/lib/CORE/XSUB.h +++ b/Master/tlpkg/tlperl/lib/CORE/XSUB.h @@ -22,7 +22,7 @@ class name for a C++ XS constructor. This is always a C<char*>. See C<THIS>. =for apidoc Amn|(whatever)|RETVAL Variable which is setup by C<xsubpp> to hold the return value for an -XSUB. This is always the proper type for the XSUB. See +XSUB. This is always the proper type for the XSUB. See L<perlxs/"The RETVAL Variable">. =for apidoc Amn|(whatever)|THIS @@ -48,7 +48,7 @@ Used to access elements on the XSUB's stack. =for apidoc AmU||XS Macro to declare an XSUB and its C parameter list. This is handled by -C<xsubpp>. It is the same as using the more explicit XS_EXTERNAL macro. +C<xsubpp>. It is the same as using the more explicit XS_EXTERNAL macro. =for apidoc AmU||XS_INTERNAL Macro to declare an XSUB and its C parameter list without exporting the symbols. @@ -80,12 +80,12 @@ Sets up the C<ix> variable for an XSUB which has aliases. This is usually handled automatically by C<xsubpp>. =for apidoc Ams||dUNDERBAR -Sets up any variable needed by the C<UNDERBAR> macro. It used to define -C<padoff_du>, but it is currently a noop. However, it is strongly advised +Sets up any variable needed by the C<UNDERBAR> macro. It used to define +C<padoff_du>, but it is currently a noop. However, it is strongly advised to still use it for ensuring past and future compatibility. =for apidoc AmU||UNDERBAR -The SV* corresponding to the $_ variable. Works even if there +The SV* corresponding to the $_ variable. Works even if there is a lexical $_ in scope. =cut diff --git a/Master/tlpkg/tlperl/lib/CORE/av.h b/Master/tlpkg/tlperl/lib/CORE/av.h index 391ae36d742..e15ebe69e43 100644 --- a/Master/tlpkg/tlperl/lib/CORE/av.h +++ b/Master/tlpkg/tlperl/lib/CORE/av.h @@ -73,6 +73,9 @@ Same as C<av_top_index()>. #define AvREIFY_on(av) (SvFLAGS(av) |= SVpav_REIFY) #define AvREIFY_off(av) (SvFLAGS(av) &= ~SVpav_REIFY) #define AvREIFY_only(av) (AvREAL_off(av), SvFLAGS(av) |= SVpav_REIFY) +#define AvPAD_NAMELIST(av) (SvFLAGS(av) & SVpad_NAMELIST) +#define AvPAD_NAMELIST_on(av) (SvFLAGS(av) |= SVpad_NAMELIST) + #define AvREALISH(av) (SvFLAGS(av) & (SVpav_REAL|SVpav_REIFY)) diff --git a/Master/tlpkg/tlperl/lib/CORE/charclass_invlists.h b/Master/tlpkg/tlperl/lib/CORE/charclass_invlists.h index b5d71afb16d..7bc14d88d0f 100644 --- a/Master/tlpkg/tlperl/lib/CORE/charclass_invlists.h +++ b/Master/tlpkg/tlperl/lib/CORE/charclass_invlists.h @@ -9,28 +9,25 @@ #ifndef PERL_IN_XSUB_RE -static UV Latin1_invlist[] = { +static const UV Latin1_invlist[] = { 2, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 0, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 256, - 0 + 148565664, /* Version and data structure type */ + 0, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, + 256 }; #endif #ifndef PERL_IN_XSUB_RE -static UV AboveLatin1_invlist[] = { - 1, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV AboveLatin1_invlist[] = { + 2, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 256 }; @@ -38,28 +35,25 @@ static UV AboveLatin1_invlist[] = { #ifndef PERL_IN_XSUB_RE -static UV ASCII_invlist[] = { +static const UV ASCII_invlist[] = { 2, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 0, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 128, - 0 + 148565664, /* Version and data structure type */ + 0, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, + 128 }; #endif #ifndef PERL_IN_XSUB_RE -static UV L1Cased_invlist[] = { - 16, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV Cased_invlist[] = { + 239, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 65, 91, 97, @@ -75,20 +69,241 @@ static UV L1Cased_invlist[] = { 216, 247, 248, - 443 + 443, + 444, + 448, + 452, + 660, + 661, + 697, + 704, + 706, + 736, + 741, + 837, + 838, + 880, + 884, + 886, + 888, + 890, + 894, + 902, + 903, + 904, + 907, + 908, + 909, + 910, + 930, + 931, + 1014, + 1015, + 1154, + 1162, + 1320, + 1329, + 1367, + 1377, + 1416, + 4256, + 4294, + 4295, + 4296, + 4301, + 4302, + 7424, + 7616, + 7680, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8125, + 8126, + 8127, + 8130, + 8133, + 8134, + 8141, + 8144, + 8148, + 8150, + 8156, + 8160, + 8173, + 8178, + 8181, + 8182, + 8189, + 8305, + 8306, + 8319, + 8320, + 8336, + 8349, + 8450, + 8451, + 8455, + 8456, + 8458, + 8468, + 8469, + 8470, + 8473, + 8478, + 8484, + 8485, + 8486, + 8487, + 8488, + 8489, + 8490, + 8494, + 8495, + 8501, + 8505, + 8506, + 8508, + 8512, + 8517, + 8522, + 8526, + 8527, + 8544, + 8576, + 8579, + 8581, + 9398, + 9450, + 11264, + 11311, + 11312, + 11359, + 11360, + 11493, + 11499, + 11503, + 11506, + 11508, + 11520, + 11558, + 11559, + 11560, + 11565, + 11566, + 42560, + 42606, + 42624, + 42648, + 42786, + 42888, + 42891, + 42895, + 42896, + 42900, + 42912, + 42923, + 43000, + 43003, + 64256, + 64263, + 64275, + 64280, + 65313, + 65339, + 65345, + 65371, + 66560, + 66640, + 119808, + 119893, + 119894, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120094, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120146, + 120486, + 120488, + 120513, + 120514, + 120539, + 120540, + 120571, + 120572, + 120597, + 120598, + 120629, + 120630, + 120655, + 120656, + 120687, + 120688, + 120713, + 120714, + 120745, + 120746, + 120771, + 120772, + 120780 }; #endif #ifndef PERL_IN_XSUB_RE -static UV VertSpace_invlist[] = { - 6, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV VertSpace_invlist[] = { + 7, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 10, 14, 133, @@ -101,30 +316,12 @@ static UV VertSpace_invlist[] = { #ifndef PERL_IN_XSUB_RE -static UV PerlSpace_invlist[] = { - 4, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 9, - 14, - 32, - 33 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV XPerlSpace_invlist[] = { - 22, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPerlSpace_invlist[] = { + 21, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 9, 14, 32, @@ -135,8 +332,6 @@ static UV XPerlSpace_invlist[] = { 161, 5760, 5761, - 6158, - 6159, 8192, 8203, 8232, @@ -153,32 +348,12 @@ static UV XPerlSpace_invlist[] = { #ifndef PERL_IN_XSUB_RE -static UV PosixAlnum_invlist[] = { - 6, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 48, - 58, - 65, - 91, - 97, - 123 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV L1PosixAlnum_invlist[] = { - 18, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixAlnum_invlist[] = { + 1133, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 48, 58, 65, @@ -196,37 +371,1133 @@ static UV L1PosixAlnum_invlist[] = { 216, 247, 248, - 706 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixAlpha_invlist[] = { - 4, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 65, - 91, - 97, - 123 + 706, + 710, + 722, + 736, + 741, + 748, + 749, + 750, + 751, + 837, + 838, + 880, + 885, + 886, + 888, + 890, + 894, + 902, + 903, + 904, + 907, + 908, + 909, + 910, + 930, + 931, + 1014, + 1015, + 1154, + 1162, + 1320, + 1329, + 1367, + 1369, + 1370, + 1377, + 1416, + 1456, + 1470, + 1471, + 1472, + 1473, + 1475, + 1476, + 1478, + 1479, + 1480, + 1488, + 1515, + 1520, + 1523, + 1552, + 1563, + 1568, + 1624, + 1625, + 1642, + 1646, + 1748, + 1749, + 1757, + 1761, + 1769, + 1773, + 1789, + 1791, + 1792, + 1808, + 1856, + 1869, + 1970, + 1984, + 2027, + 2036, + 2038, + 2042, + 2043, + 2048, + 2072, + 2074, + 2093, + 2112, + 2137, + 2208, + 2209, + 2210, + 2221, + 2276, + 2282, + 2288, + 2303, + 2304, + 2364, + 2365, + 2381, + 2382, + 2385, + 2389, + 2404, + 2406, + 2416, + 2417, + 2424, + 2425, + 2432, + 2433, + 2436, + 2437, + 2445, + 2447, + 2449, + 2451, + 2473, + 2474, + 2481, + 2482, + 2483, + 2486, + 2490, + 2493, + 2501, + 2503, + 2505, + 2507, + 2509, + 2510, + 2511, + 2519, + 2520, + 2524, + 2526, + 2527, + 2532, + 2534, + 2546, + 2561, + 2564, + 2565, + 2571, + 2575, + 2577, + 2579, + 2601, + 2602, + 2609, + 2610, + 2612, + 2613, + 2615, + 2616, + 2618, + 2622, + 2627, + 2631, + 2633, + 2635, + 2637, + 2641, + 2642, + 2649, + 2653, + 2654, + 2655, + 2662, + 2678, + 2689, + 2692, + 2693, + 2702, + 2703, + 2706, + 2707, + 2729, + 2730, + 2737, + 2738, + 2740, + 2741, + 2746, + 2749, + 2758, + 2759, + 2762, + 2763, + 2765, + 2768, + 2769, + 2784, + 2788, + 2790, + 2800, + 2817, + 2820, + 2821, + 2829, + 2831, + 2833, + 2835, + 2857, + 2858, + 2865, + 2866, + 2868, + 2869, + 2874, + 2877, + 2885, + 2887, + 2889, + 2891, + 2893, + 2902, + 2904, + 2908, + 2910, + 2911, + 2916, + 2918, + 2928, + 2929, + 2930, + 2946, + 2948, + 2949, + 2955, + 2958, + 2961, + 2962, + 2966, + 2969, + 2971, + 2972, + 2973, + 2974, + 2976, + 2979, + 2981, + 2984, + 2987, + 2990, + 3002, + 3006, + 3011, + 3014, + 3017, + 3018, + 3021, + 3024, + 3025, + 3031, + 3032, + 3046, + 3056, + 3073, + 3076, + 3077, + 3085, + 3086, + 3089, + 3090, + 3113, + 3114, + 3124, + 3125, + 3130, + 3133, + 3141, + 3142, + 3145, + 3146, + 3149, + 3157, + 3159, + 3160, + 3162, + 3168, + 3172, + 3174, + 3184, + 3202, + 3204, + 3205, + 3213, + 3214, + 3217, + 3218, + 3241, + 3242, + 3252, + 3253, + 3258, + 3261, + 3269, + 3270, + 3273, + 3274, + 3277, + 3285, + 3287, + 3294, + 3295, + 3296, + 3300, + 3302, + 3312, + 3313, + 3315, + 3330, + 3332, + 3333, + 3341, + 3342, + 3345, + 3346, + 3387, + 3389, + 3397, + 3398, + 3401, + 3402, + 3405, + 3406, + 3407, + 3415, + 3416, + 3424, + 3428, + 3430, + 3440, + 3450, + 3456, + 3458, + 3460, + 3461, + 3479, + 3482, + 3506, + 3507, + 3516, + 3517, + 3518, + 3520, + 3527, + 3535, + 3541, + 3542, + 3543, + 3544, + 3552, + 3570, + 3572, + 3585, + 3643, + 3648, + 3655, + 3661, + 3662, + 3664, + 3674, + 3713, + 3715, + 3716, + 3717, + 3719, + 3721, + 3722, + 3723, + 3725, + 3726, + 3732, + 3736, + 3737, + 3744, + 3745, + 3748, + 3749, + 3750, + 3751, + 3752, + 3754, + 3756, + 3757, + 3770, + 3771, + 3774, + 3776, + 3781, + 3782, + 3783, + 3789, + 3790, + 3792, + 3802, + 3804, + 3808, + 3840, + 3841, + 3872, + 3882, + 3904, + 3912, + 3913, + 3949, + 3953, + 3970, + 3976, + 3992, + 3993, + 4029, + 4096, + 4151, + 4152, + 4153, + 4155, + 4170, + 4176, + 4195, + 4197, + 4201, + 4206, + 4231, + 4238, + 4239, + 4240, + 4250, + 4252, + 4254, + 4256, + 4294, + 4295, + 4296, + 4301, + 4302, + 4304, + 4347, + 4348, + 4681, + 4682, + 4686, + 4688, + 4695, + 4696, + 4697, + 4698, + 4702, + 4704, + 4745, + 4746, + 4750, + 4752, + 4785, + 4786, + 4790, + 4792, + 4799, + 4800, + 4801, + 4802, + 4806, + 4808, + 4823, + 4824, + 4881, + 4882, + 4886, + 4888, + 4955, + 4959, + 4960, + 4992, + 5008, + 5024, + 5109, + 5121, + 5741, + 5743, + 5760, + 5761, + 5787, + 5792, + 5867, + 5870, + 5873, + 5888, + 5901, + 5902, + 5908, + 5920, + 5940, + 5952, + 5972, + 5984, + 5997, + 5998, + 6001, + 6002, + 6004, + 6016, + 6068, + 6070, + 6089, + 6103, + 6104, + 6108, + 6109, + 6112, + 6122, + 6160, + 6170, + 6176, + 6264, + 6272, + 6315, + 6320, + 6390, + 6400, + 6429, + 6432, + 6444, + 6448, + 6457, + 6470, + 6510, + 6512, + 6517, + 6528, + 6572, + 6576, + 6602, + 6608, + 6618, + 6656, + 6684, + 6688, + 6751, + 6753, + 6773, + 6784, + 6794, + 6800, + 6810, + 6823, + 6824, + 6912, + 6964, + 6965, + 6980, + 6981, + 6988, + 6992, + 7002, + 7040, + 7082, + 7084, + 7142, + 7143, + 7154, + 7168, + 7222, + 7232, + 7242, + 7245, + 7294, + 7401, + 7405, + 7406, + 7412, + 7413, + 7415, + 7424, + 7616, + 7680, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8125, + 8126, + 8127, + 8130, + 8133, + 8134, + 8141, + 8144, + 8148, + 8150, + 8156, + 8160, + 8173, + 8178, + 8181, + 8182, + 8189, + 8305, + 8306, + 8319, + 8320, + 8336, + 8349, + 8450, + 8451, + 8455, + 8456, + 8458, + 8468, + 8469, + 8470, + 8473, + 8478, + 8484, + 8485, + 8486, + 8487, + 8488, + 8489, + 8490, + 8494, + 8495, + 8506, + 8508, + 8512, + 8517, + 8522, + 8526, + 8527, + 8544, + 8585, + 9398, + 9450, + 11264, + 11311, + 11312, + 11359, + 11360, + 11493, + 11499, + 11503, + 11506, + 11508, + 11520, + 11558, + 11559, + 11560, + 11565, + 11566, + 11568, + 11624, + 11631, + 11632, + 11648, + 11671, + 11680, + 11687, + 11688, + 11695, + 11696, + 11703, + 11704, + 11711, + 11712, + 11719, + 11720, + 11727, + 11728, + 11735, + 11736, + 11743, + 11744, + 11776, + 11823, + 11824, + 12293, + 12296, + 12321, + 12330, + 12337, + 12342, + 12344, + 12349, + 12353, + 12439, + 12445, + 12448, + 12449, + 12539, + 12540, + 12544, + 12549, + 12590, + 12593, + 12687, + 12704, + 12731, + 12784, + 12800, + 13312, + 19894, + 19968, + 40909, + 40960, + 42125, + 42192, + 42238, + 42240, + 42509, + 42512, + 42540, + 42560, + 42607, + 42612, + 42620, + 42623, + 42648, + 42655, + 42736, + 42775, + 42784, + 42786, + 42889, + 42891, + 42895, + 42896, + 42900, + 42912, + 42923, + 43000, + 43010, + 43011, + 43014, + 43015, + 43019, + 43020, + 43048, + 43072, + 43124, + 43136, + 43204, + 43216, + 43226, + 43250, + 43256, + 43259, + 43260, + 43264, + 43307, + 43312, + 43347, + 43360, + 43389, + 43392, + 43443, + 43444, + 43456, + 43471, + 43482, + 43520, + 43575, + 43584, + 43598, + 43600, + 43610, + 43616, + 43639, + 43642, + 43643, + 43648, + 43711, + 43712, + 43713, + 43714, + 43715, + 43739, + 43742, + 43744, + 43760, + 43762, + 43766, + 43777, + 43783, + 43785, + 43791, + 43793, + 43799, + 43808, + 43815, + 43816, + 43823, + 43968, + 44011, + 44016, + 44026, + 44032, + 55204, + 55216, + 55239, + 55243, + 55292, + 63744, + 64110, + 64112, + 64218, + 64256, + 64263, + 64275, + 64280, + 64285, + 64297, + 64298, + 64311, + 64312, + 64317, + 64318, + 64319, + 64320, + 64322, + 64323, + 64325, + 64326, + 64434, + 64467, + 64830, + 64848, + 64912, + 64914, + 64968, + 65008, + 65020, + 65136, + 65141, + 65142, + 65277, + 65296, + 65306, + 65313, + 65339, + 65345, + 65371, + 65382, + 65471, + 65474, + 65480, + 65482, + 65488, + 65490, + 65496, + 65498, + 65501, + 65536, + 65548, + 65549, + 65575, + 65576, + 65595, + 65596, + 65598, + 65599, + 65614, + 65616, + 65630, + 65664, + 65787, + 65856, + 65909, + 66176, + 66205, + 66208, + 66257, + 66304, + 66335, + 66352, + 66379, + 66432, + 66462, + 66464, + 66500, + 66504, + 66512, + 66513, + 66518, + 66560, + 66718, + 66720, + 66730, + 67584, + 67590, + 67592, + 67593, + 67594, + 67638, + 67639, + 67641, + 67644, + 67645, + 67647, + 67670, + 67840, + 67862, + 67872, + 67898, + 67968, + 68024, + 68030, + 68032, + 68096, + 68100, + 68101, + 68103, + 68108, + 68116, + 68117, + 68120, + 68121, + 68148, + 68192, + 68221, + 68352, + 68406, + 68416, + 68438, + 68448, + 68467, + 68608, + 68681, + 69632, + 69702, + 69734, + 69744, + 69762, + 69817, + 69840, + 69865, + 69872, + 69882, + 69888, + 69939, + 69942, + 69952, + 70016, + 70080, + 70081, + 70085, + 70096, + 70106, + 71296, + 71350, + 71360, + 71370, + 73728, + 74607, + 74752, + 74851, + 77824, + 78895, + 92160, + 92729, + 93952, + 94021, + 94032, + 94079, + 94099, + 94112, + 110592, + 110594, + 119808, + 119893, + 119894, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120094, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120146, + 120486, + 120488, + 120513, + 120514, + 120539, + 120540, + 120571, + 120572, + 120597, + 120598, + 120629, + 120630, + 120655, + 120656, + 120687, + 120688, + 120713, + 120714, + 120745, + 120746, + 120771, + 120772, + 120780, + 120782, + 120832, + 126464, + 126468, + 126469, + 126496, + 126497, + 126499, + 126500, + 126501, + 126503, + 126504, + 126505, + 126515, + 126516, + 126520, + 126521, + 126522, + 126523, + 126524, + 126530, + 126531, + 126535, + 126536, + 126537, + 126538, + 126539, + 126540, + 126541, + 126544, + 126545, + 126547, + 126548, + 126549, + 126551, + 126552, + 126553, + 126554, + 126555, + 126556, + 126557, + 126558, + 126559, + 126560, + 126561, + 126563, + 126564, + 126565, + 126567, + 126571, + 126572, + 126579, + 126580, + 126584, + 126585, + 126589, + 126590, + 126591, + 126592, + 126602, + 126603, + 126620, + 126625, + 126628, + 126629, + 126634, + 126635, + 126652, + 131072, + 173783, + 173824, + 177973, + 177984, + 178206, + 194560, + 195102 }; #endif #ifndef PERL_IN_XSUB_RE -static UV L1PosixAlpha_invlist[] = { - 16, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixAlpha_invlist[] = { + 1081, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 65, 91, 97, @@ -242,37 +1513,1083 @@ static UV L1PosixAlpha_invlist[] = { 216, 247, 248, - 706 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixBlank_invlist[] = { - 4, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 9, - 10, - 32, - 33 + 706, + 710, + 722, + 736, + 741, + 748, + 749, + 750, + 751, + 837, + 838, + 880, + 885, + 886, + 888, + 890, + 894, + 902, + 903, + 904, + 907, + 908, + 909, + 910, + 930, + 931, + 1014, + 1015, + 1154, + 1162, + 1320, + 1329, + 1367, + 1369, + 1370, + 1377, + 1416, + 1456, + 1470, + 1471, + 1472, + 1473, + 1475, + 1476, + 1478, + 1479, + 1480, + 1488, + 1515, + 1520, + 1523, + 1552, + 1563, + 1568, + 1624, + 1625, + 1632, + 1646, + 1748, + 1749, + 1757, + 1761, + 1769, + 1773, + 1776, + 1786, + 1789, + 1791, + 1792, + 1808, + 1856, + 1869, + 1970, + 1994, + 2027, + 2036, + 2038, + 2042, + 2043, + 2048, + 2072, + 2074, + 2093, + 2112, + 2137, + 2208, + 2209, + 2210, + 2221, + 2276, + 2282, + 2288, + 2303, + 2304, + 2364, + 2365, + 2381, + 2382, + 2385, + 2389, + 2404, + 2417, + 2424, + 2425, + 2432, + 2433, + 2436, + 2437, + 2445, + 2447, + 2449, + 2451, + 2473, + 2474, + 2481, + 2482, + 2483, + 2486, + 2490, + 2493, + 2501, + 2503, + 2505, + 2507, + 2509, + 2510, + 2511, + 2519, + 2520, + 2524, + 2526, + 2527, + 2532, + 2544, + 2546, + 2561, + 2564, + 2565, + 2571, + 2575, + 2577, + 2579, + 2601, + 2602, + 2609, + 2610, + 2612, + 2613, + 2615, + 2616, + 2618, + 2622, + 2627, + 2631, + 2633, + 2635, + 2637, + 2641, + 2642, + 2649, + 2653, + 2654, + 2655, + 2672, + 2678, + 2689, + 2692, + 2693, + 2702, + 2703, + 2706, + 2707, + 2729, + 2730, + 2737, + 2738, + 2740, + 2741, + 2746, + 2749, + 2758, + 2759, + 2762, + 2763, + 2765, + 2768, + 2769, + 2784, + 2788, + 2817, + 2820, + 2821, + 2829, + 2831, + 2833, + 2835, + 2857, + 2858, + 2865, + 2866, + 2868, + 2869, + 2874, + 2877, + 2885, + 2887, + 2889, + 2891, + 2893, + 2902, + 2904, + 2908, + 2910, + 2911, + 2916, + 2929, + 2930, + 2946, + 2948, + 2949, + 2955, + 2958, + 2961, + 2962, + 2966, + 2969, + 2971, + 2972, + 2973, + 2974, + 2976, + 2979, + 2981, + 2984, + 2987, + 2990, + 3002, + 3006, + 3011, + 3014, + 3017, + 3018, + 3021, + 3024, + 3025, + 3031, + 3032, + 3073, + 3076, + 3077, + 3085, + 3086, + 3089, + 3090, + 3113, + 3114, + 3124, + 3125, + 3130, + 3133, + 3141, + 3142, + 3145, + 3146, + 3149, + 3157, + 3159, + 3160, + 3162, + 3168, + 3172, + 3202, + 3204, + 3205, + 3213, + 3214, + 3217, + 3218, + 3241, + 3242, + 3252, + 3253, + 3258, + 3261, + 3269, + 3270, + 3273, + 3274, + 3277, + 3285, + 3287, + 3294, + 3295, + 3296, + 3300, + 3313, + 3315, + 3330, + 3332, + 3333, + 3341, + 3342, + 3345, + 3346, + 3387, + 3389, + 3397, + 3398, + 3401, + 3402, + 3405, + 3406, + 3407, + 3415, + 3416, + 3424, + 3428, + 3450, + 3456, + 3458, + 3460, + 3461, + 3479, + 3482, + 3506, + 3507, + 3516, + 3517, + 3518, + 3520, + 3527, + 3535, + 3541, + 3542, + 3543, + 3544, + 3552, + 3570, + 3572, + 3585, + 3643, + 3648, + 3655, + 3661, + 3662, + 3713, + 3715, + 3716, + 3717, + 3719, + 3721, + 3722, + 3723, + 3725, + 3726, + 3732, + 3736, + 3737, + 3744, + 3745, + 3748, + 3749, + 3750, + 3751, + 3752, + 3754, + 3756, + 3757, + 3770, + 3771, + 3774, + 3776, + 3781, + 3782, + 3783, + 3789, + 3790, + 3804, + 3808, + 3840, + 3841, + 3904, + 3912, + 3913, + 3949, + 3953, + 3970, + 3976, + 3992, + 3993, + 4029, + 4096, + 4151, + 4152, + 4153, + 4155, + 4160, + 4176, + 4195, + 4197, + 4201, + 4206, + 4231, + 4238, + 4239, + 4252, + 4254, + 4256, + 4294, + 4295, + 4296, + 4301, + 4302, + 4304, + 4347, + 4348, + 4681, + 4682, + 4686, + 4688, + 4695, + 4696, + 4697, + 4698, + 4702, + 4704, + 4745, + 4746, + 4750, + 4752, + 4785, + 4786, + 4790, + 4792, + 4799, + 4800, + 4801, + 4802, + 4806, + 4808, + 4823, + 4824, + 4881, + 4882, + 4886, + 4888, + 4955, + 4959, + 4960, + 4992, + 5008, + 5024, + 5109, + 5121, + 5741, + 5743, + 5760, + 5761, + 5787, + 5792, + 5867, + 5870, + 5873, + 5888, + 5901, + 5902, + 5908, + 5920, + 5940, + 5952, + 5972, + 5984, + 5997, + 5998, + 6001, + 6002, + 6004, + 6016, + 6068, + 6070, + 6089, + 6103, + 6104, + 6108, + 6109, + 6176, + 6264, + 6272, + 6315, + 6320, + 6390, + 6400, + 6429, + 6432, + 6444, + 6448, + 6457, + 6480, + 6510, + 6512, + 6517, + 6528, + 6572, + 6576, + 6602, + 6656, + 6684, + 6688, + 6751, + 6753, + 6773, + 6823, + 6824, + 6912, + 6964, + 6965, + 6980, + 6981, + 6988, + 7040, + 7082, + 7084, + 7088, + 7098, + 7142, + 7143, + 7154, + 7168, + 7222, + 7245, + 7248, + 7258, + 7294, + 7401, + 7405, + 7406, + 7412, + 7413, + 7415, + 7424, + 7616, + 7680, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8125, + 8126, + 8127, + 8130, + 8133, + 8134, + 8141, + 8144, + 8148, + 8150, + 8156, + 8160, + 8173, + 8178, + 8181, + 8182, + 8189, + 8305, + 8306, + 8319, + 8320, + 8336, + 8349, + 8450, + 8451, + 8455, + 8456, + 8458, + 8468, + 8469, + 8470, + 8473, + 8478, + 8484, + 8485, + 8486, + 8487, + 8488, + 8489, + 8490, + 8494, + 8495, + 8506, + 8508, + 8512, + 8517, + 8522, + 8526, + 8527, + 8544, + 8585, + 9398, + 9450, + 11264, + 11311, + 11312, + 11359, + 11360, + 11493, + 11499, + 11503, + 11506, + 11508, + 11520, + 11558, + 11559, + 11560, + 11565, + 11566, + 11568, + 11624, + 11631, + 11632, + 11648, + 11671, + 11680, + 11687, + 11688, + 11695, + 11696, + 11703, + 11704, + 11711, + 11712, + 11719, + 11720, + 11727, + 11728, + 11735, + 11736, + 11743, + 11744, + 11776, + 11823, + 11824, + 12293, + 12296, + 12321, + 12330, + 12337, + 12342, + 12344, + 12349, + 12353, + 12439, + 12445, + 12448, + 12449, + 12539, + 12540, + 12544, + 12549, + 12590, + 12593, + 12687, + 12704, + 12731, + 12784, + 12800, + 13312, + 19894, + 19968, + 40909, + 40960, + 42125, + 42192, + 42238, + 42240, + 42509, + 42512, + 42528, + 42538, + 42540, + 42560, + 42607, + 42612, + 42620, + 42623, + 42648, + 42655, + 42736, + 42775, + 42784, + 42786, + 42889, + 42891, + 42895, + 42896, + 42900, + 42912, + 42923, + 43000, + 43010, + 43011, + 43014, + 43015, + 43019, + 43020, + 43048, + 43072, + 43124, + 43136, + 43204, + 43250, + 43256, + 43259, + 43260, + 43274, + 43307, + 43312, + 43347, + 43360, + 43389, + 43392, + 43443, + 43444, + 43456, + 43471, + 43472, + 43520, + 43575, + 43584, + 43598, + 43616, + 43639, + 43642, + 43643, + 43648, + 43711, + 43712, + 43713, + 43714, + 43715, + 43739, + 43742, + 43744, + 43760, + 43762, + 43766, + 43777, + 43783, + 43785, + 43791, + 43793, + 43799, + 43808, + 43815, + 43816, + 43823, + 43968, + 44011, + 44032, + 55204, + 55216, + 55239, + 55243, + 55292, + 63744, + 64110, + 64112, + 64218, + 64256, + 64263, + 64275, + 64280, + 64285, + 64297, + 64298, + 64311, + 64312, + 64317, + 64318, + 64319, + 64320, + 64322, + 64323, + 64325, + 64326, + 64434, + 64467, + 64830, + 64848, + 64912, + 64914, + 64968, + 65008, + 65020, + 65136, + 65141, + 65142, + 65277, + 65313, + 65339, + 65345, + 65371, + 65382, + 65471, + 65474, + 65480, + 65482, + 65488, + 65490, + 65496, + 65498, + 65501, + 65536, + 65548, + 65549, + 65575, + 65576, + 65595, + 65596, + 65598, + 65599, + 65614, + 65616, + 65630, + 65664, + 65787, + 65856, + 65909, + 66176, + 66205, + 66208, + 66257, + 66304, + 66335, + 66352, + 66379, + 66432, + 66462, + 66464, + 66500, + 66504, + 66512, + 66513, + 66518, + 66560, + 66718, + 67584, + 67590, + 67592, + 67593, + 67594, + 67638, + 67639, + 67641, + 67644, + 67645, + 67647, + 67670, + 67840, + 67862, + 67872, + 67898, + 67968, + 68024, + 68030, + 68032, + 68096, + 68100, + 68101, + 68103, + 68108, + 68116, + 68117, + 68120, + 68121, + 68148, + 68192, + 68221, + 68352, + 68406, + 68416, + 68438, + 68448, + 68467, + 68608, + 68681, + 69632, + 69702, + 69762, + 69817, + 69840, + 69865, + 69888, + 69939, + 70016, + 70080, + 70081, + 70085, + 71296, + 71350, + 73728, + 74607, + 74752, + 74851, + 77824, + 78895, + 92160, + 92729, + 93952, + 94021, + 94032, + 94079, + 94099, + 94112, + 110592, + 110594, + 119808, + 119893, + 119894, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120094, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120146, + 120486, + 120488, + 120513, + 120514, + 120539, + 120540, + 120571, + 120572, + 120597, + 120598, + 120629, + 120630, + 120655, + 120656, + 120687, + 120688, + 120713, + 120714, + 120745, + 120746, + 120771, + 120772, + 120780, + 126464, + 126468, + 126469, + 126496, + 126497, + 126499, + 126500, + 126501, + 126503, + 126504, + 126505, + 126515, + 126516, + 126520, + 126521, + 126522, + 126523, + 126524, + 126530, + 126531, + 126535, + 126536, + 126537, + 126538, + 126539, + 126540, + 126541, + 126544, + 126545, + 126547, + 126548, + 126549, + 126551, + 126552, + 126553, + 126554, + 126555, + 126556, + 126557, + 126558, + 126559, + 126560, + 126561, + 126563, + 126564, + 126565, + 126567, + 126571, + 126572, + 126579, + 126580, + 126584, + 126585, + 126589, + 126590, + 126591, + 126592, + 126602, + 126603, + 126620, + 126625, + 126628, + 126629, + 126634, + 126635, + 126652, + 131072, + 173783, + 173824, + 177973, + 177984, + 178206, + 194560, + 195102 }; #endif #ifndef PERL_IN_XSUB_RE -static UV XPosixBlank_invlist[] = { - 18, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixBlank_invlist[] = { + 17, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 9, 10, 32, @@ -281,8 +2598,6 @@ static UV XPosixBlank_invlist[] = { 161, 5760, 5761, - 6158, - 6159, 8192, 8203, 8239, @@ -297,109 +2612,1223 @@ static UV XPosixBlank_invlist[] = { #ifndef PERL_IN_XSUB_RE -static UV PosixCntrl_invlist[] = { +static const UV XPosixCntrl_invlist[] = { 4, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 0, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ + 148565664, /* Version and data structure type */ + 0, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 32, 127, - 128, - 0 + 160 }; #endif #ifndef PERL_IN_XSUB_RE -static UV XPosixCntrl_invlist[] = { - 4, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 0, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 32, - 127, - 160, - 0 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixDigit_invlist[] = { - 2, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixDigit_invlist[] = { + 85, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 48, - 58 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixGraph_invlist[] = { - 2, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 33, - 127 + 58, + 1632, + 1642, + 1776, + 1786, + 1984, + 1994, + 2406, + 2416, + 2534, + 2544, + 2662, + 2672, + 2790, + 2800, + 2918, + 2928, + 3046, + 3056, + 3174, + 3184, + 3302, + 3312, + 3430, + 3440, + 3664, + 3674, + 3792, + 3802, + 3872, + 3882, + 4160, + 4170, + 4240, + 4250, + 6112, + 6122, + 6160, + 6170, + 6470, + 6480, + 6608, + 6618, + 6784, + 6794, + 6800, + 6810, + 6992, + 7002, + 7088, + 7098, + 7232, + 7242, + 7248, + 7258, + 42528, + 42538, + 43216, + 43226, + 43264, + 43274, + 43472, + 43482, + 43600, + 43610, + 44016, + 44026, + 65296, + 65306, + 66720, + 66730, + 69734, + 69744, + 69872, + 69882, + 69942, + 69952, + 70096, + 70106, + 71360, + 71370, + 120782, + 120832 }; #endif #ifndef PERL_IN_XSUB_RE -static UV L1PosixGraph_invlist[] = { - 4, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixGraph_invlist[] = { + 1089, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 33, 127, 161, - 888 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixLower_invlist[] = { - 2, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 97, - 123 + 888, + 890, + 895, + 900, + 907, + 908, + 909, + 910, + 930, + 931, + 1320, + 1329, + 1367, + 1369, + 1376, + 1377, + 1416, + 1417, + 1419, + 1423, + 1424, + 1425, + 1480, + 1488, + 1515, + 1520, + 1525, + 1536, + 1541, + 1542, + 1565, + 1566, + 1806, + 1807, + 1867, + 1869, + 1970, + 1984, + 2043, + 2048, + 2094, + 2096, + 2111, + 2112, + 2140, + 2142, + 2143, + 2208, + 2209, + 2210, + 2221, + 2276, + 2303, + 2304, + 2424, + 2425, + 2432, + 2433, + 2436, + 2437, + 2445, + 2447, + 2449, + 2451, + 2473, + 2474, + 2481, + 2482, + 2483, + 2486, + 2490, + 2492, + 2501, + 2503, + 2505, + 2507, + 2511, + 2519, + 2520, + 2524, + 2526, + 2527, + 2532, + 2534, + 2556, + 2561, + 2564, + 2565, + 2571, + 2575, + 2577, + 2579, + 2601, + 2602, + 2609, + 2610, + 2612, + 2613, + 2615, + 2616, + 2618, + 2620, + 2621, + 2622, + 2627, + 2631, + 2633, + 2635, + 2638, + 2641, + 2642, + 2649, + 2653, + 2654, + 2655, + 2662, + 2678, + 2689, + 2692, + 2693, + 2702, + 2703, + 2706, + 2707, + 2729, + 2730, + 2737, + 2738, + 2740, + 2741, + 2746, + 2748, + 2758, + 2759, + 2762, + 2763, + 2766, + 2768, + 2769, + 2784, + 2788, + 2790, + 2802, + 2817, + 2820, + 2821, + 2829, + 2831, + 2833, + 2835, + 2857, + 2858, + 2865, + 2866, + 2868, + 2869, + 2874, + 2876, + 2885, + 2887, + 2889, + 2891, + 2894, + 2902, + 2904, + 2908, + 2910, + 2911, + 2916, + 2918, + 2936, + 2946, + 2948, + 2949, + 2955, + 2958, + 2961, + 2962, + 2966, + 2969, + 2971, + 2972, + 2973, + 2974, + 2976, + 2979, + 2981, + 2984, + 2987, + 2990, + 3002, + 3006, + 3011, + 3014, + 3017, + 3018, + 3022, + 3024, + 3025, + 3031, + 3032, + 3046, + 3067, + 3073, + 3076, + 3077, + 3085, + 3086, + 3089, + 3090, + 3113, + 3114, + 3124, + 3125, + 3130, + 3133, + 3141, + 3142, + 3145, + 3146, + 3150, + 3157, + 3159, + 3160, + 3162, + 3168, + 3172, + 3174, + 3184, + 3192, + 3200, + 3202, + 3204, + 3205, + 3213, + 3214, + 3217, + 3218, + 3241, + 3242, + 3252, + 3253, + 3258, + 3260, + 3269, + 3270, + 3273, + 3274, + 3278, + 3285, + 3287, + 3294, + 3295, + 3296, + 3300, + 3302, + 3312, + 3313, + 3315, + 3330, + 3332, + 3333, + 3341, + 3342, + 3345, + 3346, + 3387, + 3389, + 3397, + 3398, + 3401, + 3402, + 3407, + 3415, + 3416, + 3424, + 3428, + 3430, + 3446, + 3449, + 3456, + 3458, + 3460, + 3461, + 3479, + 3482, + 3506, + 3507, + 3516, + 3517, + 3518, + 3520, + 3527, + 3530, + 3531, + 3535, + 3541, + 3542, + 3543, + 3544, + 3552, + 3570, + 3573, + 3585, + 3643, + 3647, + 3676, + 3713, + 3715, + 3716, + 3717, + 3719, + 3721, + 3722, + 3723, + 3725, + 3726, + 3732, + 3736, + 3737, + 3744, + 3745, + 3748, + 3749, + 3750, + 3751, + 3752, + 3754, + 3756, + 3757, + 3770, + 3771, + 3774, + 3776, + 3781, + 3782, + 3783, + 3784, + 3790, + 3792, + 3802, + 3804, + 3808, + 3840, + 3912, + 3913, + 3949, + 3953, + 3992, + 3993, + 4029, + 4030, + 4045, + 4046, + 4059, + 4096, + 4294, + 4295, + 4296, + 4301, + 4302, + 4304, + 4681, + 4682, + 4686, + 4688, + 4695, + 4696, + 4697, + 4698, + 4702, + 4704, + 4745, + 4746, + 4750, + 4752, + 4785, + 4786, + 4790, + 4792, + 4799, + 4800, + 4801, + 4802, + 4806, + 4808, + 4823, + 4824, + 4881, + 4882, + 4886, + 4888, + 4955, + 4957, + 4989, + 4992, + 5018, + 5024, + 5109, + 5120, + 5760, + 5761, + 5789, + 5792, + 5873, + 5888, + 5901, + 5902, + 5909, + 5920, + 5943, + 5952, + 5972, + 5984, + 5997, + 5998, + 6001, + 6002, + 6004, + 6016, + 6110, + 6112, + 6122, + 6128, + 6138, + 6144, + 6159, + 6160, + 6170, + 6176, + 6264, + 6272, + 6315, + 6320, + 6390, + 6400, + 6429, + 6432, + 6444, + 6448, + 6460, + 6464, + 6465, + 6468, + 6510, + 6512, + 6517, + 6528, + 6572, + 6576, + 6602, + 6608, + 6619, + 6622, + 6684, + 6686, + 6751, + 6752, + 6781, + 6783, + 6794, + 6800, + 6810, + 6816, + 6830, + 6912, + 6988, + 6992, + 7037, + 7040, + 7156, + 7164, + 7224, + 7227, + 7242, + 7245, + 7296, + 7360, + 7368, + 7376, + 7415, + 7424, + 7655, + 7676, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8133, + 8134, + 8148, + 8150, + 8156, + 8157, + 8176, + 8178, + 8181, + 8182, + 8191, + 8203, + 8232, + 8234, + 8239, + 8240, + 8287, + 8288, + 8293, + 8294, + 8306, + 8308, + 8335, + 8336, + 8349, + 8352, + 8379, + 8400, + 8433, + 8448, + 8586, + 8592, + 9204, + 9216, + 9255, + 9280, + 9291, + 9312, + 9984, + 9985, + 11085, + 11088, + 11098, + 11264, + 11311, + 11312, + 11359, + 11360, + 11508, + 11513, + 11558, + 11559, + 11560, + 11565, + 11566, + 11568, + 11624, + 11631, + 11633, + 11647, + 11671, + 11680, + 11687, + 11688, + 11695, + 11696, + 11703, + 11704, + 11711, + 11712, + 11719, + 11720, + 11727, + 11728, + 11735, + 11736, + 11743, + 11744, + 11836, + 11904, + 11930, + 11931, + 12020, + 12032, + 12246, + 12272, + 12284, + 12289, + 12352, + 12353, + 12439, + 12441, + 12544, + 12549, + 12590, + 12593, + 12687, + 12688, + 12731, + 12736, + 12772, + 12784, + 12831, + 12832, + 13055, + 13056, + 19894, + 19904, + 40909, + 40960, + 42125, + 42128, + 42183, + 42192, + 42540, + 42560, + 42648, + 42655, + 42744, + 42752, + 42895, + 42896, + 42900, + 42912, + 42923, + 43000, + 43052, + 43056, + 43066, + 43072, + 43128, + 43136, + 43205, + 43214, + 43226, + 43232, + 43260, + 43264, + 43348, + 43359, + 43389, + 43392, + 43470, + 43471, + 43482, + 43486, + 43488, + 43520, + 43575, + 43584, + 43598, + 43600, + 43610, + 43612, + 43644, + 43648, + 43715, + 43739, + 43767, + 43777, + 43783, + 43785, + 43791, + 43793, + 43799, + 43808, + 43815, + 43816, + 43823, + 43968, + 44014, + 44016, + 44026, + 44032, + 55204, + 55216, + 55239, + 55243, + 55292, + 57344, + 64110, + 64112, + 64218, + 64256, + 64263, + 64275, + 64280, + 64285, + 64311, + 64312, + 64317, + 64318, + 64319, + 64320, + 64322, + 64323, + 64325, + 64326, + 64450, + 64467, + 64832, + 64848, + 64912, + 64914, + 64968, + 65008, + 65022, + 65024, + 65050, + 65056, + 65063, + 65072, + 65107, + 65108, + 65127, + 65128, + 65132, + 65136, + 65141, + 65142, + 65277, + 65279, + 65280, + 65281, + 65471, + 65474, + 65480, + 65482, + 65488, + 65490, + 65496, + 65498, + 65501, + 65504, + 65511, + 65512, + 65519, + 65529, + 65534, + 65536, + 65548, + 65549, + 65575, + 65576, + 65595, + 65596, + 65598, + 65599, + 65614, + 65616, + 65630, + 65664, + 65787, + 65792, + 65795, + 65799, + 65844, + 65847, + 65931, + 65936, + 65948, + 66000, + 66046, + 66176, + 66205, + 66208, + 66257, + 66304, + 66335, + 66336, + 66340, + 66352, + 66379, + 66432, + 66462, + 66463, + 66500, + 66504, + 66518, + 66560, + 66718, + 66720, + 66730, + 67584, + 67590, + 67592, + 67593, + 67594, + 67638, + 67639, + 67641, + 67644, + 67645, + 67647, + 67670, + 67671, + 67680, + 67840, + 67868, + 67871, + 67898, + 67903, + 67904, + 67968, + 68024, + 68030, + 68032, + 68096, + 68100, + 68101, + 68103, + 68108, + 68116, + 68117, + 68120, + 68121, + 68148, + 68152, + 68155, + 68159, + 68168, + 68176, + 68185, + 68192, + 68224, + 68352, + 68406, + 68409, + 68438, + 68440, + 68467, + 68472, + 68480, + 68608, + 68681, + 69216, + 69247, + 69632, + 69710, + 69714, + 69744, + 69760, + 69826, + 69840, + 69865, + 69872, + 69882, + 69888, + 69941, + 69942, + 69956, + 70016, + 70089, + 70096, + 70106, + 71296, + 71352, + 71360, + 71370, + 73728, + 74607, + 74752, + 74851, + 74864, + 74868, + 77824, + 78895, + 92160, + 92729, + 93952, + 94021, + 94032, + 94079, + 94095, + 94112, + 110592, + 110594, + 118784, + 119030, + 119040, + 119079, + 119081, + 119262, + 119296, + 119366, + 119552, + 119639, + 119648, + 119666, + 119808, + 119893, + 119894, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120094, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120146, + 120486, + 120488, + 120780, + 120782, + 120832, + 126464, + 126468, + 126469, + 126496, + 126497, + 126499, + 126500, + 126501, + 126503, + 126504, + 126505, + 126515, + 126516, + 126520, + 126521, + 126522, + 126523, + 126524, + 126530, + 126531, + 126535, + 126536, + 126537, + 126538, + 126539, + 126540, + 126541, + 126544, + 126545, + 126547, + 126548, + 126549, + 126551, + 126552, + 126553, + 126554, + 126555, + 126556, + 126557, + 126558, + 126559, + 126560, + 126561, + 126563, + 126564, + 126565, + 126567, + 126571, + 126572, + 126579, + 126580, + 126584, + 126585, + 126589, + 126590, + 126591, + 126592, + 126602, + 126603, + 126620, + 126625, + 126628, + 126629, + 126634, + 126635, + 126652, + 126704, + 126706, + 126976, + 127020, + 127024, + 127124, + 127136, + 127151, + 127153, + 127167, + 127169, + 127184, + 127185, + 127200, + 127232, + 127243, + 127248, + 127279, + 127280, + 127340, + 127344, + 127387, + 127462, + 127491, + 127504, + 127547, + 127552, + 127561, + 127568, + 127570, + 127744, + 127777, + 127792, + 127798, + 127799, + 127869, + 127872, + 127892, + 127904, + 127941, + 127942, + 127947, + 127968, + 127985, + 128000, + 128063, + 128064, + 128065, + 128066, + 128248, + 128249, + 128253, + 128256, + 128318, + 128320, + 128324, + 128336, + 128360, + 128507, + 128577, + 128581, + 128592, + 128640, + 128710, + 128768, + 128884, + 131072, + 173783, + 173824, + 177973, + 177984, + 178206, + 194560, + 195102, + 917505, + 917506, + 917536, + 917632, + 917760, + 918000, + 983040, + 1048574, + 1048576, + 1114110 }; #endif #ifndef PERL_IN_XSUB_RE -static UV L1PosixLower_invlist[] = { - 12, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixLower_invlist[] = { + 1237, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 97, 123, 170, @@ -411,73 +3840,2337 @@ static UV L1PosixLower_invlist[] = { 223, 247, 248, - 256 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixPrint_invlist[] = { - 2, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 32, - 127 + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348, + 349, + 350, + 351, + 352, + 353, + 354, + 355, + 356, + 357, + 358, + 359, + 360, + 361, + 362, + 363, + 364, + 365, + 366, + 367, + 368, + 369, + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 378, + 379, + 380, + 381, + 382, + 385, + 387, + 388, + 389, + 390, + 392, + 393, + 396, + 398, + 402, + 403, + 405, + 406, + 409, + 412, + 414, + 415, + 417, + 418, + 419, + 420, + 421, + 422, + 424, + 425, + 426, + 428, + 429, + 430, + 432, + 433, + 436, + 437, + 438, + 439, + 441, + 443, + 445, + 448, + 454, + 455, + 457, + 458, + 460, + 461, + 462, + 463, + 464, + 465, + 466, + 467, + 468, + 469, + 470, + 471, + 472, + 473, + 474, + 475, + 476, + 478, + 479, + 480, + 481, + 482, + 483, + 484, + 485, + 486, + 487, + 488, + 489, + 490, + 491, + 492, + 493, + 494, + 495, + 497, + 499, + 500, + 501, + 502, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520, + 521, + 522, + 523, + 524, + 525, + 526, + 527, + 528, + 529, + 530, + 531, + 532, + 533, + 534, + 535, + 536, + 537, + 538, + 539, + 540, + 541, + 542, + 543, + 544, + 545, + 546, + 547, + 548, + 549, + 550, + 551, + 552, + 553, + 554, + 555, + 556, + 557, + 558, + 559, + 560, + 561, + 562, + 563, + 570, + 572, + 573, + 575, + 577, + 578, + 579, + 583, + 584, + 585, + 586, + 587, + 588, + 589, + 590, + 591, + 660, + 661, + 697, + 704, + 706, + 736, + 741, + 837, + 838, + 881, + 882, + 883, + 884, + 887, + 888, + 890, + 894, + 912, + 913, + 940, + 975, + 976, + 978, + 981, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1012, + 1013, + 1014, + 1016, + 1017, + 1019, + 1021, + 1072, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1154, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223, + 1224, + 1225, + 1226, + 1227, + 1228, + 1229, + 1230, + 1232, + 1233, + 1234, + 1235, + 1236, + 1237, + 1238, + 1239, + 1240, + 1241, + 1242, + 1243, + 1244, + 1245, + 1246, + 1247, + 1248, + 1249, + 1250, + 1251, + 1252, + 1253, + 1254, + 1255, + 1256, + 1257, + 1258, + 1259, + 1260, + 1261, + 1262, + 1263, + 1264, + 1265, + 1266, + 1267, + 1268, + 1269, + 1270, + 1271, + 1272, + 1273, + 1274, + 1275, + 1276, + 1277, + 1278, + 1279, + 1280, + 1281, + 1282, + 1283, + 1284, + 1285, + 1286, + 1287, + 1288, + 1289, + 1290, + 1291, + 1292, + 1293, + 1294, + 1295, + 1296, + 1297, + 1298, + 1299, + 1300, + 1301, + 1302, + 1303, + 1304, + 1305, + 1306, + 1307, + 1308, + 1309, + 1310, + 1311, + 1312, + 1313, + 1314, + 1315, + 1316, + 1317, + 1318, + 1319, + 1320, + 1377, + 1416, + 7424, + 7616, + 7681, + 7682, + 7683, + 7684, + 7685, + 7686, + 7687, + 7688, + 7689, + 7690, + 7691, + 7692, + 7693, + 7694, + 7695, + 7696, + 7697, + 7698, + 7699, + 7700, + 7701, + 7702, + 7703, + 7704, + 7705, + 7706, + 7707, + 7708, + 7709, + 7710, + 7711, + 7712, + 7713, + 7714, + 7715, + 7716, + 7717, + 7718, + 7719, + 7720, + 7721, + 7722, + 7723, + 7724, + 7725, + 7726, + 7727, + 7728, + 7729, + 7730, + 7731, + 7732, + 7733, + 7734, + 7735, + 7736, + 7737, + 7738, + 7739, + 7740, + 7741, + 7742, + 7743, + 7744, + 7745, + 7746, + 7747, + 7748, + 7749, + 7750, + 7751, + 7752, + 7753, + 7754, + 7755, + 7756, + 7757, + 7758, + 7759, + 7760, + 7761, + 7762, + 7763, + 7764, + 7765, + 7766, + 7767, + 7768, + 7769, + 7770, + 7771, + 7772, + 7773, + 7774, + 7775, + 7776, + 7777, + 7778, + 7779, + 7780, + 7781, + 7782, + 7783, + 7784, + 7785, + 7786, + 7787, + 7788, + 7789, + 7790, + 7791, + 7792, + 7793, + 7794, + 7795, + 7796, + 7797, + 7798, + 7799, + 7800, + 7801, + 7802, + 7803, + 7804, + 7805, + 7806, + 7807, + 7808, + 7809, + 7810, + 7811, + 7812, + 7813, + 7814, + 7815, + 7816, + 7817, + 7818, + 7819, + 7820, + 7821, + 7822, + 7823, + 7824, + 7825, + 7826, + 7827, + 7828, + 7829, + 7838, + 7839, + 7840, + 7841, + 7842, + 7843, + 7844, + 7845, + 7846, + 7847, + 7848, + 7849, + 7850, + 7851, + 7852, + 7853, + 7854, + 7855, + 7856, + 7857, + 7858, + 7859, + 7860, + 7861, + 7862, + 7863, + 7864, + 7865, + 7866, + 7867, + 7868, + 7869, + 7870, + 7871, + 7872, + 7873, + 7874, + 7875, + 7876, + 7877, + 7878, + 7879, + 7880, + 7881, + 7882, + 7883, + 7884, + 7885, + 7886, + 7887, + 7888, + 7889, + 7890, + 7891, + 7892, + 7893, + 7894, + 7895, + 7896, + 7897, + 7898, + 7899, + 7900, + 7901, + 7902, + 7903, + 7904, + 7905, + 7906, + 7907, + 7908, + 7909, + 7910, + 7911, + 7912, + 7913, + 7914, + 7915, + 7916, + 7917, + 7918, + 7919, + 7920, + 7921, + 7922, + 7923, + 7924, + 7925, + 7926, + 7927, + 7928, + 7929, + 7930, + 7931, + 7932, + 7933, + 7934, + 7935, + 7944, + 7952, + 7958, + 7968, + 7976, + 7984, + 7992, + 8000, + 8006, + 8016, + 8024, + 8032, + 8040, + 8048, + 8062, + 8064, + 8072, + 8080, + 8088, + 8096, + 8104, + 8112, + 8117, + 8118, + 8120, + 8126, + 8127, + 8130, + 8133, + 8134, + 8136, + 8144, + 8148, + 8150, + 8152, + 8160, + 8168, + 8178, + 8181, + 8182, + 8184, + 8305, + 8306, + 8319, + 8320, + 8336, + 8349, + 8458, + 8459, + 8462, + 8464, + 8467, + 8468, + 8495, + 8496, + 8500, + 8501, + 8505, + 8506, + 8508, + 8510, + 8518, + 8522, + 8526, + 8527, + 8560, + 8576, + 8580, + 8581, + 9424, + 9450, + 11312, + 11359, + 11361, + 11362, + 11365, + 11367, + 11368, + 11369, + 11370, + 11371, + 11372, + 11373, + 11377, + 11378, + 11379, + 11381, + 11382, + 11390, + 11393, + 11394, + 11395, + 11396, + 11397, + 11398, + 11399, + 11400, + 11401, + 11402, + 11403, + 11404, + 11405, + 11406, + 11407, + 11408, + 11409, + 11410, + 11411, + 11412, + 11413, + 11414, + 11415, + 11416, + 11417, + 11418, + 11419, + 11420, + 11421, + 11422, + 11423, + 11424, + 11425, + 11426, + 11427, + 11428, + 11429, + 11430, + 11431, + 11432, + 11433, + 11434, + 11435, + 11436, + 11437, + 11438, + 11439, + 11440, + 11441, + 11442, + 11443, + 11444, + 11445, + 11446, + 11447, + 11448, + 11449, + 11450, + 11451, + 11452, + 11453, + 11454, + 11455, + 11456, + 11457, + 11458, + 11459, + 11460, + 11461, + 11462, + 11463, + 11464, + 11465, + 11466, + 11467, + 11468, + 11469, + 11470, + 11471, + 11472, + 11473, + 11474, + 11475, + 11476, + 11477, + 11478, + 11479, + 11480, + 11481, + 11482, + 11483, + 11484, + 11485, + 11486, + 11487, + 11488, + 11489, + 11490, + 11491, + 11493, + 11500, + 11501, + 11502, + 11503, + 11507, + 11508, + 11520, + 11558, + 11559, + 11560, + 11565, + 11566, + 42561, + 42562, + 42563, + 42564, + 42565, + 42566, + 42567, + 42568, + 42569, + 42570, + 42571, + 42572, + 42573, + 42574, + 42575, + 42576, + 42577, + 42578, + 42579, + 42580, + 42581, + 42582, + 42583, + 42584, + 42585, + 42586, + 42587, + 42588, + 42589, + 42590, + 42591, + 42592, + 42593, + 42594, + 42595, + 42596, + 42597, + 42598, + 42599, + 42600, + 42601, + 42602, + 42603, + 42604, + 42605, + 42606, + 42625, + 42626, + 42627, + 42628, + 42629, + 42630, + 42631, + 42632, + 42633, + 42634, + 42635, + 42636, + 42637, + 42638, + 42639, + 42640, + 42641, + 42642, + 42643, + 42644, + 42645, + 42646, + 42647, + 42648, + 42787, + 42788, + 42789, + 42790, + 42791, + 42792, + 42793, + 42794, + 42795, + 42796, + 42797, + 42798, + 42799, + 42802, + 42803, + 42804, + 42805, + 42806, + 42807, + 42808, + 42809, + 42810, + 42811, + 42812, + 42813, + 42814, + 42815, + 42816, + 42817, + 42818, + 42819, + 42820, + 42821, + 42822, + 42823, + 42824, + 42825, + 42826, + 42827, + 42828, + 42829, + 42830, + 42831, + 42832, + 42833, + 42834, + 42835, + 42836, + 42837, + 42838, + 42839, + 42840, + 42841, + 42842, + 42843, + 42844, + 42845, + 42846, + 42847, + 42848, + 42849, + 42850, + 42851, + 42852, + 42853, + 42854, + 42855, + 42856, + 42857, + 42858, + 42859, + 42860, + 42861, + 42862, + 42863, + 42873, + 42874, + 42875, + 42876, + 42877, + 42879, + 42880, + 42881, + 42882, + 42883, + 42884, + 42885, + 42886, + 42887, + 42888, + 42892, + 42893, + 42894, + 42895, + 42897, + 42898, + 42899, + 42900, + 42913, + 42914, + 42915, + 42916, + 42917, + 42918, + 42919, + 42920, + 42921, + 42922, + 43000, + 43003, + 64256, + 64263, + 64275, + 64280, + 65345, + 65371, + 66600, + 66640, + 119834, + 119860, + 119886, + 119893, + 119894, + 119912, + 119938, + 119964, + 119990, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120016, + 120042, + 120068, + 120094, + 120120, + 120146, + 120172, + 120198, + 120224, + 120250, + 120276, + 120302, + 120328, + 120354, + 120380, + 120406, + 120432, + 120458, + 120486, + 120514, + 120539, + 120540, + 120546, + 120572, + 120597, + 120598, + 120604, + 120630, + 120655, + 120656, + 120662, + 120688, + 120713, + 120714, + 120720, + 120746, + 120771, + 120772, + 120778, + 120779, + 120780 }; #endif #ifndef PERL_IN_XSUB_RE -static UV L1PosixPrint_invlist[] = { - 4, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixPrint_invlist[] = { + 1083, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 32, 127, 160, - 888 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixPunct_invlist[] = { - 8, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 33, - 48, - 58, - 65, - 91, - 97, - 123, - 127 + 888, + 890, + 895, + 900, + 907, + 908, + 909, + 910, + 930, + 931, + 1320, + 1329, + 1367, + 1369, + 1376, + 1377, + 1416, + 1417, + 1419, + 1423, + 1424, + 1425, + 1480, + 1488, + 1515, + 1520, + 1525, + 1536, + 1541, + 1542, + 1565, + 1566, + 1806, + 1807, + 1867, + 1869, + 1970, + 1984, + 2043, + 2048, + 2094, + 2096, + 2111, + 2112, + 2140, + 2142, + 2143, + 2208, + 2209, + 2210, + 2221, + 2276, + 2303, + 2304, + 2424, + 2425, + 2432, + 2433, + 2436, + 2437, + 2445, + 2447, + 2449, + 2451, + 2473, + 2474, + 2481, + 2482, + 2483, + 2486, + 2490, + 2492, + 2501, + 2503, + 2505, + 2507, + 2511, + 2519, + 2520, + 2524, + 2526, + 2527, + 2532, + 2534, + 2556, + 2561, + 2564, + 2565, + 2571, + 2575, + 2577, + 2579, + 2601, + 2602, + 2609, + 2610, + 2612, + 2613, + 2615, + 2616, + 2618, + 2620, + 2621, + 2622, + 2627, + 2631, + 2633, + 2635, + 2638, + 2641, + 2642, + 2649, + 2653, + 2654, + 2655, + 2662, + 2678, + 2689, + 2692, + 2693, + 2702, + 2703, + 2706, + 2707, + 2729, + 2730, + 2737, + 2738, + 2740, + 2741, + 2746, + 2748, + 2758, + 2759, + 2762, + 2763, + 2766, + 2768, + 2769, + 2784, + 2788, + 2790, + 2802, + 2817, + 2820, + 2821, + 2829, + 2831, + 2833, + 2835, + 2857, + 2858, + 2865, + 2866, + 2868, + 2869, + 2874, + 2876, + 2885, + 2887, + 2889, + 2891, + 2894, + 2902, + 2904, + 2908, + 2910, + 2911, + 2916, + 2918, + 2936, + 2946, + 2948, + 2949, + 2955, + 2958, + 2961, + 2962, + 2966, + 2969, + 2971, + 2972, + 2973, + 2974, + 2976, + 2979, + 2981, + 2984, + 2987, + 2990, + 3002, + 3006, + 3011, + 3014, + 3017, + 3018, + 3022, + 3024, + 3025, + 3031, + 3032, + 3046, + 3067, + 3073, + 3076, + 3077, + 3085, + 3086, + 3089, + 3090, + 3113, + 3114, + 3124, + 3125, + 3130, + 3133, + 3141, + 3142, + 3145, + 3146, + 3150, + 3157, + 3159, + 3160, + 3162, + 3168, + 3172, + 3174, + 3184, + 3192, + 3200, + 3202, + 3204, + 3205, + 3213, + 3214, + 3217, + 3218, + 3241, + 3242, + 3252, + 3253, + 3258, + 3260, + 3269, + 3270, + 3273, + 3274, + 3278, + 3285, + 3287, + 3294, + 3295, + 3296, + 3300, + 3302, + 3312, + 3313, + 3315, + 3330, + 3332, + 3333, + 3341, + 3342, + 3345, + 3346, + 3387, + 3389, + 3397, + 3398, + 3401, + 3402, + 3407, + 3415, + 3416, + 3424, + 3428, + 3430, + 3446, + 3449, + 3456, + 3458, + 3460, + 3461, + 3479, + 3482, + 3506, + 3507, + 3516, + 3517, + 3518, + 3520, + 3527, + 3530, + 3531, + 3535, + 3541, + 3542, + 3543, + 3544, + 3552, + 3570, + 3573, + 3585, + 3643, + 3647, + 3676, + 3713, + 3715, + 3716, + 3717, + 3719, + 3721, + 3722, + 3723, + 3725, + 3726, + 3732, + 3736, + 3737, + 3744, + 3745, + 3748, + 3749, + 3750, + 3751, + 3752, + 3754, + 3756, + 3757, + 3770, + 3771, + 3774, + 3776, + 3781, + 3782, + 3783, + 3784, + 3790, + 3792, + 3802, + 3804, + 3808, + 3840, + 3912, + 3913, + 3949, + 3953, + 3992, + 3993, + 4029, + 4030, + 4045, + 4046, + 4059, + 4096, + 4294, + 4295, + 4296, + 4301, + 4302, + 4304, + 4681, + 4682, + 4686, + 4688, + 4695, + 4696, + 4697, + 4698, + 4702, + 4704, + 4745, + 4746, + 4750, + 4752, + 4785, + 4786, + 4790, + 4792, + 4799, + 4800, + 4801, + 4802, + 4806, + 4808, + 4823, + 4824, + 4881, + 4882, + 4886, + 4888, + 4955, + 4957, + 4989, + 4992, + 5018, + 5024, + 5109, + 5120, + 5789, + 5792, + 5873, + 5888, + 5901, + 5902, + 5909, + 5920, + 5943, + 5952, + 5972, + 5984, + 5997, + 5998, + 6001, + 6002, + 6004, + 6016, + 6110, + 6112, + 6122, + 6128, + 6138, + 6144, + 6159, + 6160, + 6170, + 6176, + 6264, + 6272, + 6315, + 6320, + 6390, + 6400, + 6429, + 6432, + 6444, + 6448, + 6460, + 6464, + 6465, + 6468, + 6510, + 6512, + 6517, + 6528, + 6572, + 6576, + 6602, + 6608, + 6619, + 6622, + 6684, + 6686, + 6751, + 6752, + 6781, + 6783, + 6794, + 6800, + 6810, + 6816, + 6830, + 6912, + 6988, + 6992, + 7037, + 7040, + 7156, + 7164, + 7224, + 7227, + 7242, + 7245, + 7296, + 7360, + 7368, + 7376, + 7415, + 7424, + 7655, + 7676, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8133, + 8134, + 8148, + 8150, + 8156, + 8157, + 8176, + 8178, + 8181, + 8182, + 8191, + 8192, + 8232, + 8234, + 8293, + 8294, + 8306, + 8308, + 8335, + 8336, + 8349, + 8352, + 8379, + 8400, + 8433, + 8448, + 8586, + 8592, + 9204, + 9216, + 9255, + 9280, + 9291, + 9312, + 9984, + 9985, + 11085, + 11088, + 11098, + 11264, + 11311, + 11312, + 11359, + 11360, + 11508, + 11513, + 11558, + 11559, + 11560, + 11565, + 11566, + 11568, + 11624, + 11631, + 11633, + 11647, + 11671, + 11680, + 11687, + 11688, + 11695, + 11696, + 11703, + 11704, + 11711, + 11712, + 11719, + 11720, + 11727, + 11728, + 11735, + 11736, + 11743, + 11744, + 11836, + 11904, + 11930, + 11931, + 12020, + 12032, + 12246, + 12272, + 12284, + 12288, + 12352, + 12353, + 12439, + 12441, + 12544, + 12549, + 12590, + 12593, + 12687, + 12688, + 12731, + 12736, + 12772, + 12784, + 12831, + 12832, + 13055, + 13056, + 19894, + 19904, + 40909, + 40960, + 42125, + 42128, + 42183, + 42192, + 42540, + 42560, + 42648, + 42655, + 42744, + 42752, + 42895, + 42896, + 42900, + 42912, + 42923, + 43000, + 43052, + 43056, + 43066, + 43072, + 43128, + 43136, + 43205, + 43214, + 43226, + 43232, + 43260, + 43264, + 43348, + 43359, + 43389, + 43392, + 43470, + 43471, + 43482, + 43486, + 43488, + 43520, + 43575, + 43584, + 43598, + 43600, + 43610, + 43612, + 43644, + 43648, + 43715, + 43739, + 43767, + 43777, + 43783, + 43785, + 43791, + 43793, + 43799, + 43808, + 43815, + 43816, + 43823, + 43968, + 44014, + 44016, + 44026, + 44032, + 55204, + 55216, + 55239, + 55243, + 55292, + 57344, + 64110, + 64112, + 64218, + 64256, + 64263, + 64275, + 64280, + 64285, + 64311, + 64312, + 64317, + 64318, + 64319, + 64320, + 64322, + 64323, + 64325, + 64326, + 64450, + 64467, + 64832, + 64848, + 64912, + 64914, + 64968, + 65008, + 65022, + 65024, + 65050, + 65056, + 65063, + 65072, + 65107, + 65108, + 65127, + 65128, + 65132, + 65136, + 65141, + 65142, + 65277, + 65279, + 65280, + 65281, + 65471, + 65474, + 65480, + 65482, + 65488, + 65490, + 65496, + 65498, + 65501, + 65504, + 65511, + 65512, + 65519, + 65529, + 65534, + 65536, + 65548, + 65549, + 65575, + 65576, + 65595, + 65596, + 65598, + 65599, + 65614, + 65616, + 65630, + 65664, + 65787, + 65792, + 65795, + 65799, + 65844, + 65847, + 65931, + 65936, + 65948, + 66000, + 66046, + 66176, + 66205, + 66208, + 66257, + 66304, + 66335, + 66336, + 66340, + 66352, + 66379, + 66432, + 66462, + 66463, + 66500, + 66504, + 66518, + 66560, + 66718, + 66720, + 66730, + 67584, + 67590, + 67592, + 67593, + 67594, + 67638, + 67639, + 67641, + 67644, + 67645, + 67647, + 67670, + 67671, + 67680, + 67840, + 67868, + 67871, + 67898, + 67903, + 67904, + 67968, + 68024, + 68030, + 68032, + 68096, + 68100, + 68101, + 68103, + 68108, + 68116, + 68117, + 68120, + 68121, + 68148, + 68152, + 68155, + 68159, + 68168, + 68176, + 68185, + 68192, + 68224, + 68352, + 68406, + 68409, + 68438, + 68440, + 68467, + 68472, + 68480, + 68608, + 68681, + 69216, + 69247, + 69632, + 69710, + 69714, + 69744, + 69760, + 69826, + 69840, + 69865, + 69872, + 69882, + 69888, + 69941, + 69942, + 69956, + 70016, + 70089, + 70096, + 70106, + 71296, + 71352, + 71360, + 71370, + 73728, + 74607, + 74752, + 74851, + 74864, + 74868, + 77824, + 78895, + 92160, + 92729, + 93952, + 94021, + 94032, + 94079, + 94095, + 94112, + 110592, + 110594, + 118784, + 119030, + 119040, + 119079, + 119081, + 119262, + 119296, + 119366, + 119552, + 119639, + 119648, + 119666, + 119808, + 119893, + 119894, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120094, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120146, + 120486, + 120488, + 120780, + 120782, + 120832, + 126464, + 126468, + 126469, + 126496, + 126497, + 126499, + 126500, + 126501, + 126503, + 126504, + 126505, + 126515, + 126516, + 126520, + 126521, + 126522, + 126523, + 126524, + 126530, + 126531, + 126535, + 126536, + 126537, + 126538, + 126539, + 126540, + 126541, + 126544, + 126545, + 126547, + 126548, + 126549, + 126551, + 126552, + 126553, + 126554, + 126555, + 126556, + 126557, + 126558, + 126559, + 126560, + 126561, + 126563, + 126564, + 126565, + 126567, + 126571, + 126572, + 126579, + 126580, + 126584, + 126585, + 126589, + 126590, + 126591, + 126592, + 126602, + 126603, + 126620, + 126625, + 126628, + 126629, + 126634, + 126635, + 126652, + 126704, + 126706, + 126976, + 127020, + 127024, + 127124, + 127136, + 127151, + 127153, + 127167, + 127169, + 127184, + 127185, + 127200, + 127232, + 127243, + 127248, + 127279, + 127280, + 127340, + 127344, + 127387, + 127462, + 127491, + 127504, + 127547, + 127552, + 127561, + 127568, + 127570, + 127744, + 127777, + 127792, + 127798, + 127799, + 127869, + 127872, + 127892, + 127904, + 127941, + 127942, + 127947, + 127968, + 127985, + 128000, + 128063, + 128064, + 128065, + 128066, + 128248, + 128249, + 128253, + 128256, + 128318, + 128320, + 128324, + 128336, + 128360, + 128507, + 128577, + 128581, + 128592, + 128640, + 128710, + 128768, + 128884, + 131072, + 173783, + 173824, + 177973, + 177984, + 178206, + 194560, + 195102, + 917505, + 917506, + 917536, + 917632, + 917760, + 918000, + 983040, + 1048574, + 1048576, + 1114110 }; #endif #ifndef PERL_IN_XSUB_RE -static UV L1PosixPunct_invlist[] = { - 20, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixPunct_invlist[] = { + 273, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 33, 48, 58, @@ -497,37 +6190,271 @@ static UV L1PosixPunct_invlist[] = { 187, 188, 191, - 192 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixSpace_invlist[] = { - 4, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 9, - 14, - 32, - 33 + 192, + 894, + 895, + 903, + 904, + 1370, + 1376, + 1417, + 1419, + 1470, + 1471, + 1472, + 1473, + 1475, + 1476, + 1478, + 1479, + 1523, + 1525, + 1545, + 1547, + 1548, + 1550, + 1563, + 1564, + 1566, + 1568, + 1642, + 1646, + 1748, + 1749, + 1792, + 1806, + 2039, + 2042, + 2096, + 2111, + 2142, + 2143, + 2404, + 2406, + 2416, + 2417, + 2800, + 2801, + 3572, + 3573, + 3663, + 3664, + 3674, + 3676, + 3844, + 3859, + 3860, + 3861, + 3898, + 3902, + 3973, + 3974, + 4048, + 4053, + 4057, + 4059, + 4170, + 4176, + 4347, + 4348, + 4960, + 4969, + 5120, + 5121, + 5741, + 5743, + 5787, + 5789, + 5867, + 5870, + 5941, + 5943, + 6100, + 6103, + 6104, + 6107, + 6144, + 6155, + 6468, + 6470, + 6686, + 6688, + 6816, + 6823, + 6824, + 6830, + 7002, + 7009, + 7164, + 7168, + 7227, + 7232, + 7294, + 7296, + 7360, + 7368, + 7379, + 7380, + 8208, + 8232, + 8240, + 8260, + 8261, + 8274, + 8275, + 8287, + 8317, + 8319, + 8333, + 8335, + 8968, + 8972, + 9001, + 9003, + 10088, + 10102, + 10181, + 10183, + 10214, + 10224, + 10627, + 10649, + 10712, + 10716, + 10748, + 10750, + 11513, + 11517, + 11518, + 11520, + 11632, + 11633, + 11776, + 11823, + 11824, + 11836, + 12289, + 12292, + 12296, + 12306, + 12308, + 12320, + 12336, + 12337, + 12349, + 12350, + 12448, + 12449, + 12539, + 12540, + 42238, + 42240, + 42509, + 42512, + 42611, + 42612, + 42622, + 42623, + 42738, + 42744, + 43124, + 43128, + 43214, + 43216, + 43256, + 43259, + 43310, + 43312, + 43359, + 43360, + 43457, + 43470, + 43486, + 43488, + 43612, + 43616, + 43742, + 43744, + 43760, + 43762, + 44011, + 44012, + 64830, + 64832, + 65040, + 65050, + 65072, + 65107, + 65108, + 65122, + 65123, + 65124, + 65128, + 65129, + 65130, + 65132, + 65281, + 65284, + 65285, + 65291, + 65292, + 65296, + 65306, + 65308, + 65311, + 65313, + 65339, + 65342, + 65343, + 65344, + 65371, + 65372, + 65373, + 65374, + 65375, + 65382, + 65792, + 65795, + 66463, + 66464, + 66512, + 66513, + 67671, + 67672, + 67871, + 67872, + 67903, + 67904, + 68176, + 68185, + 68223, + 68224, + 68409, + 68416, + 69703, + 69710, + 69819, + 69821, + 69822, + 69826, + 69952, + 69956, + 70085, + 70089, + 74864, + 74868 }; #endif #ifndef PERL_IN_XSUB_RE -static UV XPosixSpace_invlist[] = { - 22, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixSpace_invlist[] = { + 21, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 9, 14, 32, @@ -538,8 +6465,6 @@ static UV XPosixSpace_invlist[] = { 161, 5760, 5761, - 6158, - 6159, 8192, 8203, 8232, @@ -556,68 +6481,1244 @@ static UV XPosixSpace_invlist[] = { #ifndef PERL_IN_XSUB_RE -static UV PosixUpper_invlist[] = { - 2, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 65, - 91 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV L1PosixUpper_invlist[] = { - 6, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixUpper_invlist[] = { + 1221, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 65, 91, 192, 215, 216, - 223 -}; - -#endif - -#ifndef PERL_IN_XSUB_RE - -static UV PosixWord_invlist[] = { - 8, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 48, - 58, - 65, - 91, - 95, - 96, - 97, - 123 + 223, + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 284, + 285, + 286, + 287, + 288, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348, + 349, + 350, + 351, + 352, + 353, + 354, + 355, + 356, + 357, + 358, + 359, + 360, + 361, + 362, + 363, + 364, + 365, + 366, + 367, + 368, + 369, + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 378, + 379, + 380, + 381, + 382, + 385, + 387, + 388, + 389, + 390, + 392, + 393, + 396, + 398, + 402, + 403, + 405, + 406, + 409, + 412, + 414, + 415, + 417, + 418, + 419, + 420, + 421, + 422, + 424, + 425, + 426, + 428, + 429, + 430, + 432, + 433, + 436, + 437, + 438, + 439, + 441, + 444, + 445, + 452, + 453, + 455, + 456, + 458, + 459, + 461, + 462, + 463, + 464, + 465, + 466, + 467, + 468, + 469, + 470, + 471, + 472, + 473, + 474, + 475, + 476, + 478, + 479, + 480, + 481, + 482, + 483, + 484, + 485, + 486, + 487, + 488, + 489, + 490, + 491, + 492, + 493, + 494, + 495, + 497, + 498, + 500, + 501, + 502, + 505, + 506, + 507, + 508, + 509, + 510, + 511, + 512, + 513, + 514, + 515, + 516, + 517, + 518, + 519, + 520, + 521, + 522, + 523, + 524, + 525, + 526, + 527, + 528, + 529, + 530, + 531, + 532, + 533, + 534, + 535, + 536, + 537, + 538, + 539, + 540, + 541, + 542, + 543, + 544, + 545, + 546, + 547, + 548, + 549, + 550, + 551, + 552, + 553, + 554, + 555, + 556, + 557, + 558, + 559, + 560, + 561, + 562, + 563, + 570, + 572, + 573, + 575, + 577, + 578, + 579, + 583, + 584, + 585, + 586, + 587, + 588, + 589, + 590, + 591, + 880, + 881, + 882, + 883, + 886, + 887, + 902, + 903, + 904, + 907, + 908, + 909, + 910, + 912, + 913, + 930, + 931, + 940, + 975, + 976, + 978, + 981, + 984, + 985, + 986, + 987, + 988, + 989, + 990, + 991, + 992, + 993, + 994, + 995, + 996, + 997, + 998, + 999, + 1000, + 1001, + 1002, + 1003, + 1004, + 1005, + 1006, + 1007, + 1012, + 1013, + 1015, + 1016, + 1017, + 1019, + 1021, + 1072, + 1120, + 1121, + 1122, + 1123, + 1124, + 1125, + 1126, + 1127, + 1128, + 1129, + 1130, + 1131, + 1132, + 1133, + 1134, + 1135, + 1136, + 1137, + 1138, + 1139, + 1140, + 1141, + 1142, + 1143, + 1144, + 1145, + 1146, + 1147, + 1148, + 1149, + 1150, + 1151, + 1152, + 1153, + 1162, + 1163, + 1164, + 1165, + 1166, + 1167, + 1168, + 1169, + 1170, + 1171, + 1172, + 1173, + 1174, + 1175, + 1176, + 1177, + 1178, + 1179, + 1180, + 1181, + 1182, + 1183, + 1184, + 1185, + 1186, + 1187, + 1188, + 1189, + 1190, + 1191, + 1192, + 1193, + 1194, + 1195, + 1196, + 1197, + 1198, + 1199, + 1200, + 1201, + 1202, + 1203, + 1204, + 1205, + 1206, + 1207, + 1208, + 1209, + 1210, + 1211, + 1212, + 1213, + 1214, + 1215, + 1216, + 1218, + 1219, + 1220, + 1221, + 1222, + 1223, + 1224, + 1225, + 1226, + 1227, + 1228, + 1229, + 1230, + 1232, + 1233, + 1234, + 1235, + 1236, + 1237, + 1238, + 1239, + 1240, + 1241, + 1242, + 1243, + 1244, + 1245, + 1246, + 1247, + 1248, + 1249, + 1250, + 1251, + 1252, + 1253, + 1254, + 1255, + 1256, + 1257, + 1258, + 1259, + 1260, + 1261, + 1262, + 1263, + 1264, + 1265, + 1266, + 1267, + 1268, + 1269, + 1270, + 1271, + 1272, + 1273, + 1274, + 1275, + 1276, + 1277, + 1278, + 1279, + 1280, + 1281, + 1282, + 1283, + 1284, + 1285, + 1286, + 1287, + 1288, + 1289, + 1290, + 1291, + 1292, + 1293, + 1294, + 1295, + 1296, + 1297, + 1298, + 1299, + 1300, + 1301, + 1302, + 1303, + 1304, + 1305, + 1306, + 1307, + 1308, + 1309, + 1310, + 1311, + 1312, + 1313, + 1314, + 1315, + 1316, + 1317, + 1318, + 1319, + 1329, + 1367, + 4256, + 4294, + 4295, + 4296, + 4301, + 4302, + 7680, + 7681, + 7682, + 7683, + 7684, + 7685, + 7686, + 7687, + 7688, + 7689, + 7690, + 7691, + 7692, + 7693, + 7694, + 7695, + 7696, + 7697, + 7698, + 7699, + 7700, + 7701, + 7702, + 7703, + 7704, + 7705, + 7706, + 7707, + 7708, + 7709, + 7710, + 7711, + 7712, + 7713, + 7714, + 7715, + 7716, + 7717, + 7718, + 7719, + 7720, + 7721, + 7722, + 7723, + 7724, + 7725, + 7726, + 7727, + 7728, + 7729, + 7730, + 7731, + 7732, + 7733, + 7734, + 7735, + 7736, + 7737, + 7738, + 7739, + 7740, + 7741, + 7742, + 7743, + 7744, + 7745, + 7746, + 7747, + 7748, + 7749, + 7750, + 7751, + 7752, + 7753, + 7754, + 7755, + 7756, + 7757, + 7758, + 7759, + 7760, + 7761, + 7762, + 7763, + 7764, + 7765, + 7766, + 7767, + 7768, + 7769, + 7770, + 7771, + 7772, + 7773, + 7774, + 7775, + 7776, + 7777, + 7778, + 7779, + 7780, + 7781, + 7782, + 7783, + 7784, + 7785, + 7786, + 7787, + 7788, + 7789, + 7790, + 7791, + 7792, + 7793, + 7794, + 7795, + 7796, + 7797, + 7798, + 7799, + 7800, + 7801, + 7802, + 7803, + 7804, + 7805, + 7806, + 7807, + 7808, + 7809, + 7810, + 7811, + 7812, + 7813, + 7814, + 7815, + 7816, + 7817, + 7818, + 7819, + 7820, + 7821, + 7822, + 7823, + 7824, + 7825, + 7826, + 7827, + 7828, + 7829, + 7838, + 7839, + 7840, + 7841, + 7842, + 7843, + 7844, + 7845, + 7846, + 7847, + 7848, + 7849, + 7850, + 7851, + 7852, + 7853, + 7854, + 7855, + 7856, + 7857, + 7858, + 7859, + 7860, + 7861, + 7862, + 7863, + 7864, + 7865, + 7866, + 7867, + 7868, + 7869, + 7870, + 7871, + 7872, + 7873, + 7874, + 7875, + 7876, + 7877, + 7878, + 7879, + 7880, + 7881, + 7882, + 7883, + 7884, + 7885, + 7886, + 7887, + 7888, + 7889, + 7890, + 7891, + 7892, + 7893, + 7894, + 7895, + 7896, + 7897, + 7898, + 7899, + 7900, + 7901, + 7902, + 7903, + 7904, + 7905, + 7906, + 7907, + 7908, + 7909, + 7910, + 7911, + 7912, + 7913, + 7914, + 7915, + 7916, + 7917, + 7918, + 7919, + 7920, + 7921, + 7922, + 7923, + 7924, + 7925, + 7926, + 7927, + 7928, + 7929, + 7930, + 7931, + 7932, + 7933, + 7934, + 7935, + 7944, + 7952, + 7960, + 7966, + 7976, + 7984, + 7992, + 8000, + 8008, + 8014, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8032, + 8040, + 8048, + 8120, + 8124, + 8136, + 8140, + 8152, + 8156, + 8168, + 8173, + 8184, + 8188, + 8450, + 8451, + 8455, + 8456, + 8459, + 8462, + 8464, + 8467, + 8469, + 8470, + 8473, + 8478, + 8484, + 8485, + 8486, + 8487, + 8488, + 8489, + 8490, + 8494, + 8496, + 8500, + 8510, + 8512, + 8517, + 8518, + 8544, + 8560, + 8579, + 8580, + 9398, + 9424, + 11264, + 11311, + 11360, + 11361, + 11362, + 11365, + 11367, + 11368, + 11369, + 11370, + 11371, + 11372, + 11373, + 11377, + 11378, + 11379, + 11381, + 11382, + 11390, + 11393, + 11394, + 11395, + 11396, + 11397, + 11398, + 11399, + 11400, + 11401, + 11402, + 11403, + 11404, + 11405, + 11406, + 11407, + 11408, + 11409, + 11410, + 11411, + 11412, + 11413, + 11414, + 11415, + 11416, + 11417, + 11418, + 11419, + 11420, + 11421, + 11422, + 11423, + 11424, + 11425, + 11426, + 11427, + 11428, + 11429, + 11430, + 11431, + 11432, + 11433, + 11434, + 11435, + 11436, + 11437, + 11438, + 11439, + 11440, + 11441, + 11442, + 11443, + 11444, + 11445, + 11446, + 11447, + 11448, + 11449, + 11450, + 11451, + 11452, + 11453, + 11454, + 11455, + 11456, + 11457, + 11458, + 11459, + 11460, + 11461, + 11462, + 11463, + 11464, + 11465, + 11466, + 11467, + 11468, + 11469, + 11470, + 11471, + 11472, + 11473, + 11474, + 11475, + 11476, + 11477, + 11478, + 11479, + 11480, + 11481, + 11482, + 11483, + 11484, + 11485, + 11486, + 11487, + 11488, + 11489, + 11490, + 11491, + 11499, + 11500, + 11501, + 11502, + 11506, + 11507, + 42560, + 42561, + 42562, + 42563, + 42564, + 42565, + 42566, + 42567, + 42568, + 42569, + 42570, + 42571, + 42572, + 42573, + 42574, + 42575, + 42576, + 42577, + 42578, + 42579, + 42580, + 42581, + 42582, + 42583, + 42584, + 42585, + 42586, + 42587, + 42588, + 42589, + 42590, + 42591, + 42592, + 42593, + 42594, + 42595, + 42596, + 42597, + 42598, + 42599, + 42600, + 42601, + 42602, + 42603, + 42604, + 42605, + 42624, + 42625, + 42626, + 42627, + 42628, + 42629, + 42630, + 42631, + 42632, + 42633, + 42634, + 42635, + 42636, + 42637, + 42638, + 42639, + 42640, + 42641, + 42642, + 42643, + 42644, + 42645, + 42646, + 42647, + 42786, + 42787, + 42788, + 42789, + 42790, + 42791, + 42792, + 42793, + 42794, + 42795, + 42796, + 42797, + 42798, + 42799, + 42802, + 42803, + 42804, + 42805, + 42806, + 42807, + 42808, + 42809, + 42810, + 42811, + 42812, + 42813, + 42814, + 42815, + 42816, + 42817, + 42818, + 42819, + 42820, + 42821, + 42822, + 42823, + 42824, + 42825, + 42826, + 42827, + 42828, + 42829, + 42830, + 42831, + 42832, + 42833, + 42834, + 42835, + 42836, + 42837, + 42838, + 42839, + 42840, + 42841, + 42842, + 42843, + 42844, + 42845, + 42846, + 42847, + 42848, + 42849, + 42850, + 42851, + 42852, + 42853, + 42854, + 42855, + 42856, + 42857, + 42858, + 42859, + 42860, + 42861, + 42862, + 42863, + 42873, + 42874, + 42875, + 42876, + 42877, + 42879, + 42880, + 42881, + 42882, + 42883, + 42884, + 42885, + 42886, + 42887, + 42891, + 42892, + 42893, + 42894, + 42896, + 42897, + 42898, + 42899, + 42912, + 42913, + 42914, + 42915, + 42916, + 42917, + 42918, + 42919, + 42920, + 42921, + 42922, + 42923, + 65313, + 65339, + 66560, + 66600, + 119808, + 119834, + 119860, + 119886, + 119912, + 119938, + 119964, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119990, + 120016, + 120042, + 120068, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120120, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120172, + 120198, + 120224, + 120250, + 120276, + 120302, + 120328, + 120354, + 120380, + 120406, + 120432, + 120458, + 120488, + 120513, + 120546, + 120571, + 120604, + 120629, + 120662, + 120687, + 120720, + 120745, + 120778, + 120779 }; #endif #ifndef PERL_IN_XSUB_RE -static UV L1PosixWord_invlist[] = { - 20, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixWord_invlist[] = { + 1131, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 48, 58, 65, @@ -637,62 +7738,1391 @@ static UV L1PosixWord_invlist[] = { 216, 247, 248, - 706 + 706, + 710, + 722, + 736, + 741, + 748, + 749, + 750, + 751, + 768, + 885, + 886, + 888, + 890, + 894, + 902, + 903, + 904, + 907, + 908, + 909, + 910, + 930, + 931, + 1014, + 1015, + 1154, + 1155, + 1320, + 1329, + 1367, + 1369, + 1370, + 1377, + 1416, + 1425, + 1470, + 1471, + 1472, + 1473, + 1475, + 1476, + 1478, + 1479, + 1480, + 1488, + 1515, + 1520, + 1523, + 1552, + 1563, + 1568, + 1642, + 1646, + 1748, + 1749, + 1757, + 1759, + 1769, + 1770, + 1789, + 1791, + 1792, + 1808, + 1867, + 1869, + 1970, + 1984, + 2038, + 2042, + 2043, + 2048, + 2094, + 2112, + 2140, + 2208, + 2209, + 2210, + 2221, + 2276, + 2303, + 2304, + 2404, + 2406, + 2416, + 2417, + 2424, + 2425, + 2432, + 2433, + 2436, + 2437, + 2445, + 2447, + 2449, + 2451, + 2473, + 2474, + 2481, + 2482, + 2483, + 2486, + 2490, + 2492, + 2501, + 2503, + 2505, + 2507, + 2511, + 2519, + 2520, + 2524, + 2526, + 2527, + 2532, + 2534, + 2546, + 2561, + 2564, + 2565, + 2571, + 2575, + 2577, + 2579, + 2601, + 2602, + 2609, + 2610, + 2612, + 2613, + 2615, + 2616, + 2618, + 2620, + 2621, + 2622, + 2627, + 2631, + 2633, + 2635, + 2638, + 2641, + 2642, + 2649, + 2653, + 2654, + 2655, + 2662, + 2678, + 2689, + 2692, + 2693, + 2702, + 2703, + 2706, + 2707, + 2729, + 2730, + 2737, + 2738, + 2740, + 2741, + 2746, + 2748, + 2758, + 2759, + 2762, + 2763, + 2766, + 2768, + 2769, + 2784, + 2788, + 2790, + 2800, + 2817, + 2820, + 2821, + 2829, + 2831, + 2833, + 2835, + 2857, + 2858, + 2865, + 2866, + 2868, + 2869, + 2874, + 2876, + 2885, + 2887, + 2889, + 2891, + 2894, + 2902, + 2904, + 2908, + 2910, + 2911, + 2916, + 2918, + 2928, + 2929, + 2930, + 2946, + 2948, + 2949, + 2955, + 2958, + 2961, + 2962, + 2966, + 2969, + 2971, + 2972, + 2973, + 2974, + 2976, + 2979, + 2981, + 2984, + 2987, + 2990, + 3002, + 3006, + 3011, + 3014, + 3017, + 3018, + 3022, + 3024, + 3025, + 3031, + 3032, + 3046, + 3056, + 3073, + 3076, + 3077, + 3085, + 3086, + 3089, + 3090, + 3113, + 3114, + 3124, + 3125, + 3130, + 3133, + 3141, + 3142, + 3145, + 3146, + 3150, + 3157, + 3159, + 3160, + 3162, + 3168, + 3172, + 3174, + 3184, + 3202, + 3204, + 3205, + 3213, + 3214, + 3217, + 3218, + 3241, + 3242, + 3252, + 3253, + 3258, + 3260, + 3269, + 3270, + 3273, + 3274, + 3278, + 3285, + 3287, + 3294, + 3295, + 3296, + 3300, + 3302, + 3312, + 3313, + 3315, + 3330, + 3332, + 3333, + 3341, + 3342, + 3345, + 3346, + 3387, + 3389, + 3397, + 3398, + 3401, + 3402, + 3407, + 3415, + 3416, + 3424, + 3428, + 3430, + 3440, + 3450, + 3456, + 3458, + 3460, + 3461, + 3479, + 3482, + 3506, + 3507, + 3516, + 3517, + 3518, + 3520, + 3527, + 3530, + 3531, + 3535, + 3541, + 3542, + 3543, + 3544, + 3552, + 3570, + 3572, + 3585, + 3643, + 3648, + 3663, + 3664, + 3674, + 3713, + 3715, + 3716, + 3717, + 3719, + 3721, + 3722, + 3723, + 3725, + 3726, + 3732, + 3736, + 3737, + 3744, + 3745, + 3748, + 3749, + 3750, + 3751, + 3752, + 3754, + 3756, + 3757, + 3770, + 3771, + 3774, + 3776, + 3781, + 3782, + 3783, + 3784, + 3790, + 3792, + 3802, + 3804, + 3808, + 3840, + 3841, + 3864, + 3866, + 3872, + 3882, + 3893, + 3894, + 3895, + 3896, + 3897, + 3898, + 3902, + 3912, + 3913, + 3949, + 3953, + 3973, + 3974, + 3992, + 3993, + 4029, + 4038, + 4039, + 4096, + 4170, + 4176, + 4254, + 4256, + 4294, + 4295, + 4296, + 4301, + 4302, + 4304, + 4347, + 4348, + 4681, + 4682, + 4686, + 4688, + 4695, + 4696, + 4697, + 4698, + 4702, + 4704, + 4745, + 4746, + 4750, + 4752, + 4785, + 4786, + 4790, + 4792, + 4799, + 4800, + 4801, + 4802, + 4806, + 4808, + 4823, + 4824, + 4881, + 4882, + 4886, + 4888, + 4955, + 4957, + 4960, + 4992, + 5008, + 5024, + 5109, + 5121, + 5741, + 5743, + 5760, + 5761, + 5787, + 5792, + 5867, + 5870, + 5873, + 5888, + 5901, + 5902, + 5909, + 5920, + 5941, + 5952, + 5972, + 5984, + 5997, + 5998, + 6001, + 6002, + 6004, + 6016, + 6100, + 6103, + 6104, + 6108, + 6110, + 6112, + 6122, + 6155, + 6158, + 6160, + 6170, + 6176, + 6264, + 6272, + 6315, + 6320, + 6390, + 6400, + 6429, + 6432, + 6444, + 6448, + 6460, + 6470, + 6510, + 6512, + 6517, + 6528, + 6572, + 6576, + 6602, + 6608, + 6618, + 6656, + 6684, + 6688, + 6751, + 6752, + 6781, + 6783, + 6794, + 6800, + 6810, + 6823, + 6824, + 6912, + 6988, + 6992, + 7002, + 7019, + 7028, + 7040, + 7156, + 7168, + 7224, + 7232, + 7242, + 7245, + 7294, + 7376, + 7379, + 7380, + 7415, + 7424, + 7655, + 7676, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8125, + 8126, + 8127, + 8130, + 8133, + 8134, + 8141, + 8144, + 8148, + 8150, + 8156, + 8160, + 8173, + 8178, + 8181, + 8182, + 8189, + 8204, + 8206, + 8255, + 8257, + 8276, + 8277, + 8305, + 8306, + 8319, + 8320, + 8336, + 8349, + 8400, + 8433, + 8450, + 8451, + 8455, + 8456, + 8458, + 8468, + 8469, + 8470, + 8473, + 8478, + 8484, + 8485, + 8486, + 8487, + 8488, + 8489, + 8490, + 8494, + 8495, + 8506, + 8508, + 8512, + 8517, + 8522, + 8526, + 8527, + 8544, + 8585, + 9398, + 9450, + 11264, + 11311, + 11312, + 11359, + 11360, + 11493, + 11499, + 11508, + 11520, + 11558, + 11559, + 11560, + 11565, + 11566, + 11568, + 11624, + 11631, + 11632, + 11647, + 11671, + 11680, + 11687, + 11688, + 11695, + 11696, + 11703, + 11704, + 11711, + 11712, + 11719, + 11720, + 11727, + 11728, + 11735, + 11736, + 11743, + 11744, + 11776, + 11823, + 11824, + 12293, + 12296, + 12321, + 12336, + 12337, + 12342, + 12344, + 12349, + 12353, + 12439, + 12441, + 12443, + 12445, + 12448, + 12449, + 12539, + 12540, + 12544, + 12549, + 12590, + 12593, + 12687, + 12704, + 12731, + 12784, + 12800, + 13312, + 19894, + 19968, + 40909, + 40960, + 42125, + 42192, + 42238, + 42240, + 42509, + 42512, + 42540, + 42560, + 42611, + 42612, + 42622, + 42623, + 42648, + 42655, + 42738, + 42775, + 42784, + 42786, + 42889, + 42891, + 42895, + 42896, + 42900, + 42912, + 42923, + 43000, + 43048, + 43072, + 43124, + 43136, + 43205, + 43216, + 43226, + 43232, + 43256, + 43259, + 43260, + 43264, + 43310, + 43312, + 43348, + 43360, + 43389, + 43392, + 43457, + 43471, + 43482, + 43520, + 43575, + 43584, + 43598, + 43600, + 43610, + 43616, + 43639, + 43642, + 43644, + 43648, + 43715, + 43739, + 43742, + 43744, + 43760, + 43762, + 43767, + 43777, + 43783, + 43785, + 43791, + 43793, + 43799, + 43808, + 43815, + 43816, + 43823, + 43968, + 44011, + 44012, + 44014, + 44016, + 44026, + 44032, + 55204, + 55216, + 55239, + 55243, + 55292, + 63744, + 64110, + 64112, + 64218, + 64256, + 64263, + 64275, + 64280, + 64285, + 64297, + 64298, + 64311, + 64312, + 64317, + 64318, + 64319, + 64320, + 64322, + 64323, + 64325, + 64326, + 64434, + 64467, + 64830, + 64848, + 64912, + 64914, + 64968, + 65008, + 65020, + 65024, + 65040, + 65056, + 65063, + 65075, + 65077, + 65101, + 65104, + 65136, + 65141, + 65142, + 65277, + 65296, + 65306, + 65313, + 65339, + 65343, + 65344, + 65345, + 65371, + 65382, + 65471, + 65474, + 65480, + 65482, + 65488, + 65490, + 65496, + 65498, + 65501, + 65536, + 65548, + 65549, + 65575, + 65576, + 65595, + 65596, + 65598, + 65599, + 65614, + 65616, + 65630, + 65664, + 65787, + 65856, + 65909, + 66045, + 66046, + 66176, + 66205, + 66208, + 66257, + 66304, + 66335, + 66352, + 66379, + 66432, + 66462, + 66464, + 66500, + 66504, + 66512, + 66513, + 66518, + 66560, + 66718, + 66720, + 66730, + 67584, + 67590, + 67592, + 67593, + 67594, + 67638, + 67639, + 67641, + 67644, + 67645, + 67647, + 67670, + 67840, + 67862, + 67872, + 67898, + 67968, + 68024, + 68030, + 68032, + 68096, + 68100, + 68101, + 68103, + 68108, + 68116, + 68117, + 68120, + 68121, + 68148, + 68152, + 68155, + 68159, + 68160, + 68192, + 68221, + 68352, + 68406, + 68416, + 68438, + 68448, + 68467, + 68608, + 68681, + 69632, + 69703, + 69734, + 69744, + 69760, + 69819, + 69840, + 69865, + 69872, + 69882, + 69888, + 69941, + 69942, + 69952, + 70016, + 70085, + 70096, + 70106, + 71296, + 71352, + 71360, + 71370, + 73728, + 74607, + 74752, + 74851, + 77824, + 78895, + 92160, + 92729, + 93952, + 94021, + 94032, + 94079, + 94095, + 94112, + 110592, + 110594, + 119141, + 119146, + 119149, + 119155, + 119163, + 119171, + 119173, + 119180, + 119210, + 119214, + 119362, + 119365, + 119808, + 119893, + 119894, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120094, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120146, + 120486, + 120488, + 120513, + 120514, + 120539, + 120540, + 120571, + 120572, + 120597, + 120598, + 120629, + 120630, + 120655, + 120656, + 120687, + 120688, + 120713, + 120714, + 120745, + 120746, + 120771, + 120772, + 120780, + 120782, + 120832, + 126464, + 126468, + 126469, + 126496, + 126497, + 126499, + 126500, + 126501, + 126503, + 126504, + 126505, + 126515, + 126516, + 126520, + 126521, + 126522, + 126523, + 126524, + 126530, + 126531, + 126535, + 126536, + 126537, + 126538, + 126539, + 126540, + 126541, + 126544, + 126545, + 126547, + 126548, + 126549, + 126551, + 126552, + 126553, + 126554, + 126555, + 126556, + 126557, + 126558, + 126559, + 126560, + 126561, + 126563, + 126564, + 126565, + 126567, + 126571, + 126572, + 126579, + 126580, + 126584, + 126585, + 126589, + 126590, + 126591, + 126592, + 126602, + 126603, + 126620, + 126625, + 126628, + 126629, + 126634, + 126635, + 126652, + 131072, + 173783, + 173824, + 177973, + 177984, + 178206, + 194560, + 195102, + 917760, + 918000 }; #endif #ifndef PERL_IN_XSUB_RE -static UV PosixXDigit_invlist[] = { - 6, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV XPosixXDigit_invlist[] = { + 13, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 48, 58, 65, 71, 97, - 103 + 103, + 65296, + 65306, + 65313, + 65319, + 65345, + 65351 }; #endif #ifndef PERL_IN_XSUB_RE -static UV XPosixXDigit_invlist[] = { - 12, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ - 48, - 58, +static const UV _Perl_Any_Folds_invlist[] = { + 229, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 65, - 71, + 91, 97, - 103, - 65296, - 65306, + 123, + 181, + 182, + 192, + 215, + 216, + 247, + 248, + 305, + 306, + 312, + 313, + 397, + 398, + 411, + 412, + 426, + 428, + 442, + 444, + 446, + 447, + 448, + 452, + 545, + 546, + 564, + 570, + 597, + 598, + 600, + 601, + 602, + 603, + 604, + 608, + 609, + 611, + 612, + 613, + 615, + 616, + 618, + 619, + 620, + 623, + 624, + 625, + 627, + 629, + 630, + 637, + 638, + 640, + 641, + 643, + 644, + 648, + 653, + 658, + 659, + 700, + 701, + 702, + 703, + 768, + 770, + 775, + 777, + 778, + 779, + 780, + 781, + 787, + 788, + 817, + 818, + 834, + 835, + 837, + 838, + 880, + 884, + 886, + 888, + 891, + 894, + 902, + 903, + 904, + 907, + 908, + 909, + 910, + 930, + 931, + 978, + 981, + 1011, + 1012, + 1014, + 1015, + 1020, + 1021, + 1154, + 1162, + 1320, + 1329, + 1367, + 1377, + 1416, + 4256, + 4294, + 4295, + 4296, + 4301, + 4302, + 7545, + 7546, + 7549, + 7550, + 7680, + 7836, + 7838, + 7839, + 7840, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8125, + 8126, + 8127, + 8130, + 8133, + 8134, + 8141, + 8144, + 8148, + 8150, + 8156, + 8160, + 8173, + 8178, + 8181, + 8182, + 8189, + 8486, + 8487, + 8490, + 8492, + 8498, + 8499, + 8526, + 8527, + 8544, + 8576, + 8579, + 8581, + 9398, + 9450, + 11264, + 11311, + 11312, + 11359, + 11360, + 11377, + 11378, + 11380, + 11381, + 11383, + 11390, + 11492, + 11499, + 11503, + 11506, + 11508, + 11520, + 11558, + 11559, + 11560, + 11565, + 11566, + 42560, + 42606, + 42624, + 42648, + 42786, + 42800, + 42802, + 42864, + 42873, + 42888, + 42891, + 42894, + 42896, + 42900, + 42912, + 42923, + 64256, + 64263, + 64275, + 64280, 65313, - 65319, + 65339, 65345, - 65351 + 65371, + 66560, + 66640 }; #endif -static UV NonL1_Perl_Non_Final_Folds_invlist[] = { - 44, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV NonL1_Perl_Non_Final_Folds_invlist[] = { + 45, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 700, 701, 776, @@ -741,13 +9171,12 @@ static UV NonL1_Perl_Non_Final_Folds_invlist[] = { #ifndef PERL_IN_XSUB_RE -static UV _Perl_Multi_Char_Folds_invlist[] = { - 58, /* Number of elements */ - 0, /* Current iteration position */ - 0, /* Cache of previous search index result */ - 290655244, /* Version and data structure type */ - 1, /* 0 if this is the first element of the list proper; - 1 if the next element is the first */ +static const UV _Perl_Folds_To_Multi_Char_invlist[] = { + 59, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, 223, 224, 304, @@ -810,4 +9239,2178 @@ static UV _Perl_Multi_Char_Folds_invlist[] = { #endif +#ifndef PERL_IN_XSUB_RE + +static const UV UpperLatin1_invlist[] = { + 3, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, + 128, + 256 +}; + +#endif + +#ifndef PERL_IN_XSUB_RE + +static const UV _Perl_IDStart_invlist[] = { + 995, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, + 65, + 91, + 95, + 96, + 97, + 123, + 170, + 171, + 181, + 182, + 186, + 187, + 192, + 215, + 216, + 247, + 248, + 706, + 710, + 722, + 736, + 741, + 748, + 749, + 750, + 751, + 880, + 885, + 886, + 888, + 891, + 894, + 902, + 903, + 904, + 907, + 908, + 909, + 910, + 930, + 931, + 1014, + 1015, + 1154, + 1162, + 1320, + 1329, + 1367, + 1369, + 1370, + 1377, + 1416, + 1488, + 1515, + 1520, + 1523, + 1568, + 1611, + 1646, + 1648, + 1649, + 1748, + 1749, + 1750, + 1765, + 1767, + 1774, + 1776, + 1786, + 1789, + 1791, + 1792, + 1808, + 1809, + 1810, + 1840, + 1869, + 1958, + 1969, + 1970, + 1994, + 2027, + 2036, + 2038, + 2042, + 2043, + 2048, + 2070, + 2074, + 2075, + 2084, + 2085, + 2088, + 2089, + 2112, + 2137, + 2208, + 2209, + 2210, + 2221, + 2308, + 2362, + 2365, + 2366, + 2384, + 2385, + 2392, + 2402, + 2417, + 2424, + 2425, + 2432, + 2437, + 2445, + 2447, + 2449, + 2451, + 2473, + 2474, + 2481, + 2482, + 2483, + 2486, + 2490, + 2493, + 2494, + 2510, + 2511, + 2524, + 2526, + 2527, + 2530, + 2544, + 2546, + 2565, + 2571, + 2575, + 2577, + 2579, + 2601, + 2602, + 2609, + 2610, + 2612, + 2613, + 2615, + 2616, + 2618, + 2649, + 2653, + 2654, + 2655, + 2674, + 2677, + 2693, + 2702, + 2703, + 2706, + 2707, + 2729, + 2730, + 2737, + 2738, + 2740, + 2741, + 2746, + 2749, + 2750, + 2768, + 2769, + 2784, + 2786, + 2821, + 2829, + 2831, + 2833, + 2835, + 2857, + 2858, + 2865, + 2866, + 2868, + 2869, + 2874, + 2877, + 2878, + 2908, + 2910, + 2911, + 2914, + 2929, + 2930, + 2947, + 2948, + 2949, + 2955, + 2958, + 2961, + 2962, + 2966, + 2969, + 2971, + 2972, + 2973, + 2974, + 2976, + 2979, + 2981, + 2984, + 2987, + 2990, + 3002, + 3024, + 3025, + 3077, + 3085, + 3086, + 3089, + 3090, + 3113, + 3114, + 3124, + 3125, + 3130, + 3133, + 3134, + 3160, + 3162, + 3168, + 3170, + 3205, + 3213, + 3214, + 3217, + 3218, + 3241, + 3242, + 3252, + 3253, + 3258, + 3261, + 3262, + 3294, + 3295, + 3296, + 3298, + 3313, + 3315, + 3333, + 3341, + 3342, + 3345, + 3346, + 3387, + 3389, + 3390, + 3406, + 3407, + 3424, + 3426, + 3450, + 3456, + 3461, + 3479, + 3482, + 3506, + 3507, + 3516, + 3517, + 3518, + 3520, + 3527, + 3585, + 3633, + 3634, + 3635, + 3648, + 3655, + 3713, + 3715, + 3716, + 3717, + 3719, + 3721, + 3722, + 3723, + 3725, + 3726, + 3732, + 3736, + 3737, + 3744, + 3745, + 3748, + 3749, + 3750, + 3751, + 3752, + 3754, + 3756, + 3757, + 3761, + 3762, + 3763, + 3773, + 3774, + 3776, + 3781, + 3782, + 3783, + 3804, + 3808, + 3840, + 3841, + 3904, + 3912, + 3913, + 3949, + 3976, + 3981, + 4096, + 4139, + 4159, + 4160, + 4176, + 4182, + 4186, + 4190, + 4193, + 4194, + 4197, + 4199, + 4206, + 4209, + 4213, + 4226, + 4238, + 4239, + 4256, + 4294, + 4295, + 4296, + 4301, + 4302, + 4304, + 4347, + 4348, + 4681, + 4682, + 4686, + 4688, + 4695, + 4696, + 4697, + 4698, + 4702, + 4704, + 4745, + 4746, + 4750, + 4752, + 4785, + 4786, + 4790, + 4792, + 4799, + 4800, + 4801, + 4802, + 4806, + 4808, + 4823, + 4824, + 4881, + 4882, + 4886, + 4888, + 4955, + 4992, + 5008, + 5024, + 5109, + 5121, + 5741, + 5743, + 5760, + 5761, + 5787, + 5792, + 5867, + 5870, + 5873, + 5888, + 5901, + 5902, + 5906, + 5920, + 5938, + 5952, + 5970, + 5984, + 5997, + 5998, + 6001, + 6016, + 6068, + 6103, + 6104, + 6108, + 6109, + 6176, + 6264, + 6272, + 6313, + 6314, + 6315, + 6320, + 6390, + 6400, + 6429, + 6480, + 6510, + 6512, + 6517, + 6528, + 6572, + 6593, + 6600, + 6656, + 6679, + 6688, + 6741, + 6823, + 6824, + 6917, + 6964, + 6981, + 6988, + 7043, + 7073, + 7086, + 7088, + 7098, + 7142, + 7168, + 7204, + 7245, + 7248, + 7258, + 7294, + 7401, + 7405, + 7406, + 7410, + 7413, + 7415, + 7424, + 7616, + 7680, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8125, + 8126, + 8127, + 8130, + 8133, + 8134, + 8141, + 8144, + 8148, + 8150, + 8156, + 8160, + 8173, + 8178, + 8181, + 8182, + 8189, + 8305, + 8306, + 8319, + 8320, + 8336, + 8349, + 8450, + 8451, + 8455, + 8456, + 8458, + 8468, + 8469, + 8470, + 8473, + 8478, + 8484, + 8485, + 8486, + 8487, + 8488, + 8489, + 8490, + 8494, + 8495, + 8506, + 8508, + 8512, + 8517, + 8522, + 8526, + 8527, + 8544, + 8585, + 11264, + 11311, + 11312, + 11359, + 11360, + 11493, + 11499, + 11503, + 11506, + 11508, + 11520, + 11558, + 11559, + 11560, + 11565, + 11566, + 11568, + 11624, + 11631, + 11632, + 11648, + 11671, + 11680, + 11687, + 11688, + 11695, + 11696, + 11703, + 11704, + 11711, + 11712, + 11719, + 11720, + 11727, + 11728, + 11735, + 11736, + 11743, + 12293, + 12296, + 12321, + 12330, + 12337, + 12342, + 12344, + 12349, + 12353, + 12439, + 12445, + 12448, + 12449, + 12539, + 12540, + 12544, + 12549, + 12590, + 12593, + 12687, + 12704, + 12731, + 12784, + 12800, + 13312, + 19894, + 19968, + 40909, + 40960, + 42125, + 42192, + 42238, + 42240, + 42509, + 42512, + 42528, + 42538, + 42540, + 42560, + 42607, + 42623, + 42648, + 42656, + 42736, + 42775, + 42784, + 42786, + 42889, + 42891, + 42895, + 42896, + 42900, + 42912, + 42923, + 43000, + 43010, + 43011, + 43014, + 43015, + 43019, + 43020, + 43043, + 43072, + 43124, + 43138, + 43188, + 43250, + 43256, + 43259, + 43260, + 43274, + 43302, + 43312, + 43335, + 43360, + 43389, + 43396, + 43443, + 43471, + 43472, + 43520, + 43561, + 43584, + 43587, + 43588, + 43596, + 43616, + 43639, + 43642, + 43643, + 43648, + 43696, + 43697, + 43698, + 43701, + 43703, + 43705, + 43710, + 43712, + 43713, + 43714, + 43715, + 43739, + 43742, + 43744, + 43755, + 43762, + 43765, + 43777, + 43783, + 43785, + 43791, + 43793, + 43799, + 43808, + 43815, + 43816, + 43823, + 43968, + 44003, + 44032, + 55204, + 55216, + 55239, + 55243, + 55292, + 63744, + 64110, + 64112, + 64218, + 64256, + 64263, + 64275, + 64280, + 64285, + 64286, + 64287, + 64297, + 64298, + 64311, + 64312, + 64317, + 64318, + 64319, + 64320, + 64322, + 64323, + 64325, + 64326, + 64434, + 64467, + 64606, + 64612, + 64830, + 64848, + 64912, + 64914, + 64968, + 65008, + 65018, + 65137, + 65138, + 65139, + 65140, + 65143, + 65144, + 65145, + 65146, + 65147, + 65148, + 65149, + 65150, + 65151, + 65277, + 65313, + 65339, + 65345, + 65371, + 65382, + 65438, + 65440, + 65471, + 65474, + 65480, + 65482, + 65488, + 65490, + 65496, + 65498, + 65501, + 65536, + 65548, + 65549, + 65575, + 65576, + 65595, + 65596, + 65598, + 65599, + 65614, + 65616, + 65630, + 65664, + 65787, + 65856, + 65909, + 66176, + 66205, + 66208, + 66257, + 66304, + 66335, + 66352, + 66379, + 66432, + 66462, + 66464, + 66500, + 66504, + 66512, + 66513, + 66518, + 66560, + 66718, + 67584, + 67590, + 67592, + 67593, + 67594, + 67638, + 67639, + 67641, + 67644, + 67645, + 67647, + 67670, + 67840, + 67862, + 67872, + 67898, + 67968, + 68024, + 68030, + 68032, + 68096, + 68097, + 68112, + 68116, + 68117, + 68120, + 68121, + 68148, + 68192, + 68221, + 68352, + 68406, + 68416, + 68438, + 68448, + 68467, + 68608, + 68681, + 69635, + 69688, + 69763, + 69808, + 69840, + 69865, + 69891, + 69927, + 70019, + 70067, + 70081, + 70085, + 71296, + 71339, + 73728, + 74607, + 74752, + 74851, + 77824, + 78895, + 92160, + 92729, + 93952, + 94021, + 94032, + 94033, + 94099, + 94112, + 110592, + 110594, + 119808, + 119893, + 119894, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120094, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120146, + 120486, + 120488, + 120513, + 120514, + 120539, + 120540, + 120571, + 120572, + 120597, + 120598, + 120629, + 120630, + 120655, + 120656, + 120687, + 120688, + 120713, + 120714, + 120745, + 120746, + 120771, + 120772, + 120780, + 126464, + 126468, + 126469, + 126496, + 126497, + 126499, + 126500, + 126501, + 126503, + 126504, + 126505, + 126515, + 126516, + 126520, + 126521, + 126522, + 126523, + 126524, + 126530, + 126531, + 126535, + 126536, + 126537, + 126538, + 126539, + 126540, + 126541, + 126544, + 126545, + 126547, + 126548, + 126549, + 126551, + 126552, + 126553, + 126554, + 126555, + 126556, + 126557, + 126558, + 126559, + 126560, + 126561, + 126563, + 126564, + 126565, + 126567, + 126571, + 126572, + 126579, + 126580, + 126584, + 126585, + 126589, + 126590, + 126591, + 126592, + 126602, + 126603, + 126620, + 126625, + 126628, + 126629, + 126634, + 126635, + 126652, + 131072, + 173783, + 173824, + 177973, + 177984, + 178206, + 194560, + 195102 +}; + +#endif + +#ifndef PERL_IN_XSUB_RE + +static const UV _Perl_IDCont_invlist[] = { + 1143, /* Number of elements */ + 148565664, /* Version and data structure type */ + 1, /* 0 if the list starts at 0; + 1 if it starts at the element beyond 0 */ + 0, + 48, + 58, + 65, + 91, + 95, + 96, + 97, + 123, + 170, + 171, + 181, + 182, + 186, + 187, + 192, + 215, + 216, + 247, + 248, + 706, + 710, + 722, + 736, + 741, + 748, + 749, + 750, + 751, + 768, + 885, + 886, + 888, + 891, + 894, + 902, + 903, + 904, + 907, + 908, + 909, + 910, + 930, + 931, + 1014, + 1015, + 1154, + 1155, + 1160, + 1162, + 1320, + 1329, + 1367, + 1369, + 1370, + 1377, + 1416, + 1425, + 1470, + 1471, + 1472, + 1473, + 1475, + 1476, + 1478, + 1479, + 1480, + 1488, + 1515, + 1520, + 1523, + 1552, + 1563, + 1568, + 1642, + 1646, + 1748, + 1749, + 1757, + 1759, + 1769, + 1770, + 1789, + 1791, + 1792, + 1808, + 1867, + 1869, + 1970, + 1984, + 2038, + 2042, + 2043, + 2048, + 2094, + 2112, + 2140, + 2208, + 2209, + 2210, + 2221, + 2276, + 2303, + 2304, + 2404, + 2406, + 2416, + 2417, + 2424, + 2425, + 2432, + 2433, + 2436, + 2437, + 2445, + 2447, + 2449, + 2451, + 2473, + 2474, + 2481, + 2482, + 2483, + 2486, + 2490, + 2492, + 2501, + 2503, + 2505, + 2507, + 2511, + 2519, + 2520, + 2524, + 2526, + 2527, + 2532, + 2534, + 2546, + 2561, + 2564, + 2565, + 2571, + 2575, + 2577, + 2579, + 2601, + 2602, + 2609, + 2610, + 2612, + 2613, + 2615, + 2616, + 2618, + 2620, + 2621, + 2622, + 2627, + 2631, + 2633, + 2635, + 2638, + 2641, + 2642, + 2649, + 2653, + 2654, + 2655, + 2662, + 2678, + 2689, + 2692, + 2693, + 2702, + 2703, + 2706, + 2707, + 2729, + 2730, + 2737, + 2738, + 2740, + 2741, + 2746, + 2748, + 2758, + 2759, + 2762, + 2763, + 2766, + 2768, + 2769, + 2784, + 2788, + 2790, + 2800, + 2817, + 2820, + 2821, + 2829, + 2831, + 2833, + 2835, + 2857, + 2858, + 2865, + 2866, + 2868, + 2869, + 2874, + 2876, + 2885, + 2887, + 2889, + 2891, + 2894, + 2902, + 2904, + 2908, + 2910, + 2911, + 2916, + 2918, + 2928, + 2929, + 2930, + 2946, + 2948, + 2949, + 2955, + 2958, + 2961, + 2962, + 2966, + 2969, + 2971, + 2972, + 2973, + 2974, + 2976, + 2979, + 2981, + 2984, + 2987, + 2990, + 3002, + 3006, + 3011, + 3014, + 3017, + 3018, + 3022, + 3024, + 3025, + 3031, + 3032, + 3046, + 3056, + 3073, + 3076, + 3077, + 3085, + 3086, + 3089, + 3090, + 3113, + 3114, + 3124, + 3125, + 3130, + 3133, + 3141, + 3142, + 3145, + 3146, + 3150, + 3157, + 3159, + 3160, + 3162, + 3168, + 3172, + 3174, + 3184, + 3202, + 3204, + 3205, + 3213, + 3214, + 3217, + 3218, + 3241, + 3242, + 3252, + 3253, + 3258, + 3260, + 3269, + 3270, + 3273, + 3274, + 3278, + 3285, + 3287, + 3294, + 3295, + 3296, + 3300, + 3302, + 3312, + 3313, + 3315, + 3330, + 3332, + 3333, + 3341, + 3342, + 3345, + 3346, + 3387, + 3389, + 3397, + 3398, + 3401, + 3402, + 3407, + 3415, + 3416, + 3424, + 3428, + 3430, + 3440, + 3450, + 3456, + 3458, + 3460, + 3461, + 3479, + 3482, + 3506, + 3507, + 3516, + 3517, + 3518, + 3520, + 3527, + 3530, + 3531, + 3535, + 3541, + 3542, + 3543, + 3544, + 3552, + 3570, + 3572, + 3585, + 3643, + 3648, + 3663, + 3664, + 3674, + 3713, + 3715, + 3716, + 3717, + 3719, + 3721, + 3722, + 3723, + 3725, + 3726, + 3732, + 3736, + 3737, + 3744, + 3745, + 3748, + 3749, + 3750, + 3751, + 3752, + 3754, + 3756, + 3757, + 3770, + 3771, + 3774, + 3776, + 3781, + 3782, + 3783, + 3784, + 3790, + 3792, + 3802, + 3804, + 3808, + 3840, + 3841, + 3864, + 3866, + 3872, + 3882, + 3893, + 3894, + 3895, + 3896, + 3897, + 3898, + 3902, + 3912, + 3913, + 3949, + 3953, + 3973, + 3974, + 3992, + 3993, + 4029, + 4038, + 4039, + 4096, + 4170, + 4176, + 4254, + 4256, + 4294, + 4295, + 4296, + 4301, + 4302, + 4304, + 4347, + 4348, + 4681, + 4682, + 4686, + 4688, + 4695, + 4696, + 4697, + 4698, + 4702, + 4704, + 4745, + 4746, + 4750, + 4752, + 4785, + 4786, + 4790, + 4792, + 4799, + 4800, + 4801, + 4802, + 4806, + 4808, + 4823, + 4824, + 4881, + 4882, + 4886, + 4888, + 4955, + 4957, + 4960, + 4992, + 5008, + 5024, + 5109, + 5121, + 5741, + 5743, + 5760, + 5761, + 5787, + 5792, + 5867, + 5870, + 5873, + 5888, + 5901, + 5902, + 5909, + 5920, + 5941, + 5952, + 5972, + 5984, + 5997, + 5998, + 6001, + 6002, + 6004, + 6016, + 6100, + 6103, + 6104, + 6108, + 6110, + 6112, + 6122, + 6155, + 6158, + 6160, + 6170, + 6176, + 6264, + 6272, + 6315, + 6320, + 6390, + 6400, + 6429, + 6432, + 6444, + 6448, + 6460, + 6470, + 6510, + 6512, + 6517, + 6528, + 6572, + 6576, + 6602, + 6608, + 6618, + 6656, + 6684, + 6688, + 6751, + 6752, + 6781, + 6783, + 6794, + 6800, + 6810, + 6823, + 6824, + 6912, + 6988, + 6992, + 7002, + 7019, + 7028, + 7040, + 7156, + 7168, + 7224, + 7232, + 7242, + 7245, + 7294, + 7376, + 7379, + 7380, + 7415, + 7424, + 7655, + 7676, + 7958, + 7960, + 7966, + 7968, + 8006, + 8008, + 8014, + 8016, + 8024, + 8025, + 8026, + 8027, + 8028, + 8029, + 8030, + 8031, + 8062, + 8064, + 8117, + 8118, + 8125, + 8126, + 8127, + 8130, + 8133, + 8134, + 8141, + 8144, + 8148, + 8150, + 8156, + 8160, + 8173, + 8178, + 8181, + 8182, + 8189, + 8255, + 8257, + 8276, + 8277, + 8305, + 8306, + 8319, + 8320, + 8336, + 8349, + 8400, + 8413, + 8417, + 8418, + 8421, + 8433, + 8450, + 8451, + 8455, + 8456, + 8458, + 8468, + 8469, + 8470, + 8473, + 8478, + 8484, + 8485, + 8486, + 8487, + 8488, + 8489, + 8490, + 8494, + 8495, + 8506, + 8508, + 8512, + 8517, + 8522, + 8526, + 8527, + 8544, + 8585, + 11264, + 11311, + 11312, + 11359, + 11360, + 11493, + 11499, + 11508, + 11520, + 11558, + 11559, + 11560, + 11565, + 11566, + 11568, + 11624, + 11631, + 11632, + 11647, + 11671, + 11680, + 11687, + 11688, + 11695, + 11696, + 11703, + 11704, + 11711, + 11712, + 11719, + 11720, + 11727, + 11728, + 11735, + 11736, + 11743, + 11744, + 11776, + 12293, + 12296, + 12321, + 12336, + 12337, + 12342, + 12344, + 12349, + 12353, + 12439, + 12441, + 12443, + 12445, + 12448, + 12449, + 12539, + 12540, + 12544, + 12549, + 12590, + 12593, + 12687, + 12704, + 12731, + 12784, + 12800, + 13312, + 19894, + 19968, + 40909, + 40960, + 42125, + 42192, + 42238, + 42240, + 42509, + 42512, + 42540, + 42560, + 42608, + 42612, + 42622, + 42623, + 42648, + 42655, + 42738, + 42775, + 42784, + 42786, + 42889, + 42891, + 42895, + 42896, + 42900, + 42912, + 42923, + 43000, + 43048, + 43072, + 43124, + 43136, + 43205, + 43216, + 43226, + 43232, + 43256, + 43259, + 43260, + 43264, + 43310, + 43312, + 43348, + 43360, + 43389, + 43392, + 43457, + 43471, + 43482, + 43520, + 43575, + 43584, + 43598, + 43600, + 43610, + 43616, + 43639, + 43642, + 43644, + 43648, + 43715, + 43739, + 43742, + 43744, + 43760, + 43762, + 43767, + 43777, + 43783, + 43785, + 43791, + 43793, + 43799, + 43808, + 43815, + 43816, + 43823, + 43968, + 44011, + 44012, + 44014, + 44016, + 44026, + 44032, + 55204, + 55216, + 55239, + 55243, + 55292, + 63744, + 64110, + 64112, + 64218, + 64256, + 64263, + 64275, + 64280, + 64285, + 64297, + 64298, + 64311, + 64312, + 64317, + 64318, + 64319, + 64320, + 64322, + 64323, + 64325, + 64326, + 64434, + 64467, + 64606, + 64612, + 64830, + 64848, + 64912, + 64914, + 64968, + 65008, + 65018, + 65024, + 65040, + 65056, + 65063, + 65075, + 65077, + 65101, + 65104, + 65137, + 65138, + 65139, + 65140, + 65143, + 65144, + 65145, + 65146, + 65147, + 65148, + 65149, + 65150, + 65151, + 65277, + 65296, + 65306, + 65313, + 65339, + 65343, + 65344, + 65345, + 65371, + 65382, + 65471, + 65474, + 65480, + 65482, + 65488, + 65490, + 65496, + 65498, + 65501, + 65536, + 65548, + 65549, + 65575, + 65576, + 65595, + 65596, + 65598, + 65599, + 65614, + 65616, + 65630, + 65664, + 65787, + 65856, + 65909, + 66045, + 66046, + 66176, + 66205, + 66208, + 66257, + 66304, + 66335, + 66352, + 66379, + 66432, + 66462, + 66464, + 66500, + 66504, + 66512, + 66513, + 66518, + 66560, + 66718, + 66720, + 66730, + 67584, + 67590, + 67592, + 67593, + 67594, + 67638, + 67639, + 67641, + 67644, + 67645, + 67647, + 67670, + 67840, + 67862, + 67872, + 67898, + 67968, + 68024, + 68030, + 68032, + 68096, + 68100, + 68101, + 68103, + 68108, + 68116, + 68117, + 68120, + 68121, + 68148, + 68152, + 68155, + 68159, + 68160, + 68192, + 68221, + 68352, + 68406, + 68416, + 68438, + 68448, + 68467, + 68608, + 68681, + 69632, + 69703, + 69734, + 69744, + 69760, + 69819, + 69840, + 69865, + 69872, + 69882, + 69888, + 69941, + 69942, + 69952, + 70016, + 70085, + 70096, + 70106, + 71296, + 71352, + 71360, + 71370, + 73728, + 74607, + 74752, + 74851, + 77824, + 78895, + 92160, + 92729, + 93952, + 94021, + 94032, + 94079, + 94095, + 94112, + 110592, + 110594, + 119141, + 119146, + 119149, + 119155, + 119163, + 119171, + 119173, + 119180, + 119210, + 119214, + 119362, + 119365, + 119808, + 119893, + 119894, + 119965, + 119966, + 119968, + 119970, + 119971, + 119973, + 119975, + 119977, + 119981, + 119982, + 119994, + 119995, + 119996, + 119997, + 120004, + 120005, + 120070, + 120071, + 120075, + 120077, + 120085, + 120086, + 120093, + 120094, + 120122, + 120123, + 120127, + 120128, + 120133, + 120134, + 120135, + 120138, + 120145, + 120146, + 120486, + 120488, + 120513, + 120514, + 120539, + 120540, + 120571, + 120572, + 120597, + 120598, + 120629, + 120630, + 120655, + 120656, + 120687, + 120688, + 120713, + 120714, + 120745, + 120746, + 120771, + 120772, + 120780, + 120782, + 120832, + 126464, + 126468, + 126469, + 126496, + 126497, + 126499, + 126500, + 126501, + 126503, + 126504, + 126505, + 126515, + 126516, + 126520, + 126521, + 126522, + 126523, + 126524, + 126530, + 126531, + 126535, + 126536, + 126537, + 126538, + 126539, + 126540, + 126541, + 126544, + 126545, + 126547, + 126548, + 126549, + 126551, + 126552, + 126553, + 126554, + 126555, + 126556, + 126557, + 126558, + 126559, + 126560, + 126561, + 126563, + 126564, + 126565, + 126567, + 126571, + 126572, + 126579, + 126580, + 126584, + 126585, + 126589, + 126590, + 126591, + 126592, + 126602, + 126603, + 126620, + 126625, + 126628, + 126629, + 126634, + 126635, + 126652, + 131072, + 173783, + 173824, + 177973, + 177984, + 178206, + 194560, + 195102, + 917760, + 918000 +}; + +#endif + /* ex: set ro: */ diff --git a/Master/tlpkg/tlperl/lib/CORE/config.h b/Master/tlpkg/tlperl/lib/CORE/config.h index 8353e950f34..cd9bfd51d2c 100644 --- a/Master/tlpkg/tlperl/lib/CORE/config.h +++ b/Master/tlpkg/tlperl/lib/CORE/config.h @@ -9,7 +9,7 @@ /* Package name : perl5 * Source directory : - * Configuration time: Tue Apr 22 14:55:05 2014 + * Configuration time: Fri Apr 24 15:37:17 2015 * Configured by : siepo * Target system : */ @@ -646,7 +646,7 @@ * should be included. */ /*#define I_DBM / **/ -#define I_RPCSVC_DBM /**/ +/*#define I_RPCSVC_DBM / **/ /* I_DLFCN: * This symbol, if defined, indicates that <dlfcn.h> exists and should @@ -703,12 +703,6 @@ */ /*#define I_NETINET_IN / **/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO / **/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -811,26 +805,6 @@ */ /*#define I_SYS_WAIT / **/ -/* I_TERMIO: - * This symbol, if defined, indicates that the program should include - * <termio.h> rather than <sgtty.h>. There are also differences in - * the ioctl() calls that depend on the value of this symbol. - */ -/* I_TERMIOS: - * This symbol, if defined, indicates that the program should include - * the POSIX termios.h rather than sgtty.h or termio.h. - * There are also differences in the ioctl() calls that depend on the - * value of this symbol. - */ -/* I_SGTTY: - * This symbol, if defined, indicates that the program should include - * <sgtty.h> rather than <termio.h>. There are also differences in - * the ioctl() calls that depend on the value of this symbol. - */ -/*#define I_TERMIO / **/ -/*#define I_TERMIOS / **/ -/*#define I_SGTTY / **/ - /* I_UNISTD: * This symbol, if defined, indicates to the C program that it should * include <unistd.h>. @@ -892,18 +866,6 @@ #define OSNAME "MSWin32" /**/ #define OSVERS "4.0" /**/ -/* USE_CROSS_COMPILE: - * This symbol, if defined, indicates that Perl is being cross-compiled. - */ -/* PERL_TARGETARCH: - * This symbol, if defined, indicates the target architecture - * Perl has been cross-compiled to. Undefined if not a cross-compile. - */ -#ifndef USE_CROSS_COMPILE -/*#define USE_CROSS_COMPILE / **/ -#define PERL_TARGETARCH "" /**/ -#endif - /* MULTIARCH: * This symbol, if defined, signifies that the build * process will produce some binary files that are going to be @@ -934,7 +896,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\lib" /**/ +#define ARCHLIB "c:\\tlperl\\lib" /**/ /*#define ARCHLIB_EXP "" / **/ /* ARCHNAME: @@ -957,8 +919,8 @@ * This symbol, if defined, indicates that we'd like to relocate entries * in @INC at run time based on the location of the perl binary. */ -#define BIN "c:\\perl\\bin" /**/ -#define BIN_EXP "c:\\perl\\bin" /**/ +#define BIN "c:\\tlperl\\bin" /**/ +#define BIN_EXP "c:\\tlperl\\bin" /**/ #define PERL_RELOCATABLE_INC "undef" /**/ /* INTSIZE: @@ -993,7 +955,7 @@ * so the default case (for NeXT) is big endian to catch them. * This might matter for NeXT 3.0. */ -#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH) +#if defined(MULTIARCH) # ifdef __LITTLE_ENDIAN__ # if LONGSIZE == 4 # define BYTEORDER 0x1234 @@ -3045,7 +3007,7 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "c:\\perl\\lib" /**/ +#define PRIVLIB "c:\\tlperl\\lib" /**/ #define PRIVLIB_EXP (win32_get_privlib(PERL_VERSION_STRING, NULL)) /**/ /* CAN_PROTOTYPE: @@ -3112,10 +3074,10 @@ * function used to generate normalized random numbers. * Values include 15, 16, 31, and 48. */ -#define Drand01() (rand()/(double)((unsigned)1<<RANDBITS)) /**/ -#define Rand_seed_t unsigned /**/ -#define seedDrand01(x) srand((Rand_seed_t)x) /**/ -#define RANDBITS 15 /**/ +#define Drand01() Perl_drand48() /**/ +#define Rand_seed_t U32 /**/ +#define seedDrand01(x) Perl_drand48_init((Rand_seed_t)x) /**/ +#define RANDBITS 48 /**/ /* Select_fd_set_t: * This symbol holds the type used for the 2nd, 3rd, and 4th @@ -3189,7 +3151,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\lib" /**/ +#define SITEARCH "c:\\tlperl\\site\\lib" /**/ /*#define SITEARCH_EXP "" / **/ /* SITELIB: @@ -3212,7 +3174,7 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "c:\\perl\\site\\lib" /**/ +#define SITELIB "c:\\tlperl\\site\\lib" /**/ #define SITELIB_EXP (win32_get_sitelib(PERL_VERSION_STRING, NULL)) /**/ #define SITELIB_STEM "" /**/ @@ -3330,29 +3292,36 @@ /*#define PERL_VENDORLIB_EXP "" / **/ /*#define PERL_VENDORLIB_STEM "" / **/ -/* VOIDFLAGS: - * This symbol indicates how much support of the void type is given by this - * compiler. What various bits mean: - * - * 1 = supports declaration of void - * 2 = supports arrays of pointers to functions returning void - * 4 = supports comparisons between pointers to void functions and - * addresses of void functions - * 8 = supports declaration of generic void pointers - * - * The package designer should define VOIDUSED to indicate the requirements - * of the package. This can be done either by #defining VOIDUSED before - * including config.h, or by defining defvoidused in Myinit.U. If the - * latter approach is taken, only those flags will be tested. If the - * level of void support necessary is not present, defines void to int. - */ -#ifndef VOIDUSED -#define VOIDUSED 15 -#endif -#define VOIDFLAGS 15 -#if (VOIDFLAGS & VOIDUSED) != VOIDUSED -#define void int /* is void to be avoided? */ -#define M_VOID /* Xenix strikes again */ +/* I_TERMIO: + * This symbol, if defined, indicates that the program should include + * <termio.h> rather than <sgtty.h>. There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/* I_TERMIOS: + * This symbol, if defined, indicates that the program should include + * the POSIX termios.h rather than sgtty.h or termio.h. + * There are also differences in the ioctl() calls that depend on the + * value of this symbol. + */ +/* I_SGTTY: + * This symbol, if defined, indicates that the program should include + * <sgtty.h> rather than <termio.h>. There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/*#define I_TERMIO / **/ +/*#define I_TERMIOS / **/ +/*#define I_SGTTY / **/ + +/* USE_CROSS_COMPILE: + * This symbol, if defined, indicates that Perl is being cross-compiled. + */ +/* PERL_TARGETARCH: + * This symbol, if defined, indicates the target architecture + * Perl has been cross-compiled to. Undefined if not a cross-compile. + */ +#ifndef USE_CROSS_COMPILE +/*#define USE_CROSS_COMPILE / **/ +#define PERL_TARGETARCH "" /**/ #endif /* PERL_USE_DEVEL: @@ -3917,12 +3886,6 @@ */ /*#define HAS_SETPROCTITLE / **/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - /* HAS_SIGNBIT: * This symbol, if defined, indicates that the signbit routine is * available to check if the given number has the sign bit set. @@ -4188,8 +4151,10 @@ #define USE_DYNAMIC_LOADING /**/ /* FFLUSH_NULL: - * This symbol, if defined, tells that fflush(NULL) does flush - * all pending stdio output. + * This symbol, if defined, tells that fflush(NULL) correctly + * flushes all pending stdio output without side effects. In + * particular, on some platforms calling fflush(NULL) *still* + * corrupts STDIN if it is a pipe. */ /* FFLUSH_ALL: * This symbol, if defined, tells that to flush @@ -4325,7 +4290,7 @@ * This symbol, if defined, indicates that <stdbool.h> exists and * can be included. */ -/*#define I_STDBOOL / **/ +#define I_STDBOOL /**/ /* I_SUNMATH: * This symbol, if defined, indicates that <sunmath.h> exists and diff --git a/Master/tlpkg/tlperl/lib/CORE/cop.h b/Master/tlpkg/tlperl/lib/CORE/cop.h index 122e2d75e01..37980f04bdd 100644 --- a/Master/tlpkg/tlperl/lib/CORE/cop.h +++ b/Master/tlpkg/tlperl/lib/CORE/cop.h @@ -31,21 +31,13 @@ struct jmpenv { struct jmpenv * je_prev; - Sigjmp_buf je_buf; /* only for use if !je_throw */ + Sigjmp_buf je_buf; /* uninit if je_prev is NULL */ int je_ret; /* last exception thrown */ bool je_mustcatch; /* need to call longjmp()? */ }; typedef struct jmpenv JMPENV; -#ifdef OP_IN_REGISTER -#define OP_REG_TO_MEM PL_opsave = op -#define OP_MEM_TO_REG op = PL_opsave -#else -#define OP_REG_TO_MEM NOOP -#define OP_MEM_TO_REG NOOP -#endif - /* * How to build the first jmpenv. * @@ -58,10 +50,11 @@ typedef struct jmpenv JMPENV; #define JMPENV_BOOTSTRAP \ STMT_START { \ - Zero(&PL_start_env, 1, JMPENV); \ + PERL_POISON_EXPR(PoisonNew(&PL_start_env, 1, JMPENV));\ + PL_top_env = &PL_start_env; \ + PL_start_env.je_prev = NULL; \ PL_start_env.je_ret = -1; \ PL_start_env.je_mustcatch = TRUE; \ - PL_top_env = &PL_start_env; \ } STMT_END /* @@ -107,9 +100,7 @@ typedef struct jmpenv JMPENV; Perl_deb(aTHX_ "JUMPENV_PUSH level=%d at %s:%d\n", \ i, __FILE__, __LINE__);}) \ cur_env.je_prev = PL_top_env; \ - OP_REG_TO_MEM; \ cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf, SCOPE_SAVES_SIGNAL_MASK); \ - OP_MEM_TO_REG; \ PL_top_env = &cur_env; \ cur_env.je_mustcatch = FALSE; \ (v) = cur_env.je_ret; \ @@ -133,7 +124,6 @@ typedef struct jmpenv JMPENV; while (p) { i++; p = p->je_prev; } \ Perl_deb(aTHX_ "JUMPENV_JUMP(%d) level=%d at %s:%d\n", \ (int)v, i, __FILE__, __LINE__);}) \ - OP_REG_TO_MEM; \ if (PL_top_env->je_prev) \ PerlProc_longjmp(PL_top_env->je_buf, (v)); \ if ((v) == 2) \ @@ -410,7 +400,7 @@ struct cop { # ifdef NETWARE # define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv)) -# define CopFILE_setn(c,pv,l) ((c)->cop_file = savepv((pv),(l))) +# define CopFILE_setn(c,pv,l) ((c)->cop_file = savepvn((pv),(l))) # else # define CopFILE_set(c,pv) ((c)->cop_file = savesharedpv(pv)) # define CopFILE_setn(c,pv,l) ((c)->cop_file = savesharedpvn((pv),(l))) @@ -444,8 +434,8 @@ struct cop { # else # define CopFILEAVx(c) (GvAV(CopFILEGV(c))) # endif -# define CopFILE(c) (CopFILEGV(c) && GvSV(CopFILEGV(c)) \ - ? SvPVX(GvSV(CopFILEGV(c))) : NULL) +# define CopFILE(c) (CopFILEGV(c) \ + ? GvNAME(CopFILEGV(c))+2 : NULL) # define CopSTASH(c) ((c)->cop_stash) # define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) # define CopFILE_free(c) (SvREFCNT_dec(CopFILEGV(c)),(CopFILEGV(c) = NULL)) @@ -648,6 +638,7 @@ struct block_format { #define POPSUB(cx,sv) \ STMT_START { \ + const I32 olddepth = cx->blk_sub.olddepth; \ RETURN_PROBE(CvNAMED(cx->blk_sub.cv) \ ? HEK_KEY(CvNAME_HEK(cx->blk_sub.cv)) \ : GvENAME(CvGV(cx->blk_sub.cv)), \ @@ -671,7 +662,8 @@ struct block_format { } \ } \ sv = MUTABLE_SV(cx->blk_sub.cv); \ - if (sv && (CvDEPTH((const CV*)sv) = cx->blk_sub.olddepth)) \ + LEAVE_SCOPE(PL_scopestack[cx->blk_oldscopesp-1]); \ + if (sv && (CvDEPTH((const CV*)sv) = olddepth)) \ sv = NULL; \ } STMT_END @@ -681,11 +673,15 @@ struct block_format { } STMT_END #define POPFORMAT(cx) \ - setdefout(cx->blk_format.dfoutgv); \ - CvDEPTH(cx->blk_format.cv)--; \ - if (!CvDEPTH(cx->blk_format.cv)) \ + STMT_START { \ + CV * const cv = cx->blk_format.cv; \ + GV * const dfuot = cx->blk_format.dfoutgv; \ + setdefout(dfuot); \ + LEAVE_SCOPE(PL_scopestack[cx->blk_oldscopesp-1]); \ + if (!--CvDEPTH(cv)) \ SvREFCNT_dec_NN(cx->blk_format.cv); \ - SvREFCNT_dec_NN(cx->blk_format.dfoutgv); + SvREFCNT_dec_NN(dfuot); \ + } STMT_END /* eval context */ struct block_eval { @@ -1058,6 +1054,7 @@ L<perlcall>. #define G_WRITING_TO_STDERR 1024 /* Perl_write_to_stderr() is calling Perl_magic_methcall(). */ #define G_RE_REPARSING 0x800 /* compiling a run-time /(?{..})/ */ +#define G_METHOD_NAMED 4096 /* calling named method, eg without :: or ' */ /* flag bits for PL_in_eval */ #define EVAL_NULL 0 /* not in an eval */ @@ -1166,14 +1163,14 @@ typedef struct stackinfo PERL_SI; =head1 Multicall Functions =for apidoc Ams||dMULTICALL -Declare local variables for a multicall. See L<perlcall/LIGHTWEIGHT CALLBACKS>. +Declare local variables for a multicall. See L<perlcall/LIGHTWEIGHT CALLBACKS>. =for apidoc Ams||PUSH_MULTICALL Opening bracket for a lightweight callback. See L<perlcall/LIGHTWEIGHT CALLBACKS>. =for apidoc Ams||MULTICALL -Make a lightweight callback. See L<perlcall/LIGHTWEIGHT CALLBACKS>. +Make a lightweight callback. See L<perlcall/LIGHTWEIGHT CALLBACKS>. =for apidoc Ams||POP_MULTICALL Closing bracket for a lightweight callback. diff --git a/Master/tlpkg/tlperl/lib/CORE/cv.h b/Master/tlpkg/tlperl/lib/CORE/cv.h index 5da9a502f53..36afba7ee80 100644 --- a/Master/tlpkg/tlperl/lib/CORE/cv.h +++ b/Master/tlpkg/tlperl/lib/CORE/cv.h @@ -26,10 +26,10 @@ Null CV pointer. =head1 CV Manipulation Functions This section documents functions to manipulate CVs which are code-values, -or subroutines. For more information, see L<perlguts>. +or subroutines. For more information, see L<perlguts>. =for apidoc Am|HV*|CvSTASH|CV* cv -Returns the stash of the CV. A stash is the symbol table hash, containing +Returns the stash of the CV. A stash is the symbol table hash, containing the package-scoped variables in the package where the subroutine was defined. For more information, see L<perlguts>. @@ -49,7 +49,7 @@ See L<perlguts/Autoloading with XSUBs>. #define CvROOT(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_root #define CvXSUB(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_xsub #define CvXSUBANY(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_start_u.xcv_xsubany -#define CvGV(sv) S_CvGV((CV *)(sv)) +#define CvGV(sv) S_CvGV((const CV *)(sv)) #define CvGV_set(cv,gv) Perl_cvgv_set(aTHX_ cv, gv) #define CvFILE(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_file #ifdef USE_ITHREADS @@ -189,7 +189,7 @@ See L<perlguts/Autoloading with XSUBs>. #define XS_DYNAMIC_FILENAME 0x01 /* The filename isn't static */ PERL_STATIC_INLINE GV * -S_CvGV(CV *sv) +S_CvGV(const CV *sv) { return CvNAMED(sv) ? 0 @@ -218,19 +218,19 @@ CvNAME_HEK(CV *sv) =for apidoc m|bool|CvWEAKOUTSIDE|CV *cv Each CV has a pointer, C<CvOUTSIDE()>, to its lexically enclosing -CV (if any). Because pointers to anonymous sub prototypes are +CV (if any). Because pointers to anonymous sub prototypes are stored in C<&> pad slots, it is a possible to get a circular reference, -with the parent pointing to the child and vice-versa. To avoid the +with the parent pointing to the child and vice-versa. To avoid the ensuing memory leak, we do not increment the reference count of the CV pointed to by C<CvOUTSIDE> in the I<one specific instance> that the parent -has a C<&> pad slot pointing back to us. In this case, we set the -C<CvWEAKOUTSIDE> flag in the child. This allows us to determine under what +has a C<&> pad slot pointing back to us. In this case, we set the +C<CvWEAKOUTSIDE> flag in the child. This allows us to determine under what circumstances we should decrement the refcount of the parent when freeing the child. There is a further complication with non-closure anonymous subs (i.e. those -that do not refer to any lexicals outside that sub). In this case, the -anonymous prototype is shared rather than being cloned. This has the +that do not refer to any lexicals outside that sub). In this case, the +anonymous prototype is shared rather than being cloned. This has the consequence that the parent may be freed while there are still active children, eg @@ -246,16 +246,16 @@ and the freed BEGIN is accessed. To avoid this, whenever a CV and its associated pad is freed, any C<&> entries in the pad are explicitly removed from the pad, and if the refcount of the pointed-to anon sub is still positive, then that -child's C<CvOUTSIDE> is set to point to its grandparent. This will only +child's C<CvOUTSIDE> is set to point to its grandparent. This will only occur in the single specific case of a non-closure anon prototype having one or more active references (such as C<$a> above). One other thing to consider is that a CV may be merely undefined -rather than freed, eg C<undef &foo>. In this case, its refcount may +rather than freed, eg C<undef &foo>. In this case, its refcount may not have reached zero, but we still delete its pad and its C<CvROOT> etc. Since various children may still have their C<CvOUTSIDE> pointing at this undefined CV, we keep its own C<CvOUTSIDE> for the time being, so that -the chain of lexical scopes is unbroken. For example, the following +the chain of lexical scopes is unbroken. For example, the following should print 123: my $x = 123; diff --git a/Master/tlpkg/tlperl/lib/CORE/dosish.h b/Master/tlpkg/tlperl/lib/CORE/dosish.h index 8c3917b510d..8b34369ab5c 100644 --- a/Master/tlpkg/tlperl/lib/CORE/dosish.h +++ b/Master/tlpkg/tlperl/lib/CORE/dosish.h @@ -58,23 +58,6 @@ #endif #define dXSUB_SYS -/* - * 5.003_07 and earlier keyed on #ifdef MSDOS for determining if we were - * running on DOS, *and* if we had to cope with 16 bit memory addressing - * constraints, *and* we need to have memory allocated as unsigned long. - * - * with the advent of *real* compilers for DOS, they are not locked together. - * MSDOS means "I am running on MSDOS". HAS_64K_LIMIT means "I have - * 16 bit memory addressing constraints". - * - * if you need the last, try #DEFINE MEM_SIZE unsigned long. - */ -#ifdef MSDOS -# ifndef DJGPP -# define HAS_64K_LIMIT -# endif -#endif - /* USEMYBINMODE * This symbol, if defined, indicates that the program should * use the routine my_binmode(FILE *fp, char iotype, int mode) to insure diff --git a/Master/tlpkg/tlperl/lib/CORE/embed.h b/Master/tlpkg/tlperl/lib/CORE/embed.h index 71456cbe205..a6e3b9d1820 100644 --- a/Master/tlpkg/tlperl/lib/CORE/embed.h +++ b/Master/tlpkg/tlperl/lib/CORE/embed.h @@ -35,12 +35,13 @@ #define _is_utf8_perl_idcont(a) Perl__is_utf8_perl_idcont(aTHX_ a) #define _is_utf8_perl_idstart(a) Perl__is_utf8_perl_idstart(aTHX_ a) #define _to_uni_fold_flags(a,b,c,d) Perl__to_uni_fold_flags(aTHX_ a,b,c,d) -#define _to_utf8_fold_flags(a,b,c,d,e) Perl__to_utf8_fold_flags(aTHX_ a,b,c,d,e) -#define _to_utf8_lower_flags(a,b,c,d,e) Perl__to_utf8_lower_flags(aTHX_ a,b,c,d,e) -#define _to_utf8_title_flags(a,b,c,d,e) Perl__to_utf8_title_flags(aTHX_ a,b,c,d,e) -#define _to_utf8_upper_flags(a,b,c,d,e) Perl__to_utf8_upper_flags(aTHX_ a,b,c,d,e) +#define _to_utf8_fold_flags(a,b,c,d) Perl__to_utf8_fold_flags(aTHX_ a,b,c,d) +#define _to_utf8_lower_flags(a,b,c,d) Perl__to_utf8_lower_flags(aTHX_ a,b,c,d) +#define _to_utf8_title_flags(a,b,c,d) Perl__to_utf8_title_flags(aTHX_ a,b,c,d) +#define _to_utf8_upper_flags(a,b,c,d) Perl__to_utf8_upper_flags(aTHX_ a,b,c,d) #define amagic_call(a,b,c,d) Perl_amagic_call(aTHX_ a,b,c,d) #define amagic_deref_call(a,b) Perl_amagic_deref_call(aTHX_ a,b) +#define append_utf8_from_native_byte S_append_utf8_from_native_byte #define apply_attrs_string(a,b,c,d) Perl_apply_attrs_string(aTHX_ a,b,c,d) #define atfork_lock Perl_atfork_lock #define atfork_unlock Perl_atfork_unlock @@ -84,6 +85,7 @@ #ifndef PERL_IMPLICIT_CONTEXT #define croak Perl_croak #endif +#define croak_memory_wrap S_croak_memory_wrap #define croak_no_modify Perl_croak_no_modify #define croak_sv(a) Perl_croak_sv(aTHX_ a) #define croak_xs_usage Perl_croak_xs_usage @@ -229,6 +231,7 @@ #define instr Perl_instr #define is_ascii_string Perl_is_ascii_string #define is_lvalue_sub() Perl_is_lvalue_sub(aTHX) +#define is_safe_syscall(a,b,c,d) S_is_safe_syscall(aTHX_ a,b,c,d) #define is_uni_alnum(a) Perl_is_uni_alnum(aTHX_ a) #define is_uni_alnum_lc(a) Perl_is_uni_alnum_lc(aTHX_ a) #define is_uni_alnumc(a) Perl_is_uni_alnumc(aTHX_ a) @@ -340,7 +343,6 @@ #define newANONLIST(a) Perl_newANONLIST(aTHX_ a) #define newANONSUB(a,b,c) Perl_newANONSUB(aTHX_ a,b,c) #define newASSIGNOP(a,b,c,d) Perl_newASSIGNOP(aTHX_ a,b,c,d) -#define newATTRSUB(a,b,c,d,e) Perl_newATTRSUB(aTHX_ a,b,c,d,e) #define newAVREF(a) Perl_newAVREF(aTHX_ a) #define newBINOP(a,b,c,d) Perl_newBINOP(aTHX_ a,b,c,d) #define newCONDOP(a,b,c,d) Perl_newCONDOP(aTHX_ a,b,c,d) @@ -451,7 +453,7 @@ #define pv_pretty(a,b,c,d,e,f,g) Perl_pv_pretty(aTHX_ a,b,c,d,e,f,g) #define pv_uni_display(a,b,c,d,e) Perl_pv_uni_display(aTHX_ a,b,c,d,e) #define re_compile(a,b) Perl_re_compile(aTHX_ a,b) -#define re_intuit_start(a,b,c,d,e,f) Perl_re_intuit_start(aTHX_ a,b,c,d,e,f) +#define re_intuit_start(a,b,c,d,e,f,g) Perl_re_intuit_start(aTHX_ a,b,c,d,e,f,g) #define re_intuit_string(a) Perl_re_intuit_string(aTHX_ a) #define reentrant_free() Perl_reentrant_free(aTHX) #define reentrant_init() Perl_reentrant_init(aTHX) @@ -607,6 +609,7 @@ #define sv_nv(a) Perl_sv_nv(aTHX_ a) #define sv_peek(a) Perl_sv_peek(aTHX_ a) #define sv_pos_b2u(a,b) Perl_sv_pos_b2u(aTHX_ a,b) +#define sv_pos_b2u_flags(a,b,c) Perl_sv_pos_b2u_flags(aTHX_ a,b,c) #define sv_pos_u2b(a,b,c) Perl_sv_pos_u2b(aTHX_ a,b,c) #define sv_pos_u2b_flags(a,b,c,d) Perl_sv_pos_u2b_flags(aTHX_ a,b,c,d) #define sv_pvbyten(a,b) Perl_sv_pvbyten(aTHX_ a,b) @@ -689,12 +692,14 @@ #define utf8_length(a,b) Perl_utf8_length(aTHX_ a,b) #define utf8_to_bytes(a,b) Perl_utf8_to_bytes(aTHX_ a,b) #define utf8_to_uvchr(a,b) Perl_utf8_to_uvchr(aTHX_ a,b) -#define utf8_to_uvchr_buf(a,b,c) Perl_utf8_to_uvchr_buf(aTHX_ a,b,c) #define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) #define utf8_to_uvuni_buf(a,b,c) Perl_utf8_to_uvuni_buf(aTHX_ a,b,c) +#define utf8n_to_uvchr(a,b,c,d) Perl_utf8n_to_uvchr(aTHX_ a,b,c,d) #define utf8n_to_uvuni(a,b,c,d) Perl_utf8n_to_uvuni(aTHX_ a,b,c,d) -#define uvchr_to_utf8_flags(a,b,c) Perl_uvchr_to_utf8_flags(aTHX_ a,b,c) +#define uvoffuni_to_utf8_flags(a,b,c) Perl_uvoffuni_to_utf8_flags(aTHX_ a,b,c) +#define uvuni_to_utf8(a,b) Perl_uvuni_to_utf8(aTHX_ a,b) #define uvuni_to_utf8_flags(a,b,c) Perl_uvuni_to_utf8_flags(aTHX_ a,b,c) +#define valid_utf8_to_uvchr(a,b) Perl_valid_utf8_to_uvchr(aTHX_ a,b) #define valid_utf8_to_uvuni(a,b) Perl_valid_utf8_to_uvuni(aTHX_ a,b) #define vcmp(a,b) Perl_vcmp(aTHX_ a,b) #define vcroak(a,b) Perl_vcroak(aTHX_ a,b) @@ -752,14 +757,6 @@ #define pad_setsv(a,b) Perl_pad_setsv(aTHX_ a,b) #define pad_sv(a) Perl_pad_sv(aTHX_ a) #endif -#if defined(DUMP_FDS) -#define dump_fds(a) Perl_dump_fds(aTHX_ a) -#endif -#if defined(EBCDIC) -#define utf8n_to_uvchr(a,b,c,d) Perl_utf8n_to_uvchr(aTHX_ a,b,c,d) -#define uvchr_to_utf8(a,b) Perl_uvchr_to_utf8(aTHX_ a,b) -#define valid_utf8_to_uvchr(a,b) Perl_valid_utf8_to_uvchr(aTHX_ a,b) -#endif #if defined(HAS_SIGACTION) && defined(SA_SIGINFO) #define csighandler Perl_csighandler #endif @@ -774,11 +771,6 @@ #define dump_mstats(a) Perl_dump_mstats(aTHX_ a) #define get_mstats(a,b,c) Perl_get_mstats(aTHX_ a,b,c) #endif -#if defined(MYSWAP) -#define my_htonl(a) Perl_my_htonl(aTHX_ a) -#define my_ntohl(a) Perl_my_ntohl(aTHX_ a) -#define my_swap(a) Perl_my_swap(aTHX_ a) -#endif #if defined(PERL_GLOBAL_STRUCT) #define GetVars() Perl_GetVars(aTHX) #define free_global_struct(a) Perl_free_global_struct(aTHX_ a) @@ -801,6 +793,12 @@ #define warn_nocontext Perl_warn_nocontext #define warner_nocontext Perl_warner_nocontext #endif +#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C) +#define _new_invlist_C_array(a) Perl__new_invlist_C_array(aTHX_ a) +#endif +#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) +#define _get_regclass_nonbitmap_data(a,b,c,d,e) Perl__get_regclass_nonbitmap_data(aTHX_ a,b,c,d,e) +#endif #if defined(PERL_MAD) #define newFORM(a,b,c) Perl_newFORM(aTHX_ a,b,c) #endif @@ -830,7 +828,7 @@ #if defined(USE_LOCALE_COLLATE) #define sv_collxfrm_flags(a,b,c) Perl_sv_collxfrm_flags(aTHX_ a,b,c) #endif -#if defined(USE_PERLIO) && !defined(USE_SFIO) +#if defined(USE_PERLIO) #define PerlIO_clearerr(a) Perl_PerlIO_clearerr(aTHX_ a) #define PerlIO_close(a) Perl_PerlIO_close(aTHX_ a) #define PerlIO_eof(a) Perl_PerlIO_eof(aTHX_ a) @@ -854,6 +852,9 @@ #define PerlIO_unread(a,b,c) Perl_PerlIO_unread(aTHX_ a,b,c) #define PerlIO_write(a,b,c) Perl_PerlIO_write(aTHX_ a,b,c) #endif +#if defined(WIN32) +#define my_setlocale(a,b) Perl_my_setlocale(aTHX_ a,b) +#endif #if defined(WIN32) || defined(__SYMBIAN32__) || defined(VMS) #define do_aspawn(a,b,c) Perl_do_aspawn(aTHX_ a,b,c) #define do_spawn(a) Perl_do_spawn(aTHX_ a) @@ -862,6 +863,8 @@ #if defined(PERL_CORE) || defined(PERL_EXT) #define av_reify(a) Perl_av_reify(aTHX_ a) #define current_re_engine() Perl_current_re_engine(aTHX) +#define cv_ckproto_len_flags(a,b,c,d,e) Perl_cv_ckproto_len_flags(aTHX_ a,b,c,d,e) +#define mg_find_mglob(a) Perl_mg_find_mglob(aTHX_ a) #define op_clear(a) Perl_op_clear(aTHX_ a) #define qerror(a) Perl_qerror(aTHX_ a) #define reg_named_buff(a,b,c,d) Perl_reg_named_buff(aTHX_ a,b,c,d) @@ -871,8 +874,10 @@ #define reg_numbered_buff_store(a,b,c) Perl_reg_numbered_buff_store(aTHX_ a,b,c) #define reg_qr_package(a) Perl_reg_qr_package(aTHX_ a) #define reg_temp_copy(a,b) Perl_reg_temp_copy(aTHX_ a,b) -#define regprop(a,b,c) Perl_regprop(aTHX_ a,b,c) +#define regprop(a,b,c,d) Perl_regprop(aTHX_ a,b,c,d) #define report_uninit(a) Perl_report_uninit(aTHX_ a) +#define sv_magicext_mglob(a) Perl_sv_magicext_mglob(aTHX_ a) +#define validate_proto(a,b,c) Perl_validate_proto(aTHX_ a,b,c) #define vivify_defelem(a) Perl_vivify_defelem(aTHX_ a) #define yylex() Perl_yylex(aTHX) # if defined(DEBUGGING) @@ -882,7 +887,10 @@ #define dump_trie_interim_table(a,b,c,d,e) S_dump_trie_interim_table(aTHX_ a,b,c,d,e) #define dumpuntil(a,b,c,d,e,f,g,h) S_dumpuntil(aTHX_ a,b,c,d,e,f,g,h) #define put_byte(a,b) S_put_byte(aTHX_ a,b) +#define put_latin1_charclass_innards(a,b) S_put_latin1_charclass_innards(aTHX_ a,b) +#define put_range(a,b,c) S_put_range(aTHX_ a,b,c) #define regdump_extflags(a,b) S_regdump_extflags(aTHX_ a,b) +#define regdump_intflags(a,b) S_regdump_intflags(aTHX_ a,b) #define regtail_study(a,b,c,d) S_regtail_study(aTHX_ a,b,c,d) # endif # if defined(PERL_IN_REGEXEC_C) @@ -893,24 +901,20 @@ # if defined(PERL_ANY_COW) #define sv_setsv_cow(a,b) Perl_sv_setsv_cow(aTHX_ a,b) # endif +# if defined(PERL_CORE) || defined (PERL_EXT) +#define sv_or_pv_pos_u2b(a,b,c,d) S_sv_or_pv_pos_u2b(aTHX_ a,b,c,d) +# endif # if defined(PERL_IN_REGCOMP_C) #define _append_range_to_invlist(a,b,c) S__append_range_to_invlist(aTHX_ a,b,c) #define _invlist_array_init(a,b) S__invlist_array_init(aTHX_ a,b) -#define _new_invlist_C_array(a) S__new_invlist_C_array(aTHX_ a) #define add_cp_to_invlist(a,b) S_add_cp_to_invlist(aTHX_ a,b) #define add_data S_add_data -#define alloc_maybe_populate_EXACT(a,b,c,d,e) S_alloc_maybe_populate_EXACT(aTHX_ a,b,c,d,e) -#define cl_and S_cl_and -#define cl_anything S_cl_anything -#define cl_init S_cl_init -#define cl_is_anything S_cl_is_anything -#define cl_or S_cl_or +#define alloc_maybe_populate_EXACT(a,b,c,d,e,f) S_alloc_maybe_populate_EXACT(aTHX_ a,b,c,d,e,f) #define compute_EXACTish(a) S_compute_EXACTish(aTHX_ a) #define could_it_be_a_POSIX_class(a) S_could_it_be_a_POSIX_class(aTHX_ a) +#define get_ANYOF_cp_list_for_ssc(a,b) S_get_ANYOF_cp_list_for_ssc(aTHX_ a,b) #define get_invlist_iter_addr(a) S_get_invlist_iter_addr(aTHX_ a) #define get_invlist_previous_index_addr(a) S_get_invlist_previous_index_addr(aTHX_ a) -#define get_invlist_version_id_addr(a) S_get_invlist_version_id_addr(aTHX_ a) -#define get_invlist_zero_addr(a) S_get_invlist_zero_addr(aTHX_ a) #define grok_bslash_N(a,b,c,d,e,f,g) S_grok_bslash_N(aTHX_ a,b,c,d,e,f,g) #define handle_regex_sets(a,b,c,d,e) S_handle_regex_sets(aTHX_ a,b,c,d,e) #define invlist_array(a) S_invlist_array(aTHX_ a) @@ -923,7 +927,7 @@ #define invlist_iternext(a,b,c) S_invlist_iternext(aTHX_ a,b,c) #define invlist_max(a) S_invlist_max(aTHX_ a) #define invlist_previous_index(a) S_invlist_previous_index(aTHX_ a) -#define invlist_set_len(a,b) S_invlist_set_len(aTHX_ a,b) +#define invlist_set_len(a,b,c) S_invlist_set_len(aTHX_ a,b,c) #define invlist_set_previous_index(a,b) S_invlist_set_previous_index(aTHX_ a,b) #define invlist_trim(a) S_invlist_trim(aTHX_ a) #define join_exact(a,b,c,d,e,f,g) S_join_exact(aTHX_ a,b,c,d,e,f,g) @@ -931,6 +935,7 @@ #define make_trie_failtable(a,b,c,d) S_make_trie_failtable(aTHX_ a,b,c,d) #define nextchar(a) S_nextchar(aTHX_ a) #define parse_lparen_question_flags(a) S_parse_lparen_question_flags(aTHX_ a) +#define populate_ANYOF_from_invlist(a,b) S_populate_ANYOF_from_invlist(aTHX_ a,b) #define reg(a,b,c,d) S_reg(aTHX_ a,b,c,d) #define reg_node(a,b) S_reg_node(aTHX_ a,b) #define reg_recode(a,b) S_reg_recode(aTHX_ a,b) @@ -948,23 +953,39 @@ #define reguni(a,b,c) S_reguni(aTHX_ a,b,c) #define regwhite S_regwhite #define scan_commit(a,b,c,d) S_scan_commit(aTHX_ a,b,c,d) +#define set_ANYOF_arg(a,b,c,d,e,f,g) S_set_ANYOF_arg(aTHX_ a,b,c,d,e,f,g) +#define ssc_add_range(a,b,c) S_ssc_add_range(aTHX_ a,b,c) +#define ssc_and(a,b,c) S_ssc_and(aTHX_ a,b,c) +#define ssc_anything(a) S_ssc_anything(aTHX_ a) +#define ssc_clear_locale(a) S_ssc_clear_locale(aTHX_ a) +#define ssc_cp_and(a,b) S_ssc_cp_and(aTHX_ a,b) +#define ssc_finalize(a,b) S_ssc_finalize(aTHX_ a,b) +#define ssc_init(a,b) S_ssc_init(aTHX_ a,b) +#define ssc_intersection(a,b,c) S_ssc_intersection(aTHX_ a,b,c) +#define ssc_is_anything(a) S_ssc_is_anything(aTHX_ a) +#define ssc_is_cp_posixl_init(a,b) S_ssc_is_cp_posixl_init(aTHX_ a,b) +#define ssc_or(a,b,c) S_ssc_or(aTHX_ a,b,c) +#define ssc_union(a,b,c) S_ssc_union(aTHX_ a,b,c) #define study_chunk(a,b,c,d,e,f,g,h,i,j,k) S_study_chunk(aTHX_ a,b,c,d,e,f,g,h,i,j,k) # endif +# if defined(PERL_IN_REGCOMP_C) || defined (PERL_IN_DUMP_C) +#define _invlist_dump(a,b,c,d) Perl__invlist_dump(aTHX_ a,b,c,d) +# endif # if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) -#define _get_invlist_len_addr(a) S__get_invlist_len_addr(aTHX_ a) #define _get_swash_invlist(a) Perl__get_swash_invlist(aTHX_ a) #define _invlist_contains_cp(a,b) S__invlist_contains_cp(aTHX_ a,b) #define _invlist_contents(a) Perl__invlist_contents(aTHX_ a) #define _invlist_len(a) S__invlist_len(aTHX_ a) #define _invlist_search(a,b) Perl__invlist_search(aTHX_ a,b) #define _swash_inversion_hash(a) Perl__swash_inversion_hash(aTHX_ a) +#define get_invlist_offset_addr(a) S_get_invlist_offset_addr(aTHX_ a) # endif # if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C) #define _core_swash_init(a,b,c,d,e,f,g) Perl__core_swash_init(aTHX_ a,b,c,d,e,f,g) # endif # if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) #define form_short_octal_warning(a,b) S_form_short_octal_warning(aTHX_ a,b) -#define grok_bslash_c(a,b,c) S_grok_bslash_c(aTHX_ a,b,c) +#define grok_bslash_c(a,b) S_grok_bslash_c(aTHX_ a,b) #define grok_bslash_o(a,b,c,d,e,f,g) S_grok_bslash_o(aTHX_ a,b,c,d,e,f,g) #define grok_bslash_x(a,b,c,d,e,f,g) S_grok_bslash_x(aTHX_ a,b,c,d,e,f,g) #define regcurly(a,b) S_regcurly(aTHX_ a,b) @@ -973,31 +994,28 @@ #define _add_range_to_invlist(a,b,c) Perl__add_range_to_invlist(aTHX_ a,b,c) #define _invlist_intersection_maybe_complement_2nd(a,b,c,d) Perl__invlist_intersection_maybe_complement_2nd(aTHX_ a,b,c,d) #define _invlist_invert(a) Perl__invlist_invert(aTHX_ a) -#define _invlist_invert_prop(a) Perl__invlist_invert_prop(aTHX_ a) #define _invlist_populate_swatch(a,b,c,d) Perl__invlist_populate_swatch(aTHX_ a,b,c,d) #define _invlist_union_maybe_complement_2nd(a,b,c,d) Perl__invlist_union_maybe_complement_2nd(aTHX_ a,b,c,d) #define _new_invlist(a) Perl__new_invlist(aTHX_ a) +#define _setup_canned_invlist(a,b,c) Perl__setup_canned_invlist(aTHX_ a,b,c) #define _swash_to_invlist(a) Perl__swash_to_invlist(aTHX_ a) # endif # if defined(PERL_IN_REGEXEC_C) -#define core_regclass_swash(a,b,c,d) S_core_regclass_swash(aTHX_ a,b,c,d) -#define find_byclass(a,b,c,d,e,f) S_find_byclass(aTHX_ a,b,c,d,e,f) +#define find_byclass(a,b,c,d,e) S_find_byclass(aTHX_ a,b,c,d,e) #define isFOO_lc(a,b) S_isFOO_lc(aTHX_ a,b) #define isFOO_utf8_lc(a,b) S_isFOO_utf8_lc(aTHX_ a,b) #define reg_check_named_buff_matched(a,b) S_reg_check_named_buff_matched(aTHX_ a,b) #define regcppop(a,b) S_regcppop(aTHX_ a,b) #define regcppush(a,b,c) S_regcppush(aTHX_ a,b,c) #define reghop3 S_reghop3 +#define reghop4 S_reghop4 #define reghopmaybe3 S_reghopmaybe3 -#define reginclass(a,b,c,d) S_reginclass(aTHX_ a,b,c,d) +#define reginclass(a,b,c,d,e) S_reginclass(aTHX_ a,b,c,d,e) #define regmatch(a,b,c) S_regmatch(aTHX_ a,b,c) #define regrepeat(a,b,c,d,e,f) S_regrepeat(aTHX_ a,b,c,d,e,f) #define regtry(a,b) S_regtry(aTHX_ a,b) #define to_byte_substr(a) S_to_byte_substr(aTHX_ a) #define to_utf8_substr(a) S_to_utf8_substr(aTHX_ a) -# if defined(XXX_dmq) -#define reghop4 S_reghop4 -# endif # endif # if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) #define _to_fold_latin1(a,b,c,d) Perl__to_fold_latin1(aTHX_ a,b,c,d) @@ -1019,18 +1037,17 @@ #define cando(a,b,c) Perl_cando(aTHX_ a,b,c) #define check_utf8_print(a,b) Perl_check_utf8_print(aTHX_ a,b) #define ck_anoncode(a) Perl_ck_anoncode(aTHX_ a) +#define ck_backtick(a) Perl_ck_backtick(aTHX_ a) #define ck_bitop(a) Perl_ck_bitop(aTHX_ a) #define ck_cmp(a) Perl_ck_cmp(aTHX_ a) #define ck_concat(a) Perl_ck_concat(aTHX_ a) #define ck_defined(a) Perl_ck_defined(aTHX_ a) #define ck_delete(a) Perl_ck_delete(aTHX_ a) -#define ck_die(a) Perl_ck_die(aTHX_ a) #define ck_each(a) Perl_ck_each(aTHX_ a) #define ck_eof(a) Perl_ck_eof(aTHX_ a) #define ck_eval(a) Perl_ck_eval(aTHX_ a) #define ck_exec(a) Perl_ck_exec(aTHX_ a) #define ck_exists(a) Perl_ck_exists(aTHX_ a) -#define ck_exit(a) Perl_ck_exit(aTHX_ a) #define ck_ftst(a) Perl_ck_ftst(aTHX_ a) #define ck_fun(a) Perl_ck_fun(aTHX_ a) #define ck_glob(a) Perl_ck_glob(aTHX_ a) @@ -1062,18 +1079,21 @@ #define ck_svconst(a) Perl_ck_svconst(aTHX_ a) #define ck_tell(a) Perl_ck_tell(aTHX_ a) #define ck_trunc(a) Perl_ck_trunc(aTHX_ a) +#define closest_cop(a,b,c,d) Perl_closest_cop(aTHX_ a,b,c,d) #define convert(a,b,c) Perl_convert(aTHX_ a,b,c) #define core_prototype(a,b,c,d) Perl_core_prototype(aTHX_ a,b,c,d) #define coresub_op(a,b,c) Perl_coresub_op(aTHX_ a,b,c) #define create_eval_scope(a) Perl_create_eval_scope(aTHX_ a) #define croak_no_mem Perl_croak_no_mem #define croak_popstack Perl_croak_popstack -#define cv_ckproto_len_flags(a,b,c,d,e) Perl_cv_ckproto_len_flags(aTHX_ a,b,c,d,e) +#define custom_op_get_field(a,b) Perl_custom_op_get_field(aTHX_ a,b) #define cv_clone_into(a,b) Perl_cv_clone_into(aTHX_ a,b) +#define cv_const_sv_or_av(a) Perl_cv_const_sv_or_av(aTHX_ a) #define cv_forget_slab(a) Perl_cv_forget_slab(aTHX_ a) #define cvgv_set(a,b) Perl_cvgv_set(aTHX_ a,b) #define cvstash_set(a,b) Perl_cvstash_set(aTHX_ a,b) #define deb_stack_all() Perl_deb_stack_all(aTHX) +#define defelem_target(a,b) Perl_defelem_target(aTHX_ a,b) #define delete_eval_scope() Perl_delete_eval_scope(aTHX) #define die_unwind(a) Perl_die_unwind(aTHX_ a) #define do_aexec5(a,b,c,d,e) Perl_do_aexec5(aTHX_ a,b,c,d,e) @@ -1081,6 +1101,8 @@ #define do_eof(a) Perl_do_eof(aTHX_ a) #define do_execfree() Perl_do_execfree(aTHX) #define do_ncmp(a,b) Perl_do_ncmp(aTHX_ a,b) +#define do_open6(a,b,c,d,e,f) Perl_do_open6(aTHX_ a,b,c,d,e,f) +#define do_open_raw(a,b,c,d,e) Perl_do_open_raw(aTHX_ a,b,c,d,e) #define do_print(a,b) Perl_do_print(aTHX_ a,b) #define do_readline() Perl_do_readline(aTHX) #define do_seek(a,b,c) Perl_do_seek(aTHX_ a,b,c) @@ -1103,6 +1125,7 @@ #define get_hash_seed(a) Perl_get_hash_seed(aTHX_ a) #define get_no_modify() Perl_get_no_modify(aTHX) #define get_opargs() Perl_get_opargs(aTHX) +#define gv_override(a,b) Perl_gv_override(aTHX_ a,b) #define gv_try_downgrade(a) Perl_gv_try_downgrade(aTHX_ a) #define hv_ename_add(a,b,c,d) Perl_hv_ename_add(aTHX_ a,b,c,d) #define hv_ename_delete(a,b,c,d) Perl_hv_ename_delete(aTHX_ a,b,c,d) @@ -1175,10 +1198,10 @@ #define my_clearenv() Perl_my_clearenv(aTHX) #define my_lstat_flags(a) Perl_my_lstat_flags(aTHX_ a) #define my_stat_flags(a) Perl_my_stat_flags(aTHX_ a) -#define my_swabn Perl_my_swabn #define my_unexec() Perl_my_unexec(aTHX) -#define newATTRSUB_flags(a,b,c,d,e,f) Perl_newATTRSUB_flags(aTHX_ a,b,c,d,e,f) +#define newATTRSUB_x(a,b,c,d,e,f) Perl_newATTRSUB_x(aTHX_ a,b,c,d,e,f) #define newSTUB(a,b) Perl_newSTUB(aTHX_ a,b) +#define newSVavdefelem(a,b,c) Perl_newSVavdefelem(aTHX_ a,b,c) #define newXS_len_flags(a,b,c,d,e,f,g) Perl_newXS_len_flags(aTHX_ a,b,c,d,e,f,g) #define nextargv(a) Perl_nextargv(aTHX_ a) #define oopsAV(a) Perl_oopsAV(aTHX_ a) @@ -1193,6 +1216,7 @@ #define pad_push(a,b) Perl_pad_push(aTHX_ a,b) #define pad_swipe(a,b) Perl_pad_swipe(aTHX_ a,b) #define padlist_store(a,b,c) Perl_padlist_store(aTHX_ a,b,c) +#define parse_subsignature() Perl_parse_subsignature(aTHX) #define parse_unicode_opts(a) Perl_parse_unicode_opts(aTHX_ a) #define parser_free(a) Perl_parser_free(aTHX_ a) #define peep(a) Perl_peep(aTHX_ a) @@ -1213,9 +1237,11 @@ #define rsignal_restore(a,b) Perl_rsignal_restore(aTHX_ a,b) #define rsignal_save(a,b,c) Perl_rsignal_save(aTHX_ a,b,c) #define rxres_save(a,b) Perl_rxres_save(aTHX_ a,b) +#define save_strlen(a) Perl_save_strlen(aTHX_ a) #define sawparens(a) Perl_sawparens(aTHX_ a) #define scalar(a) Perl_scalar(aTHX_ a) #define scalarvoid(a) Perl_scalarvoid(aTHX_ a) +#define set_caret_X() Perl_set_caret_X(aTHX) #define sub_crush_depth(a) Perl_sub_crush_depth(aTHX_ a) #define sv_2num(a) Perl_sv_2num(aTHX_ a) #define sv_clean_all() Perl_sv_clean_all(aTHX) @@ -1344,6 +1370,12 @@ #define strip_return(a) S_strip_return(aTHX_ a) # endif # endif +# if defined(PERL_DEBUG_READONLY_COW) +#define sv_buf_to_ro(a) Perl_sv_buf_to_ro(aTHX_ a) +# if defined(PERL_IN_SV_C) +#define sv_buf_to_rw(a) S_sv_buf_to_rw(aTHX_ a) +# endif +# endif # if defined(PERL_IN_AV_C) #define get_aux_mg(a) S_get_aux_mg(aTHX_ a) # endif @@ -1353,6 +1385,8 @@ # if defined(PERL_IN_DOIO_C) #define exec_failed(a,b,c) S_exec_failed(aTHX_ a,b,c) #define ingroup(a,b) S_ingroup(aTHX_ a,b) +#define openn_cleanup(a,b,c,d,e,f,g,h,i,j,k,l) S_openn_cleanup(aTHX_ a,b,c,d,e,f,g,h,i,j,k,l) +#define openn_setup(a,b,c,d,e,f) S_openn_setup(aTHX_ a,b,c,d,e,f) # endif # if defined(PERL_IN_DOOP_C) #define do_trans_complex(a) S_do_trans_complex(aTHX_ a) @@ -1369,8 +1403,13 @@ #define sequence_num(a) S_sequence_num(aTHX_ a) # endif # if defined(PERL_IN_GV_C) +#define find_default_stash(a,b,c,d,e,f) S_find_default_stash(aTHX_ a,b,c,d,e,f) #define gv_init_svtype(a,b) S_gv_init_svtype(aTHX_ a,b) +#define gv_is_in_main(a,b,c) S_gv_is_in_main(aTHX_ a,b,c) +#define gv_magicalize(a,b,c,d,e,f) S_gv_magicalize(aTHX_ a,b,c,d,e,f) #define gv_magicalize_isa(a) S_gv_magicalize_isa(aTHX_ a) +#define maybe_multimagic_gv(a,b,c) S_maybe_multimagic_gv(aTHX_ a,b,c) +#define parse_gv_stash_name(a,b,c,d,e,f,g,h) S_parse_gv_stash_name(aTHX_ a,b,c,d,e,f,g,h) #define require_tie_mod(a,b,c,d,e) S_require_tie_mod(aTHX_ a,b,c,d,e) # endif # if defined(PERL_IN_HV_C) @@ -1378,6 +1417,7 @@ #define hfreeentries(a) S_hfreeentries(aTHX_ a) #define hsplit(a,b,c) S_hsplit(aTHX_ a,b,c) #define hv_auxinit(a) S_hv_auxinit(aTHX_ a) +#define hv_auxinit_internal S_hv_auxinit_internal #define hv_delete_common(a,b,c,d,e,f,g) S_hv_delete_common(aTHX_ a,b,c,d,e,f,g) #define hv_free_ent_ret(a,b) S_hv_free_ent_ret(aTHX_ a,b) #define hv_magic_check S_hv_magic_check @@ -1389,23 +1429,26 @@ #define share_hek_flags(a,b,c,d) S_share_hek_flags(aTHX_ a,b,c,d) #define unshare_hek_or_pvn(a,b,c,d) S_unshare_hek_or_pvn(aTHX_ a,b,c,d) # endif -# if defined(PERL_IN_LOCALE_C) -# if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE) +# if defined(PERL_IN_LOCALE_C) && defined(USE_LOCALE) +#define is_cur_LC_category_utf8(a) S_is_cur_LC_category_utf8(aTHX_ a) #define stdize_locale(a) S_stdize_locale(aTHX_ a) -# endif +# endif +# if defined(PERL_IN_MALLOC_C) +#define adjust_size_and_find_bucket S_adjust_size_and_find_bucket # endif # if defined(PERL_IN_MG_C) +#define fixup_errno_string(a) S_fixup_errno_string(aTHX_ a) #define magic_methcall1(a,b,c,d,e,f) S_magic_methcall1(aTHX_ a,b,c,d,e,f) #define magic_methpack(a,b,c) S_magic_methpack(aTHX_ a,b,c) #define restore_magic(a) S_restore_magic(aTHX_ a) -#define save_magic(a,b) S_save_magic(aTHX_ a,b) +#define save_magic_flags(a,b,c) S_save_magic_flags(aTHX_ a,b,c) #define unwind_handler_stack(a) S_unwind_handler_stack(aTHX_ a) # endif # if defined(PERL_IN_MG_C) || defined(PERL_IN_PP_C) #define translate_substr_offsets(a,b,c,d,e,f,g) Perl_translate_substr_offsets(aTHX_ a,b,c,d,e,f,g) # endif # if defined(PERL_IN_MRO_C) -#define mro_clean_isarev(a,b,c,d,e) S_mro_clean_isarev(aTHX_ a,b,c,d,e) +#define mro_clean_isarev(a,b,c,d,e,f) S_mro_clean_isarev(aTHX_ a,b,c,d,e,f) #define mro_gather_and_rename(a,b,c,d,e) S_mro_gather_and_rename(aTHX_ a,b,c,d,e) #define mro_get_linear_isa_dfs(a,b) S_mro_get_linear_isa_dfs(aTHX_ a,b) # endif @@ -1416,8 +1459,8 @@ #define aassign_common_vars(a) S_aassign_common_vars(aTHX_ a) #define apply_attrs(a,b,c) S_apply_attrs(aTHX_ a,b,c) #define apply_attrs_my(a,b,c,d) S_apply_attrs_my(aTHX_ a,b,c,d) +#define bad_type_gv(a,b,c,d,e) S_bad_type_gv(aTHX_ a,b,c,d,e) #define bad_type_pv(a,b,c,d,e) S_bad_type_pv(aTHX_ a,b,c,d,e) -#define bad_type_sv(a,b,c,d,e) S_bad_type_sv(aTHX_ a,b,c,d,e) #define cop_free(a) S_cop_free(aTHX_ a) #define dup_attrlist(a) S_dup_attrlist(aTHX_ a) #define finalize_op(a) S_finalize_op(aTHX_ a) @@ -1433,12 +1476,14 @@ #define listkids(a) S_listkids(aTHX_ a) #define looks_like_bool(a) S_looks_like_bool(aTHX_ a) #define modkids(a,b) S_modkids(aTHX_ a,b) +#define move_proto_attr(a,b,c) S_move_proto_attr(aTHX_ a,b,c) #define my_kid(a,b,c) S_my_kid(aTHX_ a,b,c) #define newDEFSVOP() S_newDEFSVOP(aTHX) #define newGIVWHENOP(a,b,c,d,e) S_newGIVWHENOP(aTHX_ a,b,c,d,e) #define new_logop(a,b,c,d) S_new_logop(aTHX_ a,b,c,d) #define no_bareword_allowed(a) S_no_bareword_allowed(aTHX_ a) #define no_fh_allowed(a) S_no_fh_allowed(aTHX_ a) +#define null_listop_in_list_context(a) S_null_listop_in_list_context(aTHX_ a) #define op_integerize(a) S_op_integerize(aTHX_ a) #define op_std_init(a) S_op_std_init(aTHX_ a) #define pmtrans(a,b,c) S_pmtrans(aTHX_ a,b,c) @@ -1491,7 +1536,7 @@ #define refto(a) S_refto(aTHX_ a) # endif # if defined(PERL_IN_PP_CTL_C) -#define adjust_stack_on_leave(a,b,c,d,e) S_adjust_stack_on_leave(aTHX_ a,b,c,d,e) +#define adjust_stack_on_leave(a,b,c,d,e,f) S_adjust_stack_on_leave(aTHX_ a,b,c,d,e,f) #define check_type_and_open(a) S_check_type_and_open(aTHX_ a) #define destroy_matcher(a) S_destroy_matcher(aTHX_ a) #define do_smartmatch(a,b,c) S_do_smartmatch(aTHX_ a,b,c) @@ -1508,7 +1553,7 @@ #define make_matcher(a) S_make_matcher(aTHX_ a) #define matcher_matches_sv(a,b) S_matcher_matches_sv(aTHX_ a,b) #define num_overflow S_num_overflow -#define path_is_absolute S_path_is_absolute +#define path_is_searchable S_path_is_searchable #define run_user_filter(a,b,c) S_run_user_filter(aTHX_ a,b,c) #define rxres_free(a) S_rxres_free(aTHX_ a) #define rxres_restore(a,b) S_rxres_restore(aTHX_ a,b) @@ -1603,7 +1648,7 @@ #define force_next(a) S_force_next(aTHX_ a) #define force_strict_version(a) S_force_strict_version(aTHX_ a) #define force_version(a,b) S_force_version(aTHX_ a,b) -#define force_word(a,b,c,d,e) S_force_word(aTHX_ a,b,c,d,e) +#define force_word(a,b,c,d) S_force_word(aTHX_ a,b,c,d) #define get_and_check_backslash_N_name(a,b) S_get_and_check_backslash_N_name(aTHX_ a,b) #define incline(a) S_incline(aTHX_ a) #define intuit_method(a,b,c) S_intuit_method(aTHX_ a,b,c) @@ -1613,18 +1658,17 @@ #define no_op(a,b) S_no_op(aTHX_ a,b) #define parse_ident(a,b,c,d,e) S_parse_ident(aTHX_ a,b,c,d,e) #define pending_ident() S_pending_ident(aTHX) -#define readpipe_override() S_readpipe_override(aTHX) #define scan_const(a) S_scan_const(aTHX_ a) #define scan_formline(a) S_scan_formline(aTHX_ a) #define scan_heredoc(a) S_scan_heredoc(aTHX_ a) -#define scan_ident(a,b,c,d,e) S_scan_ident(aTHX_ a,b,c,d,e) +#define scan_ident(a,b,c,d) S_scan_ident(aTHX_ a,b,c,d) #define scan_inputsymbol(a) S_scan_inputsymbol(aTHX_ a) #define scan_pat(a,b) S_scan_pat(aTHX_ a,b) -#define scan_str(a,b,c,d,e) S_scan_str(aTHX_ a,b,c,d,e) +#define scan_str(a,b,c,d,e,f) S_scan_str(aTHX_ a,b,c,d,e,f) #define scan_subst(a) S_scan_subst(aTHX_ a) #define scan_trans(a) S_scan_trans(aTHX_ a) #define scan_word(a,b,c,d,e) S_scan_word(aTHX_ a,b,c,d,e) -#define skipspace(a) S_skipspace(aTHX_ a) +#define skipspace_flags(a,b) S_skipspace_flags(aTHX_ a,b) #define sublex_done() S_sublex_done(aTHX) #define sublex_push() S_sublex_push(aTHX) #define sublex_start() S_sublex_start(aTHX) @@ -1647,7 +1691,7 @@ # if defined(PERL_IN_UTF8_C) #define check_locale_boundary_crossing(a,b,c,d) S_check_locale_boundary_crossing(aTHX_ a,b,c,d) #define is_utf8_char_slow S_is_utf8_char_slow -#define is_utf8_common(a,b,c) S_is_utf8_common(aTHX_ a,b,c) +#define is_utf8_common(a,b,c,d) S_is_utf8_common(aTHX_ a,b,c,d) #define swatch_get(a,b,c) S_swatch_get(aTHX_ a,b,c) #define to_lower_latin1(a,b,c) S_to_lower_latin1(aTHX_ a,b,c) # endif @@ -1656,7 +1700,6 @@ # endif # if defined(PERL_IN_UTIL_C) #define ckwarn_common(a) S_ckwarn_common(aTHX_ a) -#define closest_cop(a,b) S_closest_cop(aTHX_ a,b) #define invoke_exception_hook(a,b) S_invoke_exception_hook(aTHX_ a,b) #define mess_alloc() S_mess_alloc(aTHX) #define with_queued_errors(a) S_with_queued_errors(aTHX_ a) @@ -1702,78 +1745,6 @@ #define xmldump_sub_perl(a,b) Perl_xmldump_sub_perl(aTHX_ a,b) #define xmldump_vindent(a,b,c,d) Perl_xmldump_vindent(aTHX_ a,b,c,d) # endif -# if defined(PERL_NEED_MY_BETOH16) -#define my_betoh16 Perl_my_betoh16 -# endif -# if defined(PERL_NEED_MY_BETOH32) -#define my_betoh32 Perl_my_betoh32 -# endif -# if defined(PERL_NEED_MY_BETOH64) -#define my_betoh64 Perl_my_betoh64 -# endif -# if defined(PERL_NEED_MY_BETOHI) -#define my_betohi Perl_my_betohi -# endif -# if defined(PERL_NEED_MY_BETOHL) -#define my_betohl Perl_my_betohl -# endif -# if defined(PERL_NEED_MY_BETOHS) -#define my_betohs Perl_my_betohs -# endif -# if defined(PERL_NEED_MY_HTOBE16) -#define my_htobe16 Perl_my_htobe16 -# endif -# if defined(PERL_NEED_MY_HTOBE32) -#define my_htobe32 Perl_my_htobe32 -# endif -# if defined(PERL_NEED_MY_HTOBE64) -#define my_htobe64 Perl_my_htobe64 -# endif -# if defined(PERL_NEED_MY_HTOBEI) -#define my_htobei Perl_my_htobei -# endif -# if defined(PERL_NEED_MY_HTOBEL) -#define my_htobel Perl_my_htobel -# endif -# if defined(PERL_NEED_MY_HTOBES) -#define my_htobes Perl_my_htobes -# endif -# if defined(PERL_NEED_MY_HTOLE16) -#define my_htole16 Perl_my_htole16 -# endif -# if defined(PERL_NEED_MY_HTOLE32) -#define my_htole32 Perl_my_htole32 -# endif -# if defined(PERL_NEED_MY_HTOLE64) -#define my_htole64 Perl_my_htole64 -# endif -# if defined(PERL_NEED_MY_HTOLEI) -#define my_htolei Perl_my_htolei -# endif -# if defined(PERL_NEED_MY_HTOLEL) -#define my_htolel Perl_my_htolel -# endif -# if defined(PERL_NEED_MY_HTOLES) -#define my_htoles Perl_my_htoles -# endif -# if defined(PERL_NEED_MY_LETOH16) -#define my_letoh16 Perl_my_letoh16 -# endif -# if defined(PERL_NEED_MY_LETOH32) -#define my_letoh32 Perl_my_letoh32 -# endif -# if defined(PERL_NEED_MY_LETOH64) -#define my_letoh64 Perl_my_letoh64 -# endif -# if defined(PERL_NEED_MY_LETOHI) -#define my_letohi Perl_my_letohi -# endif -# if defined(PERL_NEED_MY_LETOHL) -#define my_letohl Perl_my_letohl -# endif -# if defined(PERL_NEED_MY_LETOHS) -#define my_letohs Perl_my_letohs -# endif # if defined(PERL_USES_PL_PIDSTATUS) && defined(PERL_IN_UTIL_C) #define pidgone(a,b) S_pidgone(aTHX_ a,b) # endif diff --git a/Master/tlpkg/tlperl/lib/CORE/embedvar.h b/Master/tlpkg/tlperl/lib/CORE/embedvar.h index e689c5e4fbd..5ae8d051b17 100644 --- a/Master/tlpkg/tlperl/lib/CORE/embedvar.h +++ b/Master/tlpkg/tlperl/lib/CORE/embedvar.h @@ -40,7 +40,6 @@ # define vTHX PERL_GET_INTERP # endif -#define PL_ASCII (vTHX->IASCII) #define PL_AboveLatin1 (vTHX->IAboveLatin1) #define PL_Argv (vTHX->IArgv) #define PL_Cmd (vTHX->ICmd) @@ -54,7 +53,6 @@ #define PL_Dir (vTHX->IDir) #define PL_Env (vTHX->IEnv) #define PL_HasMultiCharFold (vTHX->IHasMultiCharFold) -#define PL_L1Posix_ptrs (vTHX->IL1Posix_ptrs) #define PL_LIO (vTHX->ILIO) #define PL_Latin1 (vTHX->ILatin1) #define PL_Mem (vTHX->IMem) @@ -66,6 +64,7 @@ #define PL_Sock (vTHX->ISock) #define PL_StdIO (vTHX->IStdIO) #define PL_Sv (vTHX->ISv) +#define PL_UpperLatin1 (vTHX->IUpperLatin1) #define PL_XPosix_ptrs (vTHX->IXPosix_ptrs) #define PL_Xpv (vTHX->IXpv) #define PL_an (vTHX->Ian) @@ -157,12 +156,12 @@ #define PL_hash_rand_bits (vTHX->Ihash_rand_bits) #define PL_hash_rand_bits_enabled (vTHX->Ihash_rand_bits_enabled) #define PL_hintgv (vTHX->Ihintgv) -#define PL_hints (vTHX->Ihints) #define PL_hv_fetch_ent_mh (vTHX->Ihv_fetch_ent_mh) #define PL_in_clean_all (vTHX->Iin_clean_all) #define PL_in_clean_objs (vTHX->Iin_clean_objs) #define PL_in_eval (vTHX->Iin_eval) #define PL_in_load_module (vTHX->Iin_load_module) +#define PL_in_utf8_CTYPE_locale (vTHX->Iin_utf8_CTYPE_locale) #define PL_incgv (vTHX->Iincgv) #define PL_initav (vTHX->Iinitav) #define PL_inplace (vTHX->Iinplace) @@ -216,9 +215,9 @@ #define PL_ofsgv (vTHX->Iofsgv) #define PL_oldname (vTHX->Ioldname) #define PL_op (vTHX->Iop) +#define PL_op_exec_cnt (vTHX->Iop_exec_cnt) #define PL_op_mask (vTHX->Iop_mask) #define PL_opfreehook (vTHX->Iopfreehook) -#define PL_opsave (vTHX->Iopsave) #define PL_origalen (vTHX->Iorigalen) #define PL_origargc (vTHX->Iorigargc) #define PL_origargv (vTHX->Iorigargv) @@ -243,10 +242,10 @@ #define PL_psig_pend (vTHX->Ipsig_pend) #define PL_psig_ptr (vTHX->Ipsig_ptr) #define PL_ptr_table (vTHX->Iptr_table) +#define PL_random_state (vTHX->Irandom_state) #define PL_reentrant_buffer (vTHX->Ireentrant_buffer) #define PL_reentrant_retint (vTHX->Ireentrant_retint) -#define PL_reg_state (vTHX->Ireg_state) -#define PL_regdummy (vTHX->Iregdummy) +#define PL_reg_curpm (vTHX->Ireg_curpm) #define PL_regex_pad (vTHX->Iregex_pad) #define PL_regex_padav (vTHX->Iregex_padav) #define PL_registered_mros (vTHX->Iregistered_mros) @@ -302,6 +301,7 @@ #define PL_subline (vTHX->Isubline) #define PL_subname (vTHX->Isubname) #define PL_sv_arenaroot (vTHX->Isv_arenaroot) +#define PL_sv_consts (vTHX->Isv_consts) #define PL_sv_count (vTHX->Isv_count) #define PL_sv_no (vTHX->Isv_no) #define PL_sv_objcount (vTHX->Isv_objcount) diff --git a/Master/tlpkg/tlperl/lib/CORE/fakethr.h b/Master/tlpkg/tlperl/lib/CORE/fakethr.h deleted file mode 100644 index 643806de26f..00000000000 --- a/Master/tlpkg/tlperl/lib/CORE/fakethr.h +++ /dev/null @@ -1,75 +0,0 @@ -/* fakethr.h - * - * Copyright (C) 1999, by Larry Wall and others - * - * You may distribute under the terms of either the GNU General Public - * License or the Artistic License, as specified in the README file. - * - */ - -typedef int perl_mutex; -typedef int perl_key; - -typedef struct perl_thread *perl_os_thread; -/* With fake threads, thr is global(ish) so we don't need dTHR */ -#define dTHR extern int errno - -struct perl_wait_queue { - struct perl_thread * thread; - struct perl_wait_queue * next; -}; -typedef struct perl_wait_queue *perl_cond; - -/* Ask thread.h to include our per-thread extras */ -#define HAVE_THREAD_INTERN -struct thread_intern { - perl_os_thread next_run, prev_run; /* Linked list of runnable threads */ - perl_cond wait_queue; /* Wait queue that we are waiting on */ - IV private; /* Holds data across time slices */ - I32 savemark; /* Holds MARK for thread join values */ -}; - -#define init_thread_intern(t) \ - STMT_START { \ - t->self = (t); \ - (t)->i.next_run = (t)->i.prev_run = (t); \ - (t)->i.wait_queue = 0; \ - (t)->i.private = 0; \ - } STMT_END - -/* - * Note that SCHEDULE() is only callable from pp code (which - * must be expecting to be restarted). We'll have to do - * something a bit different for XS code. - */ - -#define SCHEDULE() return schedule(), PL_op - -#define MUTEX_LOCK(m) -#define MUTEX_UNLOCK(m) -#define MUTEX_INIT(m) -#define MUTEX_DESTROY(m) -#define COND_INIT(c) perl_cond_init(c) -#define COND_SIGNAL(c) perl_cond_signal(c) -#define COND_BROADCAST(c) perl_cond_broadcast(c) -#define COND_WAIT(c, m) \ - STMT_START { \ - perl_cond_wait(c); \ - SCHEDULE(); \ - } STMT_END -#define COND_DESTROY(c) - -#define THREAD_CREATE(t, f) f((t)) -#define THREAD_POST_CREATE(t) NOOP - -#define YIELD NOOP - -/* - * Local variables: - * c-indentation-style: bsd - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - * - * ex: set ts=8 sts=4 sw=4 et: - */ diff --git a/Master/tlpkg/tlperl/lib/CORE/feature.h b/Master/tlpkg/tlperl/lib/CORE/feature.h index 215a4d50465..698302c43f8 100644 --- a/Master/tlpkg/tlperl/lib/CORE/feature.h +++ b/Master/tlpkg/tlperl/lib/CORE/feature.h @@ -27,7 +27,7 @@ & HINT_LOCALIZE_HH) \ ? Perl_feature_is_enabled(aTHX_ STR_WITH_LEN(name)) : FALSE) /* The longest string we pass in. */ -#define MAX_FEATURE_LEN (sizeof("evalbytes")-1) +#define MAX_FEATURE_LEN (sizeof("postderef_qq")-1) #define FEATURE_FC_IS_ENABLED \ ( \ @@ -67,6 +67,12 @@ FEATURE_IS_ENABLED("evalbytes")) \ ) +#define FEATURE_POSTDEREF_IS_ENABLED \ + ( \ + CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ + FEATURE_IS_ENABLED("postderef") \ + ) + #define FEATURE_ARYBASE_IS_ENABLED \ ( \ CURRENT_FEATURE_BUNDLE <= FEATURE_BUNDLE_511 \ @@ -74,6 +80,12 @@ FEATURE_IS_ENABLED("arybase")) \ ) +#define FEATURE_SIGNATURES_IS_ENABLED \ + ( \ + CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ + FEATURE_IS_ENABLED("signatures") \ + ) + #define FEATURE___SUB___IS_ENABLED \ ( \ CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \ @@ -87,6 +99,12 @@ FEATURE_IS_ENABLED("lexsubs") \ ) +#define FEATURE_POSTDEREF_QQ_IS_ENABLED \ + ( \ + CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_CUSTOM && \ + FEATURE_IS_ENABLED("postderef_qq") \ + ) + #define FEATURE_UNIEVAL_IS_ENABLED \ ( \ CURRENT_FEATURE_BUNDLE == FEATURE_BUNDLE_515 \ diff --git a/Master/tlpkg/tlperl/lib/CORE/gv.h b/Master/tlpkg/tlperl/lib/CORE/gv.h index 1e17f35d463..d7ca92fb58c 100644 --- a/Master/tlpkg/tlperl/lib/CORE/gv.h +++ b/Master/tlpkg/tlperl/lib/CORE/gv.h @@ -141,8 +141,9 @@ Return the CV from the GV. #define GvLINE(gv) (GvGP(gv)->gp_line) #define GvFILE_HEK(gv) (GvGP(gv)->gp_file_hek) -#define GvFILE(gv) (GvFILE_HEK(gv) ? HEK_KEY(GvFILE_HEK(gv)) : NULL) -#define GvFILEGV(gv) (gv_fetchfile(GvFILE(gv))) +#define GvFILEx(gv) HEK_KEY(GvFILE_HEK(gv)) +#define GvFILE(gv) (GvFILE_HEK(gv) ? GvFILEx(gv) : NULL) +#define GvFILEGV(gv) (GvFILE_HEK(gv) ? gv_fetchfile(GvFILEx(gv)) : NULL) #define GvEGV(gv) (GvGP(gv)->gp_egv) #define GvEGVx(gv) (isGV_with_GP(gv) ? GvEGV(gv) : NULL) diff --git a/Master/tlpkg/tlperl/lib/CORE/handy.h b/Master/tlpkg/tlperl/lib/CORE/handy.h index 582cea638c9..8e79a15e431 100644 --- a/Master/tlpkg/tlperl/lib/CORE/handy.h +++ b/Master/tlpkg/tlperl/lib/CORE/handy.h @@ -8,6 +8,9 @@ * */ +/* IMPORTANT NOTE: Everything whose name begins with an underscore is for + * internal core Perl use only. */ + #ifndef HANDY_H /* Guard against nested #inclusion */ #define HANDY_H @@ -25,10 +28,11 @@ =head1 Handy Values =for apidoc AmU||Nullch -Null character pointer. (No longer available when C<PERL_CORE> is defined.) +Null character pointer. (No longer available when C<PERL_CORE> is +defined.) =for apidoc AmU||Nullsv -Null SV pointer. (No longer available when C<PERL_CORE> is defined.) +Null SV pointer. (No longer available when C<PERL_CORE> is defined.) =cut */ @@ -69,7 +73,7 @@ Null SV pointer. (No longer available when C<PERL_CORE> is defined.) #define MUTABLE_IO(p) ((IO *)MUTABLE_PTR(p)) #define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p)) -#ifdef I_STDBOOL +#if defined(I_STDBOOL) && !defined(PERL_BOOL_AS_CHAR) # include <stdbool.h> # ifndef HAS_BOOL # define HAS_BOOL 1 @@ -85,9 +89,11 @@ Null SV pointer. (No longer available when C<PERL_CORE> is defined.) Andy Dougherty February 2000 */ #ifdef __GNUG__ /* GNU g++ has bool built-in */ +# ifndef PERL_BOOL_AS_CHAR # ifndef HAS_BOOL # define HAS_BOOL 1 # endif +# endif #endif /* The NeXT dynamic loader headers will not build with the bool macro @@ -104,19 +110,17 @@ Null SV pointer. (No longer available when C<PERL_CORE> is defined.) #endif /* NeXT || __NeXT__ */ #ifndef HAS_BOOL -# if defined(VMS) -# define bool int -# else -# define bool char +# ifdef bool +# undef bool # endif +# define bool char # define HAS_BOOL 1 #endif -/* a simple (bool) cast may not do the right thing: if bool is defined - * as char for example, then the cast from int is implementation-defined - * (bool)!!(cbool) in a ternary triggers a bug in xlc on AIX - */ - +/* cast-to-bool. A simple (bool) cast may not do the right thing: if bool is + * defined as char for example, then the cast from int is + * implementation-defined (bool)!!(cbool) in a ternary triggers a bug in xlc on + * AIX */ #define cBOOL(cbool) ((cbool) ? (bool)1 : (bool)0) /* Try to figure out __func__ or __FUNCTION__ equivalent, if any. @@ -126,7 +130,7 @@ Null SV pointer. (No longer available when C<PERL_CORE> is defined.) #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || (defined(__SUNPRO_C)) /* C99 or close enough. */ # define FUNCTION__ __func__ #else -# if (defined(_MSC_VER) && _MSC_VER < 1300) || /* MSVC6 has neither __func__ nor __FUNCTION and no good workarounds, either. */ \ +# if (defined(USING_MSVC6)) || /* MSVC6 has neither __func__ nor __FUNCTION and no good workarounds, either. */ \ (defined(__DECC_VER)) /* Tru64 or VMS, and strict C89 being used, but not modern enough cc (in Tur64, -c99 not known, only -std1). */ # define FUNCTION__ "" # else @@ -269,23 +273,34 @@ typedef U64TYPE U64; #define Ctl(ch) ((ch) & 037) +/* This is a helper macro to avoid preprocessor issues, replaced by nothing + * unless under DEBUGGING, where it expands to an assert of its argument, + * followed by a comma (hence the comma operator). If we just used a straight + * assert(), we would get a comma with nothing before it when not DEBUGGING */ +#ifdef DEBUGGING +# define __ASSERT_(statement) assert(statement), +#else +# define __ASSERT_(statement) +#endif + /* =head1 SV-Body Allocation =for apidoc Ama|SV*|newSVpvs|const char* s -Like C<newSVpvn>, but takes a literal string instead of a string/length pair. +Like C<newSVpvn>, but takes a literal C<NUL>-terminated string instead of a +string/length pair. =for apidoc Ama|SV*|newSVpvs_flags|const char* s|U32 flags -Like C<newSVpvn_flags>, but takes a literal string instead of a string/length -pair. +Like C<newSVpvn_flags>, but takes a literal C<NUL>-terminated string instead of +a string/length pair. =for apidoc Ama|SV*|newSVpvs_share|const char* s -Like C<newSVpvn_share>, but takes a literal string instead of a string/length -pair and omits the hash parameter. +Like C<newSVpvn_share>, but takes a literal C<NUL>-terminated string instead of +a string/length pair and omits the hash parameter. =for apidoc Am|void|sv_catpvs_flags|SV* sv|const char* s|I32 flags -Like C<sv_catpvn_flags>, but takes a literal string instead of a -string/length pair. +Like C<sv_catpvn_flags>, but takes a literal C<NUL>-terminated string instead +of a string/length pair. =for apidoc Am|void|sv_catpvs_nomg|SV* sv|const char* s Like C<sv_catpvn_nomg>, but takes a literal string instead of a @@ -312,7 +327,8 @@ string/length pair. =head1 Memory Management =for apidoc Ama|char*|savepvs|const char* s -Like C<savepvn>, but takes a literal string instead of a string/length pair. +Like C<savepvn>, but takes a literal C<NUL>-terminated string instead of a +string/length pair. =for apidoc Ama|char*|savesharedpvs|const char* s A version of C<savepvs()> which allocates the duplicate string in memory @@ -420,12 +436,12 @@ the second, C<s2>. Returns true or false. =for apidoc Am|bool|strnNE|char* s1|char* s2|STRLEN len Test two strings to see if they are different. The C<len> parameter -indicates the number of bytes to compare. Returns true or false. (A +indicates the number of bytes to compare. Returns true or false. (A wrapper for C<strncmp>). =for apidoc Am|bool|strnEQ|char* s1|char* s2|STRLEN len Test two strings to see if they are equal. The C<len> parameter indicates -the number of bytes to compare. Returns true or false. (A wrapper for +the number of bytes to compare. Returns true or false. (A wrapper for C<strncmp>). =cut @@ -496,7 +512,7 @@ onto the platform. That is, the code points that are ASCII are unaffected, since ASCII is a subset of Latin-1. But the non-ASCII code points are treated as if they are Latin-1 characters. For example, C<isWORDCHAR_L1()> will return true when called with the code point 0xDF, which is a word character in both -ASCII and EBCDIC (though it represent different characters in each). +ASCII and EBCDIC (though it represents different characters in each). Variant C<isFOO_uni> is like the C<isFOO_L1> variant, but accepts any UV code point as input. If the code point is larger than 255, Unicode rules are used @@ -509,12 +525,13 @@ Variant C<isFOO_utf8> is like C<isFOO_uni>, but the input is a pointer to a classification of just the first (possibly multi-byte) character in the string is tested. -Variant C<isFOO_LC> is like the C<isFOO_A> and C<isFOO_L1> variants, but uses -the C library function that gives the named classification instead of -hard-coded rules. For example, C<isDIGIT_LC()> returns the result of calling -C<isdigit()>. This means that the result is based on the current locale, which -is what C<LC> in the name stands for. FALSE is always returned if the input -won't fit into an octet. +Variant C<isFOO_LC> is like the C<isFOO_A> and C<isFOO_L1> variants, but the +result is based on the current locale, which is what C<LC> in the name stands +for. If Perl can determine that the current locale is a UTF-8 locale, it uses +the published Unicode rules; otherwise, it uses the C library function that +gives the named classification. For example, C<isDIGIT_LC()> when not in a +UTF-8 locale returns the result of calling C<isdigit()>. FALSE is always +returned if the input won't fit into an octet. Variant C<isFOO_LC_uvchr> is like C<isFOO_LC>, but is defined on any UV. It returns the same as C<isFOO_LC> for input code points less than 256, and @@ -552,6 +569,12 @@ C<isASCII_LC_utf8>. Note, however, that some platforms do not have the C library routine C<isascii()>. In these cases, the variants whose names contain C<LC> are the same as the corresponding ones without. +Also note, that because all ASCII characters are UTF-8 invariant (meaning they +have the exact same representation (always a single byte) whether encoded in +UTF-8 or not), C<isASCII> will give the correct results when called with any +byte in any string encoded or not in UTF-8. And similarly C<isASCII_utf8> will +work properly on any string encoded or not in UTF-8. + =for apidoc Am|bool|isBLANK|char ch Returns a boolean indicating whether the specified character is a character considered to be a blank, analogous to C<m/[[:blank:]]/>. @@ -613,7 +636,7 @@ Returns a boolean indicating whether the specified character is a whitespace character. This is analogous to what C<m/\s/> matches in a regular expression. Starting in Perl 5.18 (experimentally), this also matches what C<m/[[:space:]]/> does. -("Experimentally" means that this change may be backed out in 5.20 or 5.22 if +("Experimentally" means that this change may be backed out in 5.22 if field experience indicates that it was unwise.) Prior to 5.18, only the locale forms of this macro (the ones with C<LC> in their names) matched precisely what C<m/[[:space:]]/> does. In those releases, the only difference, @@ -627,7 +650,7 @@ C<isSPACE_LC_uvchr>, and C<isSPACE_LC_utf8>. (short for Posix Space) Starting in 5.18, this is identical (experimentally) in all its forms to the corresponding C<isSPACE()> macros. ("Experimentally" means that this change -may be backed out in 5.20 or 5.22 if field experience indicates that it +may be backed out in 5.22 if field experience indicates that it was unwise.) The locale forms of this macro are identical to their corresponding C<isSPACE()> forms in all Perl releases. In releases prior to 5.18, the @@ -701,17 +724,125 @@ Behaviour is only well defined when isXDIGIT(*str) is true. =head1 Character case changing -=for apidoc Am|char|toUPPER|char ch -Converts the specified character to uppercase, if possible; otherwise returns -the input character itself. +=for apidoc Am|U8|toUPPER|U8 ch +Converts the specified character to uppercase. If the input is anything but an +ASCII lowercase character, that input character itself is returned. Variant +C<toUPPER_A> is equivalent. + +=for apidoc Am|UV|toUPPER_uni|UV cp|U8* s|STRLEN* lenp +Converts the Unicode code point C<cp> to its uppercase version, and +stores that in UTF-8 in C<s>, and its length in bytes in C<lenp>. Note +that the buffer pointed to by C<s> needs to be at least C<UTF8_MAXBYTES_CASE+1> +bytes since the uppercase version may be longer than the original character. + +The first code point of the uppercased version is returned +(but note, as explained just above, that there may be more.) + +=for apidoc Am|UV|toUPPER_utf8|U8* p|U8* s|STRLEN* lenp +Converts the UTF-8 encoded character at C<p> to its uppercase version, and +stores that in UTF-8 in C<s>, and its length in bytes in C<lenp>. Note +that the buffer pointed to by C<s> needs to be at least C<UTF8_MAXBYTES_CASE+1> +bytes since the uppercase version may be longer than the original character. + +The first code point of the uppercased version is returned +(but note, as explained just above, that there may be more.) + +The input character at C<p> is assumed to be well-formed. + +=for apidoc Am|U8|toFOLD|U8 ch +Converts the specified character to foldcase. If the input is anything but an +ASCII uppercase character, that input character itself is returned. Variant +C<toFOLD_A> is equivalent. (There is no equivalent C<to_FOLD_L1> for the full +Latin1 range, as the full generality of L</toFOLD_uni> is needed there.) + +=for apidoc Am|UV|toFOLD_uni|UV cp|U8* s|STRLEN* lenp +Converts the Unicode code point C<cp> to its foldcase version, and +stores that in UTF-8 in C<s>, and its length in bytes in C<lenp>. Note +that the buffer pointed to by C<s> needs to be at least C<UTF8_MAXBYTES_CASE+1> +bytes since the foldcase version may be longer than the original character. + +The first code point of the foldcased version is returned +(but note, as explained just above, that there may be more.) + +=for apidoc Am|UV|toFOLD_utf8|U8* p|U8* s|STRLEN* lenp +Converts the UTF-8 encoded character at C<p> to its foldcase version, and +stores that in UTF-8 in C<s>, and its length in bytes in C<lenp>. Note +that the buffer pointed to by C<s> needs to be at least C<UTF8_MAXBYTES_CASE+1> +bytes since the foldcase version may be longer than the original character. + +The first code point of the foldcased version is returned +(but note, as explained just above, that there may be more.) + +The input character at C<p> is assumed to be well-formed. + +=for apidoc Am|U8|toLOWER|U8 ch +Converts the specified character to lowercase. If the input is anything but an +ASCII uppercase character, that input character itself is returned. Variant +C<toLOWER_A> is equivalent. + +=for apidoc Am|U8|toLOWER_L1|U8 ch +Converts the specified Latin1 character to lowercase. The results are undefined if +the input doesn't fit in a byte. + +=for apidoc Am|U8|toLOWER_LC|U8 ch +Converts the specified character to lowercase using the current locale's rules, +if possible; otherwise returns the input character itself. + +=for apidoc Am|UV|toLOWER_uni|UV cp|U8* s|STRLEN* lenp +Converts the Unicode code point C<cp> to its lowercase version, and +stores that in UTF-8 in C<s>, and its length in bytes in C<lenp>. Note +that the buffer pointed to by C<s> needs to be at least C<UTF8_MAXBYTES_CASE+1> +bytes since the lowercase version may be longer than the original character. + +The first code point of the lowercased version is returned +(but note, as explained just above, that there may be more.) + +=for apidoc Am|UV|toLOWER_utf8|U8* p|U8* s|STRLEN* lenp +Converts the UTF-8 encoded character at C<p> to its lowercase version, and +stores that in UTF-8 in C<s>, and its length in bytes in C<lenp>. Note +that the buffer pointed to by C<s> needs to be at least C<UTF8_MAXBYTES_CASE+1> +bytes since the lowercase version may be longer than the original character. + +The first code point of the lowercased version is returned +(but note, as explained just above, that there may be more.) + +The input character at C<p> is assumed to be well-formed. + +=for apidoc Am|U8|toLOWER_LC|U8 ch +Converts the specified character to lowercase using the current locale's rules, +if possible; otherwise returns the input character itself. + +=for apidoc Am|U8|toTITLE|U8 ch +Converts the specified character to titlecase. If the input is anything but an +ASCII lowercase character, that input character itself is returned. Variant +C<toTITLE_A> is equivalent. (There is no C<toTITLE_L1> for the full Latin1 range, +as the full generality of L</toTITLE_uni> is needed there. Titlecase is not a +concept used in locale handling, so there is no functionality for that.) + +=for apidoc Am|UV|toTITLE_uni|UV cp|U8* s|STRLEN* lenp +Converts the Unicode code point C<cp> to its titlecase version, and +stores that in UTF-8 in C<s>, and its length in bytes in C<lenp>. Note +that the buffer pointed to by C<s> needs to be at least C<UTF8_MAXBYTES_CASE+1> +bytes since the titlecase version may be longer than the original character. + +The first code point of the titlecased version is returned +(but note, as explained just above, that there may be more.) + +=for apidoc Am|UV|toTITLE_utf8|U8* p|U8* s|STRLEN* lenp +Converts the UTF-8 encoded character at C<p> to its titlecase version, and +stores that in UTF-8 in C<s>, and its length in bytes in C<lenp>. Note +that the buffer pointed to by C<s> needs to be at least C<UTF8_MAXBYTES_CASE+1> +bytes since the titlecase version may be longer than the original character. -=for apidoc Am|char|toLOWER|char ch -Converts the specified character to lowercase, if possible; otherwise returns -the input character itself. +The first code point of the titlecased version is returned +(but note, as explained just above, that there may be more.) + +The input character at C<p> is assumed to be well-formed. =cut -XXX Still undocumented isVERTWS_uni and _utf8, and the other toUPPER etc functions +XXX Still undocumented isVERTWS_uni and _utf8; it's unclear what their names +really should be. Also toUPPER_LC and toFOLD_LC, which are subject to change. Note that these macros are repeated in Devel::PPPort, so should also be patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc @@ -737,7 +868,15 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc #define FITS_IN_8_BITS(c) ((sizeof(c) == 1) || !(((WIDEST_UTYPE)(c)) & ~0xFF)) #ifdef EBCDIC -# define isASCII(c) (FITS_IN_8_BITS(c) && (NATIVE_TO_UNI((U8) (c)) < 128)) +# ifndef _ALL_SOURCE + /* This returns the wrong results on at least z/OS unless this is + * defined. */ +# error _ALL_SOURCE should probably be defined +# endif + + /* We could be called without perl.h, in which case NATIVE_TO_ASCII() is + * likely not defined, and so we use the native function */ +# define isASCII(c) cBOOL(isascii(c)) #else # define isASCII(c) ((WIDEST_UTYPE)(c) < 128) #endif @@ -795,7 +934,8 @@ patched there. The file as of this writing is cpan/Devel-PPPort/parts/inc/misc # define _HIGHEST_REGCOMP_DOT_H_SYNC _CC_VERTSPACE /* The members of the third group below do not need to be coordinated with data - * structures in regcomp.[ch] and regexec.c */ + * structures in regcomp.[ch] and regexec.c. But they should be added to + * bootstrap_ctype() */ # define _CC_IDFIRST 17 # define _CC_CHARNAME_CONT 18 # define _CC_NONLATIN1_FOLD 19 @@ -872,20 +1012,27 @@ EXTCONST U32 PL_charclass[] = { # else /* ! DOINIT */ EXTCONST U32 PL_charclass[]; # endif +#endif /* Has perl.h */ + +#if defined(H_PERL) && ! defined(BOOTSTRAP_CHARSET) /* The 1U keeps Solaris from griping when shifting sets the uppermost bit */ # define _CC_mask(classnum) (1U << (classnum)) + + /* For internal core Perl use only: the base macro for defining macros like + * isALPHA */ # define _generic_isCC(c, classnum) cBOOL(FITS_IN_8_BITS(c) \ - && (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_mask(classnum))) + && (PL_charclass[(U8) (c)] & _CC_mask(classnum))) /* The mask for the _A versions of the macros; it just adds in the bit for * ASCII. */ # define _CC_mask_A(classnum) (_CC_mask(classnum) | _CC_mask(_CC_ASCII)) - /* The _A version makes sure that both the desired bit and the ASCII bit - * are present */ -# define _generic_isCC_A(c, classnum) (FITS_IN_8_BITS(c) \ - && ((PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_mask_A(classnum)) \ + /* For internal core Perl use only: the base macro for defining macros like + * isALPHA_A. The foo_A version makes sure that both the desired bit and + * the ASCII bit are present */ +# define _generic_isCC_A(c, classnum) (FITS_IN_8_BITS(c) \ + && ((PL_charclass[(U8) (c)] & _CC_mask_A(classnum)) \ == _CC_mask_A(classnum))) # define isALPHA_A(c) _generic_isCC_A(c, _CC_ALPHA) @@ -902,231 +1049,341 @@ EXTCONST U32 PL_charclass[]; # define isUPPER_A(c) _generic_isCC_A(c, _CC_UPPER) # define isWORDCHAR_A(c) _generic_isCC_A(c, _CC_WORDCHAR) # define isXDIGIT_A(c) _generic_isCC(c, _CC_XDIGIT) -# define isIDFIRST_A(c) _generic_isCC_A(c, ( _CC_IDFIRST)) +# define isIDFIRST_A(c) _generic_isCC_A(c, _CC_IDFIRST) +# define isALPHA_L1(c) _generic_isCC(c, _CC_ALPHA) +# define isALPHANUMERIC_L1(c) _generic_isCC(c, _CC_ALPHANUMERIC) +# define isBLANK_L1(c) _generic_isCC(c, _CC_BLANK) + + /* continuation character for legal NAME in \N{NAME} */ +# define isCHARNAME_CONT(c) _generic_isCC(c, _CC_CHARNAME_CONT) + +# define isCNTRL_L1(c) _generic_isCC(c, _CC_CNTRL) +# define isGRAPH_L1(c) _generic_isCC(c, _CC_GRAPH) +# define isLOWER_L1(c) _generic_isCC(c, _CC_LOWER) +# define isPRINT_L1(c) _generic_isCC(c, _CC_PRINT) +# define isPSXSPC_L1(c) _generic_isCC(c, _CC_PSXSPC) +# define isPUNCT_L1(c) _generic_isCC(c, _CC_PUNCT) +# define isSPACE_L1(c) _generic_isCC(c, _CC_SPACE) +# define isUPPER_L1(c) _generic_isCC(c, _CC_UPPER) +# define isWORDCHAR_L1(c) _generic_isCC(c, _CC_WORDCHAR) +# define isIDFIRST_L1(c) _generic_isCC(c, _CC_IDFIRST) /* Either participates in a fold with a character above 255, or is a * multi-char fold */ -# define _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(c) ((! cBOOL(FITS_IN_8_BITS(c))) || (PL_charclass[(U8) NATIVE_TO_UNI(c)] & _CC_mask(_CC_NONLATIN1_FOLD))) +# define _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(c) ((! cBOOL(FITS_IN_8_BITS(c))) || (PL_charclass[(U8) (c)] & _CC_mask(_CC_NONLATIN1_FOLD))) # define _isQUOTEMETA(c) _generic_isCC(c, _CC_QUOTEMETA) # define _IS_NON_FINAL_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) \ _generic_isCC(c, _CC_NON_FINAL_FOLD) # define _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) \ _generic_isCC(c, _CC_IS_IN_SOME_FOLD) -#else /* No perl.h. */ +#else /* Either don't have perl.h or don't want to use char_class_tab.h */ + + /* If we don't have perl.h, we are compiling a utility program. Below we + * hard-code various macro definitions that wouldn't otherwise be available + * to it. We can also get here if we are configured to bootstrap up Perl + * on a non-ASCII platform that doesn't have a working Perl (currently only + * EBCDIC). For these we currently use the native definitions to get + * things going. (It should also be possible to use the translation + * function NATIVE_TO_LATIN1(), but that is an extra layer of dependence on + * Perl, so it is currently avoided for the macros where it's possible to + * do so.) */ # ifdef EBCDIC -# define isALPHA_A(c) (isASCII(c) && isALPHA(c)) -# define isALPHANUMERIC_A(c) (isASCII(c) && isALPHANUMERIC(c)) -# define isBLANK_A(c) (isASCII(c) && isBLANK(c)) -# define isCNTRL_A(c) (isASCII(c) && isCNTRL(c)) -# define isDIGIT_A(c) (isASCII(c) && isDIGIT(c)) -# define isGRAPH_A(c) (isASCII(c) && isGRAPH(c)) -# define isIDFIRST_A(c) (isASCII(c) && isIDFIRST(c)) -# define isLOWER_A(c) (isASCII(c) && isLOWER(c)) -# define isPRINT_A(c) (isASCII(c) && isPRINT(c)) -# define isPSXSPC_A(c) (isASCII(c) && isPSXSPC(c)) -# define isPUNCT_A(c) (isASCII(c) && isPUNCT(c)) -# define isSPACE_A(c) (isASCII(c) && isSPACE(c)) -# define isUPPER_A(c) (isASCII(c) && isUPPER(c)) -# define isWORDCHAR_A(c) (isASCII(c) && isWORDCHAR(c)) -# define isXDIGIT_A(c) (isASCII(c) && isXDIGIT(c)) -# else /* ASCII platform, no perl.h */ + /* Use the native functions. They likely will return false for all + * non-ASCII values, but this makes sure */ +# define isALPHA_A(c) (isASCII(c) && isalpha(c)) +# define isALPHANUMERIC_A(c) (isASCII(c) && isalnum(c)) +# define isCNTRL_A(c) (isASCII(c) && iscntrl(c)) +# define isDIGIT_A(c) (isASCII(c) && isdigit(c)) +# define isGRAPH_A(c) (isASCII(c) && isgraph(c)) +# define isLOWER_A(c) (isASCII(c) && islower(c)) +# define isPRINT_A(c) (isASCII(c) && isprint(c)) +# define isPUNCT_A(c) (isASCII(c) && ispunct(c)) +# define isSPACE_A(c) (isASCII(c) && isspace(c)) +# define isUPPER_A(c) (isASCII(c) && isupper(c)) +# define isXDIGIT_A(c) (isASCII(c) && isxdigit(c)) +# else /* ASCII platform. These are coded based on first principals */ # define isALPHA_A(c) (isUPPER_A(c) || isLOWER_A(c)) # define isALPHANUMERIC_A(c) (isALPHA_A(c) || isDIGIT_A(c)) -# define isBLANK_A(c) ((c) == ' ' || (c) == '\t') -# define isCNTRL_A(c) (FITS_IN_8_BITS(c) && ((U8) (c) < ' ' || (c) == 127)) +# define isCNTRL_A(c) (isASCII(c) && (! isPRINT_A(c))) # define isDIGIT_A(c) ((c) <= '9' && (c) >= '0') -# define isGRAPH_A(c) (isWORDCHAR_A(c) || isPUNCT_A(c)) -# define isIDFIRST_A(c) (isALPHA_A(c) || (c) == '_') +# define isGRAPH_A(c) (isPRINT_A(c) && (c) != ' ') # define isLOWER_A(c) ((c) >= 'a' && (c) <= 'z') # define isPRINT_A(c) (((c) >= 32 && (c) < 127)) -# define isPSXSPC_A(c) (isSPACE_A(c) || (c) == '\v') -# define isPUNCT_A(c) (((c) >= 33 && (c) <= 47) \ - || ((c) >= 58 && (c) <= 64) \ - || ((c) >= 91 && (c) <= 96) \ - || ((c) >= 123 && (c) <= 126)) -# define isSPACE_A(c) ((c) == ' ' \ - || (c) == '\t' \ - || (c) == '\n' \ - || (c) =='\r' \ +# define isPUNCT_A(c) (isGRAPH_A(c) && (! isALPHANUMERIC_A(c))) +# define isSPACE_A(c) ((c) == ' ' \ + || (c) == '\t' \ + || (c) == '\n' \ + || (c) == '\r' \ + || (c) =='\v' \ || (c) == '\f') # define isUPPER_A(c) ((c) <= 'Z' && (c) >= 'A') -# define isWORDCHAR_A(c) (isALPHA_A(c) || isDIGIT_A(c) || (c) == '_') -# define isXDIGIT_A(c) (isDIGIT_A(c) \ - || ((c) >= 'a' && (c) <= 'f') \ - || ((c) <= 'F' && (c) >= 'A')) -# endif -#endif /* ASCII range definitions */ +# define isXDIGIT_A(c) (isDIGIT_A(c) \ + || ((c) >= 'a' && (c) <= 'f') \ + || ((c) <= 'F' && (c) >= 'A')) +# endif /* Below are common definitions for ASCII and non-ASCII */ +# define isBLANK_A(c) ((c) == ' ' || (c) == '\t') +# define isIDFIRST_A(c) (isALPHA_A(c) || (c) == '_') +# define isWORDCHAR_A(c) (isALPHANUMERIC_A(c) || (c) == '_') + + /* The _L1 macros may be unnecessary for both the utilities and for + * bootstrapping; I (khw) added them during debugging of bootstrapping, and + * it seems best to keep them. */ +# define isPSXSPC_A(c) isSPACE_A(c) /* XXX Assumes SPACE matches '\v' */ +# define isALPHA_L1(c) (isUPPER_L1(c) || isLOWER_L1(c)) +# define isALPHANUMERIC_L1(c) (isALPHA_L1(c) || isDIGIT_A(c)) +# define isBLANK_L1(c) (isBLANK_A(c) \ + || (FITS_IN_8_BITS(c) \ + && NATIVE_TO_LATIN1((U8) c) == 0xA0)) +# define isCNTRL_L1(c) (FITS_IN_8_BITS(c) && (! isPRINT_L1(c))) +# define isGRAPH_L1(c) (isPRINT_L1(c) && (! isBLANK_L1(c))) +# define isLOWER_L1(c) (isLOWER_A(c) \ + || (FITS_IN_8_BITS(c) \ + && ((NATIVE_TO_LATIN1((U8) c) >= 0xDF \ + && NATIVE_TO_LATIN1((U8) c) != 0xF7) \ + || NATIVE_TO_LATIN1((U8) c) == 0xAA \ + || NATIVE_TO_LATIN1((U8) c) == 0xBA \ + || NATIVE_TO_LATIN1((U8) c) == 0xB5))) +# define isPRINT_L1(c) (isPRINT_A(c) \ + || (FITS_IN_8_BITS(c) \ + && NATIVE_TO_LATIN1((U8) c) >= 0xA0)) +# define isPSXSPC_L1(c) isSPACE_L1(c) +# define isPUNCT_L1(c) (isPUNCT_A(c) \ + || (FITS_IN_8_BITS(c) \ + && (NATIVE_TO_LATIN1((U8) c) == 0xA1 \ + || NATIVE_TO_LATIN1((U8) c) == 0xA7 \ + || NATIVE_TO_LATIN1((U8) c) == 0xAB \ + || NATIVE_TO_LATIN1((U8) c) == 0xB6 \ + || NATIVE_TO_LATIN1((U8) c) == 0xB7 \ + || NATIVE_TO_LATIN1((U8) c) == 0xBB \ + || NATIVE_TO_LATIN1((U8) c) == 0xBF))) +# define isSPACE_L1(c) (isSPACE_A(c) \ + || (FITS_IN_8_BITS(c) \ + && (NATIVE_TO_LATIN1((U8) c) == 0x85 \ + || NATIVE_TO_LATIN1((U8) c) == 0xA0))) +# define isUPPER_L1(c) (isUPPER_A(c) \ + || (FITS_IN_8_BITS(c) \ + && (NATIVE_TO_LATIN1((U8) c) >= 0xC0 \ + && NATIVE_TO_LATIN1((U8) c) <= 0xDE \ + && NATIVE_TO_LATIN1((U8) c) != 0xD7))) +# define isWORDCHAR_L1(c) (isIDFIRST_L1(c) || isDIGIT_A(c)) +# define isIDFIRST_L1(c) (isALPHA_L1(c) || NATIVE_TO_LATIN1(c) == '_') +# define isCHARNAME_CONT(c) (isWORDCHAR_L1(c) \ + || isBLANK_L1(c) \ + || (c) == '-' \ + || (c) == '(' \ + || (c) == ')') + /* The following are not fully accurate in the above-ASCII range. I (khw) + * don't think it's necessary to be so for the purposes where this gets + * compiled */ +# define _isQUOTEMETA(c) (FITS_IN_8_BITS(c) && ! isWORDCHAR_L1(c)) +# define _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) isALPHA_L1(c) + + /* And these aren't accurate at all. They are useful only for above + * Latin1, which utilities and bootstrapping don't deal with */ +# define _IS_NON_FINAL_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c) 0 +# define _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(c) 0 + + /* Many of the macros later in this file are defined in terms of these. By + * implementing them with a function, which converts the class number into + * a call to the desired macro, all of the later ones work. However, that + * function won't be actually defined when building a utility program (no + * perl.h), and so a compiler error will be generated if one is attempted + * to be used. And the above-Latin1 code points require Unicode tables to + * be present, something unlikely to be the case when bootstrapping */ +# define _generic_isCC(c, classnum) \ + (FITS_IN_8_BITS(c) && S_bootstrap_ctype((U8) (c), (classnum), TRUE)) +# define _generic_isCC_A(c, classnum) \ + (FITS_IN_8_BITS(c) && S_bootstrap_ctype((U8) (c), (classnum), FALSE)) +#endif /* End of no perl.h or have BOOTSTRAP_CHARSET */ + +#define isALPHANUMERIC(c) isALPHANUMERIC_A(c) +#define isALPHA(c) isALPHA_A(c) +#define isBLANK(c) isBLANK_A(c) +#define isCNTRL(c) isCNTRL_A(c) +#define isDIGIT(c) isDIGIT_A(c) +#define isGRAPH(c) isGRAPH_A(c) +#define isIDFIRST(c) isIDFIRST_A(c) +#define isLOWER(c) isLOWER_A(c) +#define isPRINT(c) isPRINT_A(c) +#define isPSXSPC(c) isPSXSPC_A(c) +#define isPUNCT(c) isPUNCT_A(c) +#define isSPACE(c) isSPACE_A(c) +#define isUPPER(c) isUPPER_A(c) +#define isWORDCHAR(c) isWORDCHAR_A(c) +#define isXDIGIT(c) isXDIGIT_A(c) + +/* ASCII casing. These could also be written as + #define toLOWER(c) (isASCII(c) ? toLOWER_LATIN1(c) : (c)) + #define toUPPER(c) (isASCII(c) ? toUPPER_LATIN1_MOD(c) : (c)) + which uses table lookup and mask instead of subtraction. (This would + work because the _MOD does not apply in the ASCII range) */ +#define toLOWER(c) (isUPPER(c) ? (U8)((c) + ('a' - 'A')) : (c)) +#define toUPPER(c) (isLOWER(c) ? (U8)((c) - ('a' - 'A')) : (c)) + +/* In the ASCII range, these are equivalent to what they're here defined to be. + * But by creating these definitions, other code doesn't have to be aware of + * this detail */ +#define toFOLD(c) toLOWER(c) +#define toTITLE(c) toUPPER(c) + +#define toLOWER_A(c) toLOWER(c) +#define toUPPER_A(c) toUPPER(c) +#define toFOLD_A(c) toFOLD(c) +#define toTITLE_A(c) toTITLE(c) + +/* Use table lookup for speed; returns the input itself if is out-of-range */ +#define toLOWER_LATIN1(c) ((! FITS_IN_8_BITS(c)) \ + ? (c) \ + : PL_latin1_lc[ (U8) (c) ]) +#define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for consistency */ -/* Latin1 definitions */ -#ifdef H_PERL -# define isALPHA_L1(c) _generic_isCC(c, _CC_ALPHA) -# define isALPHANUMERIC_L1(c) _generic_isCC(c, _CC_ALPHANUMERIC) -# define isBLANK_L1(c) _generic_isCC(c, _CC_BLANK) +/* Modified uc. Is correct uc except for three non-ascii chars which are + * all mapped to one of them, and these need special handling; returns the + * input itself if is out-of-range */ +#define toUPPER_LATIN1_MOD(c) ((! FITS_IN_8_BITS(c)) \ + ? (c) \ + : PL_mod_latin1_uc[ (U8) (c) ]) +#define IN_UTF8_CTYPE_LOCALE PL_in_utf8_CTYPE_locale -/* continuation character for legal NAME in \N{NAME} */ -# define isCHARNAME_CONT(c) _generic_isCC(c, _CC_CHARNAME_CONT) +/* Use foo_LC_uvchr() instead of these for beyond the Latin1 range */ -# define isCNTRL_L1(c) _generic_isCC(c, _CC_CNTRL) -# define isGRAPH_L1(c) _generic_isCC(c, _CC_GRAPH) -# define isLOWER_L1(c) _generic_isCC(c, _CC_LOWER) -# define isPRINT_L1(c) _generic_isCC(c, _CC_PRINT) -# define isPSXSPC_L1(c) _generic_isCC(c, _CC_PSXSPC) -# define isPUNCT_L1(c) _generic_isCC(c, _CC_PUNCT) -# define isSPACE_L1(c) _generic_isCC(c, _CC_SPACE) -# define isUPPER_L1(c) _generic_isCC(c, _CC_UPPER) -# define isWORDCHAR_L1(c) _generic_isCC(c, _CC_WORDCHAR) -# define isIDFIRST_L1(c) _generic_isCC(c, _CC_IDFIRST) -#else /* No access to perl.h. Only a few provided here, just in case needed - * for backwards compatibility */ - /* ALPHAU includes Unicode semantics for latin1 characters. It has an extra - * >= AA test to speed up ASCII-only tests at the expense of the others */ -# define isALPHA_L1(c) (isALPHA(c) || (NATIVE_TO_UNI((U8) c) >= 0xAA \ - && ((NATIVE_TO_UNI((U8) c) >= 0xC0 \ - && NATIVE_TO_UNI((U8) c) != 0xD7 && NATIVE_TO_UNI((U8) c) != 0xF7) \ - || NATIVE_TO_UNI((U8) c) == 0xAA \ - || NATIVE_TO_UNI((U8) c) == 0xB5 \ - || NATIVE_TO_UNI((U8) c) == 0xBA))) -# define isCHARNAME_CONT(c) (isWORDCHAR_L1(c) \ - || (c) == ' ' \ - || (c) == '-' \ - || (c) == '(' \ - || (c) == ')' \ - || (c) == ':' \ - || NATIVE_TO_UNI((U8) c) == 0xA0) +/* For internal core Perl use only: the base macro for defining macros like + * isALPHA_LC, which uses the current LC_CTYPE locale. 'c' is the code point + * (0-255) to check. In a UTF-8 locale, the result is the same as calling + * isFOO_L1(); the 'utf8_locale_classnum' parameter is something like + * _CC_UPPER, which gives the class number for doing this. For non-UTF-8 + * locales, the code to actually do the test this is passed in 'non_utf8'. If + * 'c' is above 255, 0 is returned. For accessing the full range of possible + * code points under locale rules, use the macros based on _generic_LC_uvchr + * instead of this. */ +#define _generic_LC_base(c, utf8_locale_classnum, non_utf8) \ + (! FITS_IN_8_BITS(c) \ + ? 0 \ + : IN_UTF8_CTYPE_LOCALE \ + ? cBOOL(PL_charclass[(U8) (c)] & _CC_mask(utf8_locale_classnum)) \ + : cBOOL(non_utf8)) + +/* For internal core Perl use only: a helper macro for defining macros like + * isALPHA_LC. 'c' is the code point (0-255) to check. The function name to + * actually do this test is passed in 'non_utf8_func', which is called on 'c', + * casting 'c' to the macro _LC_CAST, which should not be parenthesized. See + * _generic_LC_base for more info */ +#define _generic_LC(c, utf8_locale_classnum, non_utf8_func) \ + _generic_LC_base(c,utf8_locale_classnum, \ + non_utf8_func( (_LC_CAST) (c))) + +/* For internal core Perl use only: like _generic_LC, but also returns TRUE if + * 'c' is the platform's native underscore character */ +#define _generic_LC_underscore(c,utf8_locale_classnum,non_utf8_func) \ + _generic_LC_base(c, utf8_locale_classnum, \ + (non_utf8_func( (_LC_CAST) (c)) \ + || (char)(c) == '_')) + +/* These next three are also for internal core Perl use only: case-change + * helper macros */ +#define _generic_toLOWER_LC(c, function, cast) (! FITS_IN_8_BITS(c) \ + ? (c) \ + : (IN_UTF8_CTYPE_LOCALE) \ + ? PL_latin1_lc[ (U8) (c) ] \ + : function((cast)(c))) + +/* Note that the result can be larger than a byte in a UTF-8 locale. It + * returns a single value, so can't adequately return the upper case of LATIN + * SMALL LETTER SHARP S in a UTF-8 locale (which should be a string of two + * values "SS"); instead it asserts against that under DEBUGGING, and + * otherwise returns its input */ +#define _generic_toUPPER_LC(c, function, cast) \ + (! FITS_IN_8_BITS(c) \ + ? (c) \ + : ((! IN_UTF8_CTYPE_LOCALE) \ + ? function((cast)(c)) \ + : ((((U8)(c)) == MICRO_SIGN) \ + ? GREEK_CAPITAL_LETTER_MU \ + : ((((U8)(c)) == LATIN_SMALL_LETTER_Y_WITH_DIAERESIS) \ + ? LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS \ + : ((((U8)(c)) == LATIN_SMALL_LETTER_SHARP_S) \ + ? (__ASSERT_(0) (c)) \ + : PL_mod_latin1_uc[ (U8) (c) ]))))) + +/* Note that the result can be larger than a byte in a UTF-8 locale. It + * returns a single value, so can't adequately return the fold case of LATIN + * SMALL LETTER SHARP S in a UTF-8 locale (which should be a string of two + * values "ss"); instead it asserts against that under DEBUGGING, and + * otherwise returns its input */ +#define _generic_toFOLD_LC(c, function, cast) \ + ((UNLIKELY((c) == MICRO_SIGN) && IN_UTF8_CTYPE_LOCALE) \ + ? GREEK_SMALL_LETTER_MU \ + : (__ASSERT_(! IN_UTF8_CTYPE_LOCALE \ + || (c) != LATIN_SMALL_LETTER_SHARP_S) \ + _generic_toLOWER_LC(c, function, cast))) + +/* Use the libc versions for these if available. */ +#if defined(HAS_ISASCII) && ! defined(USE_NEXT_CTYPE) +# define isASCII_LC(c) (FITS_IN_8_BITS(c) && isascii( (U8) (c))) +#else +# define isASCII_LC(c) isASCII(c) #endif -/* Macros that differ between EBCDIC and ASCII. Where C89 defines a function, - * that is used in the EBCDIC form, because in EBCDIC we do not do locales: - * therefore can use native functions. For those where C89 doesn't define a - * function, use our function, assuming that the EBCDIC code page is isomorphic - * with Latin1, which the three currently recognized by Perl are. Some libc's - * have an isblank(), but it's not guaranteed. */ -#ifdef EBCDIC -# define isALPHA(c) isalpha(c) -# define isALPHANUMERIC(c) isalnum(c) -# define isBLANK(c) ((c) == ' ' || (c) == '\t' || NATIVE_TO_UNI(c) == 0xA0) -# define isCNTRL(c) iscntrl(c) -# define isDIGIT(c) isdigit(c) -# define isGRAPH(c) isgraph(c) -# define isIDFIRST(c) (isALPHA(c) || (c) == '_') -# define isLOWER(c) islower(c) -# define isPRINT(c) isprint(c) -# define isPSXSPC(c) isspace(c) -# define isPUNCT(c) ispunct(c) -# define isSPACE(c) (isPSXSPC(c) /* && (c) != '\v' (Experimentally making - these macros identical) */) -# define isUPPER(c) isupper(c) -# define isXDIGIT(c) isxdigit(c) -# define isWORDCHAR(c) (isalnum(c) || (c) == '_') -# define toLOWER(c) tolower(c) -# define toUPPER(c) toupper(c) -#else /* Not EBCDIC: ASCII-only matching */ -# define isALPHANUMERIC(c) isALPHANUMERIC_A(c) -# define isALPHA(c) isALPHA_A(c) -# define isBLANK(c) isBLANK_A(c) -# define isCNTRL(c) isCNTRL_A(c) -# define isDIGIT(c) isDIGIT_A(c) -# define isGRAPH(c) isGRAPH_A(c) -# define isIDFIRST(c) isIDFIRST_A(c) -# define isLOWER(c) isLOWER_A(c) -# define isPRINT(c) isPRINT_A(c) -# define isPSXSPC(c) isPSXSPC_A(c) -# define isPUNCT(c) isPUNCT_A(c) -# define isSPACE(c) isSPACE_A(c) -# define isUPPER(c) isUPPER_A(c) -# define isWORDCHAR(c) isWORDCHAR_A(c) -# define isXDIGIT(c) isXDIGIT_A(c) - - /* ASCII casing. These could also be written as - #define toLOWER(c) (isASCII(c) ? toLOWER_LATIN1(c) : (c)) - #define toUPPER(c) (isASCII(c) ? toUPPER_LATIN1_MOD(c) : (c)) - which uses table lookup and mask instead of subtraction. (This would - work because the _MOD does not apply in the ASCII range) */ -# define toLOWER(c) (isUPPER(c) ? (c) + ('a' - 'A') : (c)) -# define toUPPER(c) (isLOWER(c) ? (c) - ('a' - 'A') : (c)) +#if defined(HAS_ISBLANK) && ! defined(USE_NEXT_CTYPE) +# define isBLANK_LC(c) _generic_LC(c, _CC_BLANK, isblank) +#else /* Unlike isASCII, varies if in a UTF-8 locale */ +# define isBLANK_LC(c) (IN_UTF8_CTYPE_LOCALE) ? isBLANK_L1(c) : isBLANK(c) #endif - -/* Use table lookup for speed; return error character for input - * out-of-range */ -#define toLOWER_LATIN1(c) (FITS_IN_8_BITS(c) \ - ? UNI_TO_NATIVE(PL_latin1_lc[ \ - NATIVE_TO_UNI( (U8) (c)) ]) \ - : UNICODE_REPLACEMENT) -/* Modified uc. Is correct uc except for three non-ascii chars which are - * all mapped to one of them, and these need special handling; error - * character for input out-of-range */ -#define toUPPER_LATIN1_MOD(c) (FITS_IN_8_BITS(c) \ - ? UNI_TO_NATIVE(PL_mod_latin1_uc[ \ - NATIVE_TO_UNI( (U8) (c)) ]) \ - : UNICODE_REPLACEMENT) - -#ifdef USE_NEXT_CTYPE - -# define isALPHANUMERIC_LC(c) NXIsAlNum((unsigned int)(c)) -# define isALPHA_LC(c) NXIsAlpha((unsigned int)(c)) -# define isASCII_LC(c) isASCII((unsigned int)(c)) -# define isBLANK_LC(c) isBLANK((unsigned int)(c)) -# define isCNTRL_LC(c) NXIsCntrl((unsigned int)(c)) -# define isDIGIT_LC(c) NXIsDigit((unsigned int)(c)) -# define isGRAPH_LC(c) NXIsGraph((unsigned int)(c)) -# define isIDFIRST_LC(c) (NXIsAlpha((unsigned int)(c)) || (char)(c) == '_') -# define isLOWER_LC(c) NXIsLower((unsigned int)(c)) -# define isPRINT_LC(c) NXIsPrint((unsigned int)(c)) -# define isPUNCT_LC(c) NXIsPunct((unsigned int)(c)) -# define isSPACE_LC(c) NXIsSpace((unsigned int)(c)) -# define isUPPER_LC(c) NXIsUpper((unsigned int)(c)) -# define isWORDCHAR_LC(c) (NXIsAlNum((unsigned int)(c)) || (char)(c) == '_') -# define isXDIGIT_LC(c) NXIsXDigit((unsigned int)(c)) -# define toLOWER_LC(c) NXToLower((unsigned int)(c)) -# define toUPPER_LC(c) NXToUpper((unsigned int)(c)) +#ifdef USE_NEXT_CTYPE /* NeXT computers */ + +# define _LC_CAST unsigned int /* Needed by _generic_LC. NeXT functions + use this as their input type */ + +# define isALPHA_LC(c) _generic_LC(c, _CC_ALPHA, NXIsAlpha) +# define isALPHANUMERIC_LC(c) _generic_LC(c, _CC_ALPHANUMERIC, NXIsAlNum) +# define isCNTRL_LC(c) _generic_LC(c, _CC_CNTRL, NXIsCntrl) +# define isDIGIT_LC(c) _generic_LC(c, _CC_DIGIT, NXIsDigit) +# define isGRAPH_LC(c) _generic_LC(c, _CC_GRAPH, NXIsGraph) +# define isIDFIRST_LC(c) _generic_LC_underscore(c, _CC_IDFIRST, NXIsAlpha) +# define isLOWER_LC(c) _generic_LC(c, _CC_LOWER, NXIsLower) +# define isPRINT_LC(c) _generic_LC(c, _CC_PRINT, NXIsPrint) +# define isPUNCT_LC(c) _generic_LC(c, _CC_PUNCT, NXIsPunct) +# define isSPACE_LC(c) _generic_LC(c, _CC_SPACE, NXIsSpace) +# define isUPPER_LC(c) _generic_LC(c, _CC_UPPER, NXIsUpper) +# define isWORDCHAR_LC(c) _generic_LC_underscore(c, _CC_WORDCHAR, NXIsAlNum) +# define isXDIGIT_LC(c) _generic_LC(c, _CC_XDIGIT, NXIsXdigit) + +# define toLOWER_LC(c) _generic_toLOWER_LC((c), NXToLower, unsigned int) +# define toUPPER_LC(c) _generic_toUPPER_LC((c), NXToUpper, unsigned int) +# define toFOLD_LC(c) _generic_toFOLD_LC((c), NXToLower, unsigned int) #else /* !USE_NEXT_CTYPE */ +# define _LC_CAST U8 + # if defined(CTYPE256) || (!defined(isascii) && !defined(HAS_ISASCII)) + /* For most other platforms */ -/* Use foo_LC_uvchr() instead of these for beyond the Latin1 range */ +# define isALPHA_LC(c) _generic_LC(c, _CC_ALPHA, isalpha) +# define isALPHANUMERIC_LC(c) _generic_LC(c, _CC_ALPHANUMERIC, isalnum) +# define isCNTRL_LC(c) _generic_LC(c, _CC_CNTRL, iscntrl) +# define isDIGIT_LC(c) _generic_LC(c, _CC_DIGIT, isdigit) +# define isGRAPH_LC(c) _generic_LC(c, _CC_GRAPH, isgraph) +# define isIDFIRST_LC(c) _generic_LC_underscore(c, _CC_IDFIRST, isalpha) +# define isLOWER_LC(c) _generic_LC(c, _CC_LOWER, islower) +# define isPRINT_LC(c) _generic_LC(c, _CC_PRINT, isprint) +# define isPUNCT_LC(c) _generic_LC(c, _CC_PUNCT, ispunct) +# define isSPACE_LC(c) _generic_LC(c, _CC_SPACE, isspace) +# define isUPPER_LC(c) _generic_LC(c, _CC_UPPER, isupper) +# define isWORDCHAR_LC(c) _generic_LC_underscore(c, _CC_WORDCHAR, isalnum) +# define isXDIGIT_LC(c) _generic_LC(c, _CC_XDIGIT, isxdigit) -# define isALPHA_LC(c) (FITS_IN_8_BITS(c) && isalpha((unsigned char)(c))) -# define isALPHANUMERIC_LC(c) (FITS_IN_8_BITS(c) \ - && isalnum((unsigned char)(c))) -# ifdef HAS_ISASCII -# define isASCII_LC(c) (FITS_IN_8_BITS(c) && isascii((unsigned char)(c))) -# else -# define isASCII_LC(c) (FITS_IN_8_BITS(c) && isASCII((unsigned char)(c))) -# endif -# ifdef HAS_ISBLANK -# define isBLANK_LC(c) (FITS_IN_8_BITS(c) && isblank((unsigned char)(c))) -# else -# define isBLANK_LC(c) (FITS_IN_8_BITS(c) && isBLANK((unsigned char)(c))) -# endif -# define isCNTRL_LC(c) (FITS_IN_8_BITS(c) && iscntrl((unsigned char)(c))) -# define isDIGIT_LC(c) (FITS_IN_8_BITS(c) && isdigit((unsigned char)(c))) -# define isGRAPH_LC(c) (FITS_IN_8_BITS(c) && isgraph((unsigned char)(c))) -# define isIDFIRST_LC(c) (FITS_IN_8_BITS(c) \ - && (isalpha((unsigned char)(c)) || (char)(c) == '_')) -# define isLOWER_LC(c) (FITS_IN_8_BITS(c) && islower((unsigned char)(c))) -# define isPRINT_LC(c) (FITS_IN_8_BITS(c) && isprint((unsigned char)(c))) -# define isPUNCT_LC(c) (FITS_IN_8_BITS(c) && ispunct((unsigned char)(c))) -# define isSPACE_LC(c) (FITS_IN_8_BITS(c) && isspace((unsigned char)(c))) -# define isUPPER_LC(c) (FITS_IN_8_BITS(c) && isupper((unsigned char)(c))) -# define isWORDCHAR_LC(c) (FITS_IN_8_BITS(c) \ - && (isalnum((unsigned char)(c)) || (char)(c) == '_')) -# define isXDIGIT_LC(c) (FITS_IN_8_BITS(c) && isxdigit((unsigned char)(c))) -# define toLOWER_LC(c) (FITS_IN_8_BITS(c) ? tolower((unsigned char)(c)) : (c)) -# define toUPPER_LC(c) (FITS_IN_8_BITS(c) ? toupper((unsigned char)(c)) : (c)) -# else +# define toLOWER_LC(c) _generic_toLOWER_LC((c), tolower, U8) +# define toUPPER_LC(c) _generic_toUPPER_LC((c), toupper, U8) +# define toFOLD_LC(c) _generic_toFOLD_LC((c), tolower, U8) + +# else /* The final fallback position */ # define isALPHA_LC(c) (isascii(c) && isalpha(c)) # define isALPHANUMERIC_LC(c) (isascii(c) && isalnum(c)) -# define isASCII_LC(c) isascii(c) -# ifdef HAS_ISBLANK -# define isBLANK_LC(c) (isascii(c) && isblank(c)) -# else -# define isBLANK_LC(c) isBLANK_A(c) -# endif # define isCNTRL_LC(c) (isascii(c) && iscntrl(c)) # define isDIGIT_LC(c) (isascii(c) && isdigit(c)) # define isGRAPH_LC(c) (isascii(c) && isgraph(c)) @@ -1138,8 +1395,10 @@ EXTCONST U32 PL_charclass[]; # define isUPPER_LC(c) (isascii(c) && isupper(c)) # define isWORDCHAR_LC(c) (isascii(c) && (isalnum(c) || (c) == '_')) # define isXDIGIT_LC(c) (isascii(c) && isxdigit(c)) + # define toLOWER_LC(c) (isascii(c) ? tolower(c) : (c)) # define toUPPER_LC(c) (isascii(c) ? toupper(c) : (c)) +# define toFOLD_LC(c) (isascii(c) ? tolower(c) : (c)) # endif #endif /* USE_NEXT_CTYPE */ @@ -1150,11 +1409,18 @@ EXTCONST U32 PL_charclass[]; #define isIDCONT_LC(c) isWORDCHAR_LC(c) #define isPSXSPC_LC(c) isSPACE_LC(c) -/* For internal core Perl use only. If the input is Latin1, use the Latin1 - * macro; otherwise use the function 'above_latin1'. Won't compile if 'c' isn't unsigned, as - * won't match above_latin1 prototype. The macros do bounds checking, so have - * duplicate checks here, so could create versions of the macros that don't, - * but experiments show that gcc optimizes them out anyway. */ +/* For internal core Perl use only: the base macros for defining macros like + * isALPHA_uni. 'c' is the code point to check. 'classnum' is the POSIX class + * number defined earlier in this file. _generic_uni() is used for POSIX + * classes where there is a macro or function 'above_latin1' that takes the + * single argument 'c' and returns the desired value. These exist for those + * classes which have simple definitions, avoiding the overhead of a hash + * lookup or inversion list binary search. _generic_swash_uni() can be used + * for classes where that overhead is faster than a direct lookup. + * _generic_uni() won't compile if 'c' isn't unsigned, as it won't match the + * 'above_latin1' prototype. _generic_isCC() macro does bounds checking, so + * have duplicate checks here, so could create versions of the macros that + * don't, but experiments show that gcc optimizes them out anyway. */ /* Note that all ignore 'use bytes' */ #define _generic_uni(classnum, above_latin1, c) ((c) < 256 \ @@ -1190,6 +1456,11 @@ EXTCONST U32 PL_charclass[]; #define toTITLE_uni(c,s,l) to_uni_title(c,s,l) #define toUPPER_uni(c,s,l) to_uni_upper(c,s,l) +/* For internal core Perl use only: the base macros for defining macros like + * isALPHA_LC_uvchr. These are like isALPHA_LC, but the input can be any code + * point, not just 0-255. Like _generic_uni, there are two versions, one for + * simple class definitions; the other for more complex. These are like + * _generic_uni, so see it for more info. */ #define _generic_LC_uvchr(latin1, above_latin1, c) \ (c < 256 ? latin1(c) : above_latin1(c)) #define _generic_LC_swash_uvchr(latin1, classnum, c) \ @@ -1219,31 +1490,28 @@ EXTCONST U32 PL_charclass[]; _CC_WORDCHAR, c) #define isXDIGIT_LC_uvchr(c) _generic_LC_uvchr(isXDIGIT_LC, is_XDIGIT_cp_high, c) - #define isBLANK_LC_uni(c) isBLANK_LC_uvchr(UNI_TO_NATIVE(c)) -/* Everything whose name begins with an underscore is for internal core Perl - * use only. */ - -/* If the input is in the Latin1 range, use - * the Latin1 macro 'classnum' on 'p' which is a pointer to a UTF-8 string. - * Otherwise use the value given by the 'utf8' parameter. This relies on the - * fact that ASCII characters have the same representation whether utf8 or not. - * Note that it assumes that the utf8 has been validated, and ignores 'use - * bytes' */ +/* For internal core Perl use only: the base macros for defining macros like + * isALPHA_utf8. These are like the earlier defined macros, but take an input + * UTF-8 encoded string 'p'. If the input is in the Latin1 range, use + * the Latin1 macro 'classnum' on 'p'. Otherwise use the value given by the + * 'utf8' parameter. This relies on the fact that ASCII characters have the + * same representation whether utf8 or not. Note that it assumes that the utf8 + * has been validated, and ignores 'use bytes' */ #define _generic_utf8(classnum, p, utf8) (UTF8_IS_INVARIANT(*(p)) \ ? _generic_isCC(*(p), classnum) \ : (UTF8_IS_DOWNGRADEABLE_START(*(p))) \ ? _generic_isCC( \ - TWO_BYTE_UTF8_TO_UNI(*(p), \ + TWO_BYTE_UTF8_TO_NATIVE(*(p), \ *((p)+1 )), \ - classnum) \ + classnum) \ : utf8) /* Like the above, but calls 'above_latin1(p)' to get the utf8 value. 'above_latin1' * can be a macro */ #define _generic_func_utf8(classnum, above_latin1, p) \ _generic_utf8(classnum, p, above_latin1(p)) -/* Like the above, but passes classnum to _isFOO_utf8(), instead of having a +/* Like the above, but passes classnum to _isFOO_utf8(), instead of having an * 'above_latin1' parameter */ #define _generic_swash_utf8(classnum, p) \ _generic_utf8(classnum, p, _is_utf8_FOO(classnum, p)) @@ -1251,11 +1519,11 @@ EXTCONST U32 PL_charclass[]; /* Like the above, but should be used only when it is known that there are no * characters in the range 128-255 which the class is TRUE for. Hence it can * skip the tests for this range. 'above_latin1' should include its arguments */ -#define _generic_utf8_no_upper_latin1(classnum, p, above_latin1) \ +#define _generic_utf8_no_upper_latin1(classnum, p, above_latin1) \ (UTF8_IS_INVARIANT(*(p)) \ ? _generic_isCC(*(p), classnum) \ : (UTF8_IS_ABOVE_LATIN1(*(p))) \ - ? above_latin1 \ + ? above_latin1 \ : 0) /* NOTE that some of these macros have very similar ones in regcharclass.h. @@ -1302,26 +1570,26 @@ EXTCONST U32 PL_charclass[]; #define isXDIGIT_utf8(p) _generic_utf8_no_upper_latin1(_CC_XDIGIT, p, \ is_XDIGIT_high(p)) +#define toFOLD_utf8(p,s,l) to_utf8_fold(p,s,l) #define toLOWER_utf8(p,s,l) to_utf8_lower(p,s,l) #define toTITLE_utf8(p,s,l) to_utf8_title(p,s,l) #define toUPPER_utf8(p,s,l) to_utf8_upper(p,s,l) -/* For internal core Perl use only. If the input is in the Latin1 range, use - * the macro 'macro' on 'p' which is a pointer to a UTF-8 string. Otherwise - * use the value given by the 'utf8' parameter. This relies on the fact that - * ASCII characters have the same representation whether utf8 or not. Note - * that it assumes that the utf8 has been validated, and ignores 'use bytes' */ -#define _generic_LC_utf8(macro, p, utf8) \ - (UTF8_IS_INVARIANT(*(p)) \ - ? macro(*(p)) \ - : (UTF8_IS_DOWNGRADEABLE_START(*(p))) \ - ? macro(TWO_BYTE_UTF8_TO_UNI(*(p), *((p)+1))) \ +/* For internal core Perl use only: the base macros for defining macros like + * isALPHA_LC_utf8. These are like _generic_utf8, but if the first code point + * in 'p' is within the 0-255 range, it uses locale rules from the passed-in + * 'macro' parameter */ +#define _generic_LC_utf8(macro, p, utf8) \ + (UTF8_IS_INVARIANT(*(p)) \ + ? macro(*(p)) \ + : (UTF8_IS_DOWNGRADEABLE_START(*(p))) \ + ? macro(TWO_BYTE_UTF8_TO_NATIVE(*(p), *((p)+1))) \ : utf8) #define _generic_LC_swash_utf8(macro, classnum, p) \ _generic_LC_utf8(macro, p, _is_utf8_FOO(classnum, p)) #define _generic_LC_func_utf8(macro, above_latin1, p) \ - _generic_LC_utf8(macro, p, above_latin1(p)) + _generic_LC_utf8(macro, p, above_latin1(p)) #define isALPHANUMERIC_LC_utf8(p) _generic_LC_swash_utf8(isALPHANUMERIC_LC, \ _CC_ALPHANUMERIC, p) @@ -1367,11 +1635,23 @@ EXTCONST U32 PL_charclass[]; #define isALNUMC_utf8(p) isALPHANUMERIC_utf8(p) #define isALNUMC_LC_utf8(p) isALPHANUMERIC_LC_utf8(p) -/* This conversion works both ways, strangely enough. On EBCDIC platforms, - * CTRL-@ is 0, CTRL-A is 1, etc, just like on ASCII, except that they don't - * necessarily mean the same characters, e.g. CTRL-D is 4 on both systems, but - * that is EOT on ASCII; ST on EBCDIC */ -# define toCTRL(c) (toUPPER(NATIVE_TO_UNI(c)) ^ 64) +/* On EBCDIC platforms, CTRL-@ is 0, CTRL-A is 1, etc, just like on ASCII, + * except that they don't necessarily mean the same characters, e.g. CTRL-D is + * 4 on both systems, but that is EOT on ASCII; ST on EBCDIC. + * '?' is special-cased on EBCDIC to APC, which is the control there that is + * the outlier from the block that contains the other controls, just like + * toCTRL('?') on ASCII yields DEL, the control that is the outlier from the C0 + * block. If it weren't special cased, it would yield a non-control. + * The conversion works both ways, so CTRL('D') is 4, and CTRL(4) is D, etc. */ +#ifndef EBCDIC +# define toCTRL(c) (toUPPER(c) ^ 64) +#else +# define toCTRL(c) ((c) == '?' \ + ? LATIN1_TO_NATIVE(0x9F) \ + : (c) == LATIN1_TO_NATIVE(0x9F) \ + ? '?' \ + : (NATIVE_TO_LATIN1(toUPPER(c)) ^ 64)) +#endif /* Line numbers are unsigned, 32 bits. */ typedef U32 line_t; @@ -1390,7 +1670,22 @@ typedef U32 line_t; } \ return a; -#define READ_XDIGIT(s) (isALPHA(*(s)) ? ((*(s)++ + 9) & 0xf) : (*(s)++ & 0xf)) +/* Converts a character known to represent a hexadecimal digit (0-9, A-F, or + * a-f) to its numeric value. READ_XDIGIT's argument is a string pointer, + * which is advanced. The input is validated only by an assert() in DEBUGGING + * builds. In both ASCII and EBCDIC the last 4 bits of the digits are 0-9; and + * the last 4 bits of A-F and a-f are 1-6, so adding 9 yields 10-15 */ +#define XDIGIT_VALUE(c) (__ASSERT_(isXDIGIT(c)) (0xf & (isDIGIT(c) \ + ? (c) \ + : ((c) + 9)))) +#define READ_XDIGIT(s) (__ASSERT_(isXDIGIT(*s)) (0xf & (isDIGIT(*(s)) \ + ? (*(s)++) \ + : (*(s)++ + 9)))) + +/* Converts a character known to represent an octal digit (0-7) to its numeric + * value. The input is validated only by an assert() in DEBUGGING builds. In + * both ASCII and EBCDIC the last 3 bits of the octal digits range from 0-7. */ +#define OCTAL_VALUE(c) (__ASSERT_(isOCTAL(c)) (7 & (c))) /* =head1 Memory Management @@ -1398,6 +1693,8 @@ typedef U32 line_t; =for apidoc Am|void|Newx|void* ptr|int nitems|type The XSUB-writer's interface to the C C<malloc> function. +Memory obtained by this should B<ONLY> be freed with L<"Safefree">. + In 5.9.3, Newx() and friends replace the older New() API, and drops the first parameter, I<x>, a debug aid which allowed callers to identify themselves. This aid has been superseded by a new build option, @@ -1408,27 +1705,38 @@ there for use in XS modules supporting older perls. The XSUB-writer's interface to the C C<malloc> function, with cast. See also C<Newx>. +Memory obtained by this should B<ONLY> be freed with L<"Safefree">. + =for apidoc Am|void|Newxz|void* ptr|int nitems|type The XSUB-writer's interface to the C C<malloc> function. The allocated memory is zeroed with C<memzero>. See also C<Newx>. +Memory obtained by this should B<ONLY> be freed with L<"Safefree">. + =for apidoc Am|void|Renew|void* ptr|int nitems|type The XSUB-writer's interface to the C C<realloc> function. +Memory obtained by this should B<ONLY> be freed with L<"Safefree">. + =for apidoc Am|void|Renewc|void* ptr|int nitems|type|cast The XSUB-writer's interface to the C C<realloc> function, with cast. +Memory obtained by this should B<ONLY> be freed with L<"Safefree">. + =for apidoc Am|void|Safefree|void* ptr The XSUB-writer's interface to the C C<free> function. +This should B<ONLY> be used on memory obtained using L<"Newx"> and friends. + =for apidoc Am|void|Move|void* src|void* dest|int nitems|type The XSUB-writer's interface to the C C<memmove> function. The C<src> is the source, C<dest> is the destination, C<nitems> is the number of items, and C<type> is the type. Can do overlapping moves. See also C<Copy>. =for apidoc Am|void *|MoveD|void* src|void* dest|int nitems|type -Like C<Move> but returns dest. Useful for encouraging compilers to tail-call +Like C<Move> but returns dest. Useful +for encouraging compilers to tail-call optimise. =for apidoc Am|void|Copy|void* src|void* dest|int nitems|type @@ -1438,7 +1746,8 @@ C<type> is the type. May fail on overlapping copies. See also C<Move>. =for apidoc Am|void *|CopyD|void* src|void* dest|int nitems|type -Like C<Copy> but returns dest. Useful for encouraging compilers to tail-call +Like C<Copy> but returns dest. Useful +for encouraging compilers to tail-call optimise. =for apidoc Am|void|Zero|void* dest|int nitems|type @@ -1448,7 +1757,8 @@ destination, C<nitems> is the number of items, and C<type> is the type. =for apidoc Am|void *|ZeroD|void* dest|int nitems|type -Like C<Zero> but returns dest. Useful for encouraging compilers to tail-call +Like C<Zero> but returns dest. Useful +for encouraging compilers to tail-call optimise. =for apidoc Am|void|StructCopy|type *src|type *dest|type @@ -1485,12 +1795,12 @@ PoisonWith(0xEF) for catching access to freed memory. * (U16)n > (size_t)~0/sizeof(U16) always being false. */ #ifdef PERL_MALLOC_WRAP #define MEM_WRAP_CHECK(n,t) \ - (void)(sizeof(t) > 1 && ((MEM_SIZE)(n)+0.0) > MEM_SIZE_MAX/sizeof(t) && (Perl_croak_memory_wrap(),0)) + (void)(UNLIKELY(sizeof(t) > 1 && ((MEM_SIZE)(n)+0.0) > MEM_SIZE_MAX/sizeof(t)) && (croak_memory_wrap(),0)) #define MEM_WRAP_CHECK_1(n,t,a) \ - (void)(sizeof(t) > 1 && ((MEM_SIZE)(n)+0.0) > MEM_SIZE_MAX/sizeof(t) && (Perl_croak_nocontext("%s",(a)),0)) + (void)(UNLIKELY(sizeof(t) > 1 && ((MEM_SIZE)(n)+0.0) > MEM_SIZE_MAX/sizeof(t)) && (Perl_croak_nocontext("%s",(a)),0)) #define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t), -#define PERL_STRLEN_ROUNDUP(n) ((void)(((n) > MEM_SIZE_MAX - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (Perl_croak_memory_wrap(),0):0),((n-1+PERL_STRLEN_ROUNDUP_QUANTUM)&~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM-1))) +#define PERL_STRLEN_ROUNDUP(n) ((void)(((n) > MEM_SIZE_MAX - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (croak_memory_wrap(),0):0),((n-1+PERL_STRLEN_ROUNDUP_QUANTUM)&~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM-1))) #else #define MEM_WRAP_CHECK(n,t) @@ -1616,14 +1926,25 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe #define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF) #define Poison(d,n,t) PoisonFree(d,n,t) +#ifdef PERL_POISON +# define PERL_POISON_EXPR(x) x +#else +# define PERL_POISON_EXPR(x) +#endif + #ifdef USE_STRUCT_COPY #define StructCopy(s,d,t) (*((t*)(d)) = *((t*)(s))) #else #define StructCopy(s,d,t) Copy(s,d,1,t) #endif +/* C_ARRAY_LENGTH is the number of elements in the C array (so you + * want your zero-based indices to be less than but not equal to). + * + * C_ARRAY_END is one past the last: half-open/half-closed range, + * not last-inclusive range. */ #define C_ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0])) -#define C_ARRAY_END(a) (a) + (sizeof(a)/sizeof((a)[0])) +#define C_ARRAY_END(a) ((a) + C_ARRAY_LENGTH(a)) #ifdef NEED_VA_COPY # ifdef va_copy @@ -1661,6 +1982,37 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe # define deprecate(s) Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), "Use of " s " is deprecated") #endif +/* Internal macros to deal with gids and uids */ +#ifdef PERL_CORE + +# if Uid_t_size > IVSIZE +# define sv_setuid(sv, uid) sv_setnv((sv), (NV)(uid)) +# define SvUID(sv) SvNV(sv) +# else +# if Uid_t_sign <= 0 +# define sv_setuid(sv, uid) sv_setiv((sv), (IV)(uid)) +# define SvUID(sv) SvIV(sv) +# else +# define sv_setuid(sv, uid) sv_setuv((sv), (UV)(uid)) +# define SvUID(sv) SvUV(sv) +# endif +# endif /* Uid_t_size */ + +# if Gid_t_size > IVSIZE +# define sv_setgid(sv, gid) sv_setnv((sv), (NV)(gid)) +# define SvGID(sv) SvNV(sv) +# else +# if Gid_t_sign <= 0 +# define sv_setgid(sv, gid) sv_setiv((sv), (IV)(gid)) +# define SvGID(sv) SvIV(sv) +# else +# define sv_setgid(sv, gid) sv_setuv((sv), (UV)(gid)) +# define SvGID(sv) SvUV(sv) +# endif +# endif /* Gid_t_size */ + +#endif + #endif /* HANDY_H */ /* diff --git a/Master/tlpkg/tlperl/lib/CORE/hv.h b/Master/tlpkg/tlperl/lib/CORE/hv.h index be7717d3d59..95dde4681ed 100644 --- a/Master/tlpkg/tlperl/lib/CORE/hv.h +++ b/Master/tlpkg/tlperl/lib/CORE/hv.h @@ -81,6 +81,7 @@ struct mro_meta { U32 pkg_gen; /* Bumps when local methods/@ISA change */ const struct mro_alg *mro_which; /* which mro alg is in use? */ HV *isa; /* Everything this class @ISA */ + HV *super; /* SUPER method cache */ U32 destroy_gen; /* Generation number of DESTROY cache */ }; @@ -112,14 +113,18 @@ struct xpvhv_aux { */ I32 xhv_name_count; struct mro_meta *xhv_mro_meta; - HV * xhv_super; /* SUPER method cache */ #ifdef PERL_HASH_RANDOMIZE_KEYS U32 xhv_rand; /* random value for hash traversal */ U32 xhv_last_rand; /* last random value for hash traversal, used to detect each() after insert for warnings */ #endif + U32 xhv_fill_lazy; + U32 xhv_aux_flags; /* assorted extra flags */ }; +#define HvAUXf_SCAN_STASH 0x1 /* stash is being scanned by gv_check */ +#define HvAUXf_NO_DEREF 0x2 /* @{}, %{} etc (and nomethod) not present */ + /* hash structure: */ /* This structure must match the beginning of struct xpvmg in sv.h. */ struct xpvhv { @@ -135,7 +140,7 @@ struct xpvhv { =for apidoc AmU||HEf_SVKEY This flag, used in the length slot of hash entries and magic structures, specifies the structure contains an C<SV*> pointer where a C<char*> pointer -is to be expected. (For information only--not to be used). +is to be expected. (For information only--not to be used). =head1 Handy Values @@ -157,10 +162,10 @@ Returns the length of the stash's name. Returns true if the name is in UTF8 encoding. =for apidoc Am|char*|HvENAME|HV* stash -Returns the effective name of a stash, or NULL if there is none. The +Returns the effective name of a stash, or NULL if there is none. The effective name represents a location in the symbol table where this stash -resides. It is updated automatically when packages are aliased or deleted. -A stash that is no longer in the symbol table has no effective name. This +resides. It is updated automatically when packages are aliased or deleted. +A stash that is no longer in the symbol table has no effective name. This name is preferable to C<HvNAME> for use in MRO linearisations and isa caches. @@ -171,7 +176,7 @@ Returns the length of the stash's effective name. Returns true if the effective name is in UTF8 encoding. =for apidoc Am|void*|HeKEY|HE* he -Returns the actual pointer stored in the key slot of the hash entry. The +Returns the actual pointer stored in the key slot of the hash entry. The pointer may be either C<char*> or C<SV*>, depending on the value of C<HeKLEN()>. Can be assigned to. The C<HePV()> or C<HeSVKEY()> macros are usually preferable for finding the value of a key. @@ -179,11 +184,12 @@ usually preferable for finding the value of a key. =for apidoc Am|STRLEN|HeKLEN|HE* he If this is negative, and amounts to C<HEf_SVKEY>, it indicates the entry holds an C<SV*> key. Otherwise, holds the actual length of the key. Can -be assigned to. The C<HePV()> macro is usually preferable for finding key +be assigned to. The C<HePV()> macro is usually preferable for finding key lengths. =for apidoc Am|SV*|HeVAL|HE* he -Returns the value slot (type C<SV*>) stored in the hash entry. Can be assigned +Returns the value slot (type C<SV*>) +stored in the hash entry. Can be assigned to. SV *foo= HeVAL(hv); @@ -201,14 +207,14 @@ not care about what the length of the key is, you may use the global variable C<PL_na>, though this is rather less efficient than using a local variable. Remember though, that hash keys in perl are free to contain embedded nulls, so using C<strlen()> or similar is not a good way to find -the length of hash keys. This is very similar to the C<SvPV()> macro -described elsewhere in this document. See also C<HeUTF8>. +the length of hash keys. This is very similar to the C<SvPV()> macro +described elsewhere in this document. See also C<HeUTF8>. If you are using C<HePV> to get values to pass to C<newSVpvn()> to create a new SV, you should consider using C<newSVhek(HeKEY_hek(he))> as it is more efficient. -=for apidoc Am|char*|HeUTF8|HE* he +=for apidoc Am|U32|HeUTF8|HE* he Returns whether the C<char *> value returned by C<HePV> is encoded in UTF-8, doing any necessary dereferencing of possibly C<SV*> keys. The value returned will be 0 or non-0, not necessarily 1 (or even a value with any low bits set), @@ -233,6 +239,18 @@ C<SV*>. #define PERL_HASH_DEFAULT_HvMAX 7 +/* During hsplit(), if HvMAX(hv)+1 (the new bucket count) is >= this value, + * we preallocate the HvAUX() struct. + * The assumption being that we are using so much space anyway we might + * as well allocate the extra bytes and speed up later keys() + * or each() operations. We don't do this to small hashes as we assume + * that a) it will be easy/fast to resize them to add the iterator, and b) that + * many of them will be objects which won't be traversed. Larger hashes however + * will take longer to extend, and the size of the aux struct is swamped by the + * overall length of the bucket array. + * */ +#define PERL_HV_ALLOC_AUX_SIZE (1 << 9) + /* these hash entry flags ride on hent_klen (for use only in magic/tied HVs) */ #define HEf_SVKEY -2 /* hent_key is an SV* */ @@ -240,7 +258,7 @@ C<SV*>. # define Nullhv Null(HV*) #endif #define HvARRAY(hv) ((hv)->sv_u.svu_hash) -#define HvFILL(hv) Perl_hv_fill(aTHX_ (const HV *)(hv)) +#define HvFILL(hv) Perl_hv_fill(aTHX_ MUTABLE_HV(hv)) #define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max /* This quite intentionally does no flag checking first. That's your responsibility. */ @@ -366,7 +384,9 @@ C<SV*>. ((HeKLEN(he) == HEf_SVKEY) ? \ HeKEY_sv(he) : \ newSVpvn_flags(HeKEY(he), \ - HeKLEN(he), SVs_TEMP)) : \ + HeKLEN(he), \ + SVs_TEMP | \ + ( HeKUTF8(he) ? SVf_UTF8 : 0 ))) : \ &PL_sv_undef) #define HeSVKEY_set(he,sv) ((HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv)) @@ -467,6 +487,22 @@ C<SV*>. (MUTABLE_SV(hv_common_key_len((hv), (key), (klen), \ (flags) | HV_DELETE, NULL, 0))) +#ifdef PERL_CORE +# define hv_storehek(hv, hek, val) \ + hv_common((hv), NULL, HEK_KEY(hek), HEK_LEN(hek), HEK_UTF8(hek), \ + HV_FETCH_ISSTORE|HV_FETCH_JUST_SV, (val), HEK_HASH(hek)) +# define hv_fetchhek(hv, hek, lval) \ + ((SV **) \ + hv_common((hv), NULL, HEK_KEY(hek), HEK_LEN(hek), HEK_UTF8(hek), \ + (lval) \ + ? (HV_FETCH_JUST_SV | HV_FETCH_LVALUE) \ + : HV_FETCH_JUST_SV, \ + NULL, HEK_HASH(hek))) +# define hv_deletehek(hv, hek, flags) \ + hv_common((hv), NULL, HEK_KEY(hek), HEK_LEN(hek), HEK_UTF8(hek), \ + (flags)|HV_DELETE, NULL, HEK_HASH(hek)) +#endif + /* This refcounted he structure is used for storing the hints used for lexical pragmas. Without threads, it's basically struct he + refcount. With threads, life gets more complex as the structure needs to be shared diff --git a/Master/tlpkg/tlperl/lib/CORE/hv_func.h b/Master/tlpkg/tlperl/lib/CORE/hv_func.h index 7678807d883..191912a6cc7 100755 --- a/Master/tlpkg/tlperl/lib/CORE/hv_func.h +++ b/Master/tlpkg/tlperl/lib/CORE/hv_func.h @@ -93,7 +93,7 @@ */ #if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ - || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) + || defined(_MSC_VER) || defined (__TURBOC__) #define U8TO16_LE(d) (*((const U16 *) (d))) #endif @@ -472,6 +472,16 @@ S_perl_hash_sdbm(const unsigned char * const seed, const unsigned char *str, con return hash; } +/* - ONE_AT_A_TIME_HARD is the 5.17+ recommend ONE_AT_A_TIME algorithm + * - ONE_AT_A_TIME_OLD is the unmodified 5.16 and older algorithm + * - ONE_AT_A_TIME is a 5.17+ tweak of ONE_AT_A_TIME_OLD to + * prevent strings of only \0 but different lengths from colliding + * + * Security-wise, from best to worst, + * ONE_AT_A_TIME_HARD > ONE_AT_A_TIME > ONE_AT_A_TIME_OLD + * There is a big drop-off in security between ONE_AT_A_TIME_HARD and + * ONE_AT_A_TIME + * */ /* This is the "One-at-a-Time" algorithm by Bob Jenkins * from requirements by Colin Plumb. diff --git a/Master/tlpkg/tlperl/lib/CORE/inline.h b/Master/tlpkg/tlperl/lib/CORE/inline.h index 953bb33cffb..0fe8a0eee1a 100755 --- a/Master/tlpkg/tlperl/lib/CORE/inline.h +++ b/Master/tlpkg/tlperl/lib/CORE/inline.h @@ -14,7 +14,7 @@ /* ------------------------------- av.h ------------------------------- */ -PERL_STATIC_INLINE I32 +PERL_STATIC_INLINE SSize_t S_av_top_index(pTHX_ AV *av) { PERL_ARGS_ASSERT_AV_TOP_INDEX; @@ -32,6 +32,56 @@ S_CvDEPTHp(const CV * const sv) return &((XPVCV*)SvANY(sv))->xcv_depth; } +/* + CvPROTO returns the prototype as stored, which is not necessarily what + the interpreter should be using. Specifically, the interpreter assumes + that spaces have been stripped, which has been the case if the prototype + was added by toke.c, but is generally not the case if it was added elsewhere. + Since we can't enforce the spacelessness at assignment time, this routine + provides a temporary copy at parse time with spaces removed. + I<orig> is the start of the original buffer, I<len> is the length of the + prototype and will be updated when this returns. + */ + +#ifdef PERL_CORE +PERL_STATIC_INLINE char * +S_strip_spaces(pTHX_ const char * orig, STRLEN * const len) +{ + SV * tmpsv; + char * tmps; + tmpsv = newSVpvn_flags(orig, *len, SVs_TEMP); + tmps = SvPVX(tmpsv); + while ((*len)--) { + if (!isSPACE(*orig)) + *tmps++ = *orig; + orig++; + } + *tmps = '\0'; + *len = tmps - SvPVX(tmpsv); + return SvPVX(tmpsv); +} +#endif + +/* ------------------------------- mg.h ------------------------------- */ + +#if defined(PERL_CORE) || defined(PERL_EXT) +/* assumes get-magic and stringification have already occurred */ +PERL_STATIC_INLINE STRLEN +S_MgBYTEPOS(pTHX_ MAGIC *mg, SV *sv, const char *s, STRLEN len) +{ + assert(mg->mg_type == PERL_MAGIC_regex_global); + assert(mg->mg_len != -1); + if (mg->mg_flags & MGf_BYTES || !DO_UTF8(sv)) + return (STRLEN)mg->mg_len; + else { + const STRLEN pos = (STRLEN)mg->mg_len; + /* Without this check, we may read past the end of the buffer: */ + if (pos > sv_or_pv_len_utf8(sv, s, len)) return len+1; + return sv_or_pv_pos_u2b(sv, s, pos, NULL); + } +} +#endif + /* ----------------------------- regexp.h ----------------------------- */ PERL_STATIC_INLINE struct regexp * @@ -67,7 +117,7 @@ S_SvREFCNT_dec(pTHX_ SV *sv) { if (LIKELY(sv != NULL)) { U32 rc = SvREFCNT(sv); - if (rc > 1) + if (LIKELY(rc > 1)) SvREFCNT(sv) = rc - 1; else Perl_sv_free2(aTHX_ sv, rc); @@ -78,7 +128,7 @@ PERL_STATIC_INLINE void S_SvREFCNT_dec_NN(pTHX_ SV *sv) { U32 rc = SvREFCNT(sv); - if (rc > 1) + if (LIKELY(rc > 1)) SvREFCNT(sv) = rc - 1; else Perl_sv_free2(aTHX_ sv, rc); @@ -121,10 +171,11 @@ S_SvPADSTALE_off(SV *sv) assert(SvFLAGS(sv) & SVs_PADMY); return SvFLAGS(sv) &= ~SVs_PADSTALE; } -#ifdef PERL_CORE +#if defined(PERL_CORE) || defined (PERL_EXT) PERL_STATIC_INLINE STRLEN S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) { + PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B; if (SvGAMAGIC(sv)) { U8 *hopped = utf8_hop((U8 *)pv, pos); if (lenp) *lenp = (STRLEN)(utf8_hop(hopped, *lenp) - hopped); @@ -134,10 +185,89 @@ S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) } #endif +/* ------------------------------- handy.h ------------------------------- */ + +/* saves machine code for a common noreturn idiom typically used in Newx*() */ +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunused-function" +#endif +static void +S_croak_memory_wrap(void) +{ + Perl_croak_nocontext("%s",PL_memory_wrap); +} +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#ifdef BOOTSTRAP_CHARSET +static bool +S_bootstrap_ctype(U8 character, UV classnum, bool full_Latin1) +{ + /* See comments in handy.h. This is placed in this file primarily to avoid + * having to have an entry for it in embed.fnc */ + + dTHX; + + if (! full_Latin1 && ! isASCII(character)) { + return FALSE; + } + + switch (classnum) { + case _CC_ALPHANUMERIC: return isALPHANUMERIC_L1(character); + case _CC_ALPHA: return isALPHA_L1(character); + case _CC_ASCII: return isASCII_L1(character); + case _CC_BLANK: return isBLANK_L1(character); + case _CC_CASED: return isLOWER_L1(character) + || isUPPER_L1(character); + case _CC_CNTRL: return isCNTRL_L1(character); + case _CC_DIGIT: return isDIGIT_L1(character); + case _CC_GRAPH: return isGRAPH_L1(character); + case _CC_LOWER: return isLOWER_L1(character); + case _CC_PRINT: return isPRINT_L1(character); + case _CC_PSXSPC: return isPSXSPC_L1(character); + case _CC_PUNCT: return isPUNCT_L1(character); + case _CC_SPACE: return isSPACE_L1(character); + case _CC_UPPER: return isUPPER_L1(character); + case _CC_WORDCHAR: return isWORDCHAR_L1(character); + case _CC_XDIGIT: return isXDIGIT_L1(character); + case _CC_VERTSPACE: return isSPACE_L1(character) && ! isBLANK_L1(character); + case _CC_IDFIRST: return isIDFIRST_L1(character); + case _CC_QUOTEMETA: return _isQUOTEMETA(character); + case _CC_CHARNAME_CONT: return isCHARNAME_CONT(character); + case _CC_NONLATIN1_FOLD: return _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(character); + case _CC_NON_FINAL_FOLD: return _IS_NON_FINAL_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(character); + case _CC_IS_IN_SOME_FOLD: return _IS_IN_SOME_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(character); + case _CC_BACKSLASH_FOO_LBRACE_IS_META: return 0; + + + default: break; + } + Perl_croak(aTHX_ "panic: bootstrap_ctype() has an unexpected character class '%" UVxf "'", classnum); +} +#endif + /* ------------------------------- utf8.h ------------------------------- */ -/* These exist only to replace the macros they formerly were so that their use - * can be deprecated */ +PERL_STATIC_INLINE void +S_append_utf8_from_native_byte(const U8 byte, U8** dest) +{ + /* Takes an input 'byte' (Latin1 or EBCDIC) and appends it to the UTF-8 + * encoded string at '*dest', updating '*dest' to include it */ + + PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE; + + if (NATIVE_BYTE_IS_INVARIANT(byte)) + *(*dest)++ = byte; + else { + *(*dest)++ = UTF8_EIGHT_BIT_HI(byte); + *(*dest)++ = UTF8_EIGHT_BIT_LO(byte); + } +} + +/* These two exist only to replace the macros they formerly were so that their + * use can be deprecated */ PERL_STATIC_INLINE bool S_isIDFIRST_lazy(pTHX_ const char* p) @@ -154,3 +284,50 @@ S_isALNUM_lazy(pTHX_ const char* p) return isALNUM_lazy_if(p,1); } + +/* ------------------------------- perl.h ----------------------------- */ + +/* +=for apidoc AiR|bool|is_safe_syscall|const char *pv|STRLEN len|const char *what|const char *op_name + +Test that the given C<pv> doesn't contain any internal C<NUL> characters. +If it does, set C<errno> to ENOENT, optionally warn, and return FALSE. + +Return TRUE if the name is safe. + +Used by the IS_SAFE_SYSCALL() macro. + +=cut +*/ + +PERL_STATIC_INLINE bool +S_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name) { + /* While the Windows CE API provides only UCS-16 (or UTF-16) APIs + * perl itself uses xce*() functions which accept 8-bit strings. + */ + + PERL_ARGS_ASSERT_IS_SAFE_SYSCALL; + + if (pv && len > 1) { + char *null_at; + if (UNLIKELY((null_at = (char *)memchr(pv, 0, len-1)) != NULL)) { + SETERRNO(ENOENT, LIB_INVARG); + Perl_ck_warner(aTHX_ packWARN(WARN_SYSCALLS), + "Invalid \\0 character in %s for %s: %s\\0%s", + what, op_name, pv, null_at+1); + return FALSE; + } + } + + return TRUE; +} + +/* + * Local variables: + * c-indentation-style: bsd + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * + * ex: set ts=8 sts=4 sw=4 et: + */ diff --git a/Master/tlpkg/tlperl/lib/CORE/intrpvar.h b/Master/tlpkg/tlperl/lib/CORE/intrpvar.h index d31b15e0aeb..08c4a382224 100644 --- a/Master/tlpkg/tlperl/lib/CORE/intrpvar.h +++ b/Master/tlpkg/tlperl/lib/CORE/intrpvar.h @@ -33,11 +33,7 @@ * Important ones in the first cache line (if alignment is done right) */ PERLVAR(I, stack_sp, SV **) /* top of the stack */ -#ifdef OP_IN_REGISTER -PERLVAR(I, opsave, OP *) -#else PERLVAR(I, op, OP *) /* currently executing op */ -#endif PERLVAR(I, curpad, SV **) /* active pad (lexicals+tmps) */ PERLVAR(I, stack_base, SV **) @@ -53,9 +49,9 @@ PERLVAR(I, scopestack_ix, I32) PERLVAR(I, scopestack_max, I32) PERLVAR(I, tmps_stack, SV **) /* mortals we've made */ -PERLVARI(I, tmps_ix, I32, -1) -PERLVARI(I, tmps_floor, I32, -1) -PERLVAR(I, tmps_max, I32) +PERLVARI(I, tmps_ix, SSize_t, -1) +PERLVARI(I, tmps_floor, SSize_t, -1) +PERLVAR(I, tmps_max, SSize_t) PERLVARI(I, sub_generation, U32, 1) /* incr to invalidate method cache */ @@ -80,6 +76,7 @@ PERLVAR(I, tainted, bool) /* using variables controlled by $< */ PERLVAR(I, delaymagic, U16) /* ($<,$>) = ... */ PERLVAR(I, localizing, U8) /* are we processing a local() list? */ PERLVAR(I, in_eval, U8) /* trap "fatal" errors? */ +PERLVAR(I, defgv, GV *) /* the *_ glob */ /* =for apidoc mn|bool|PL_dowarn @@ -113,16 +110,18 @@ PERLVAR(I, mainstack, AV *) /* the stack when nothing funny is /* memory management */ PERLVAR(I, sv_count, IV) /* how many SV* are currently allocated */ PERLVAR(I, sv_objcount, IV) /* DEPRECATED AND UNMAINTAINED. - * Will be removed in Perl 5.20. + * Will be removed in Perl 5.22. * Used to be: how many objects are currently allocated. */ PERLVAR(I, sv_root, SV *) /* storage for SVs belonging to interp */ PERLVAR(I, sv_arenaroot, SV *) /* list of areas for garbage collection */ -PERLVAR(I, reg_state, struct re_save_state) +/* fake PMOP that PL_curpm points to while in (?{}) so $1 et al are visible */ +PERLVARI(I, reg_curpm, PMOP*, NULL) /* the currently active slab in a chain of slabs of regmatch states, - * and the currently active state within that slab */ + * and the currently active state within that slab. This stack of states + * is shared amongst re-entrant calls to the regex engine */ PERLVARI(I, regmatch_slab, regmatch_slab *, NULL) PERLVAR(I, regmatch_state, regmatch_state *) @@ -175,6 +174,7 @@ PERLVAR(I, statgv, GV *) PERLVARI(I, statname, SV *, NULL) #ifdef HAS_TIMES +/* Will be removed soon after v5.21.0. See RT #121351 */ PERLVAR(I, timesbuf, struct tms) #endif @@ -185,7 +185,7 @@ The input record separator - C<$/> in Perl space. =for apidoc mn|GV*|PL_last_in_gv -The GV which was last used for a filehandle input operation. (C<< <FH> >>) +The GV which was last used for a filehandle input operation. (C<< <FH> >>) =for apidoc mn|GV*|PL_ofsgv @@ -226,16 +226,15 @@ PERLVAR(I, secondgv, GV *) /* $b */ PERLVAR(I, efloatbuf, char *) PERLVAR(I, efloatsize, STRLEN) -PERLVAR(I, regdummy, regnode) /* from regcomp.c */ - PERLVARI(I, dumpindent, U16, 4) /* number of blanks per dump indentation level */ PERLVAR(I, exit_flags, U8) /* was exit() unexpected, etc. */ PERLVAR(I, utf8locale, bool) /* utf8 locale detected */ +PERLVAR(I, in_utf8_CTYPE_locale, bool) -PERLVARA(I, colors,6, char *) /* from regcomp.c */ +PERLVARA(I, colors,6, char *) /* values from PERL_RE_COLORS env var */ /* =for apidoc Amn|peep_t|PL_peepp @@ -352,7 +351,6 @@ PERLVAR(I, psig_pend, int *) /* per-signal "count" of pending */ /* shortcuts to various I/O objects */ PERLVAR(I, stdingv, GV *) /* *STDIN */ PERLVAR(I, stderrgv, GV *) /* *STDERR */ -PERLVAR(I, defgv, GV *) PERLVAR(I, argvgv, GV *) /* *ARGV */ PERLVAR(I, argvoutgv, GV *) /* *ARGVOUT */ PERLVAR(I, argvout_stack, AV *) @@ -540,8 +538,6 @@ PERLVAR(I, padix, I32) /* max used index in current "register" pad */ PERLVAR(I, padix_floor, I32) /* how low may inner block reset padix */ -PERLVAR(I, hints, U32) /* pragma-tic compile-time flags */ - #ifdef USE_LOCALE_COLLATE PERLVAR(I, collation_name, char *) /* Name of current collation */ PERLVAR(I, collxfrm_base, Size_t) /* Basic overhead in *xfrm() */ @@ -556,7 +552,7 @@ PERLVAR(I, sawampersand, U8) /* must save all match strings */ #endif PERLVAR(I, unsafe, bool) -PERLVAR(I, colorset, bool) /* from regcomp.c */ +PERLVAR(I, colorset, bool) /* PERL_RE_COLORS env var is in use */ /* current phase the interpreter is in for ordering this structure to remove holes, we're assuming that this is 4 @@ -582,8 +578,8 @@ PERLVAR(I, numeric_radix_sv, SV *) /* The radix separator if not '.' */ #endif /* !USE_LOCALE_NUMERIC */ /* Unicode inversion lists */ -PERLVAR(I, ASCII, SV *) PERLVAR(I, Latin1, SV *) +PERLVAR(I, UpperLatin1, SV *) /* Code points 128 - 255 */ PERLVAR(I, AboveLatin1, SV *) PERLVAR(I, NonL1NonFinalFold, SV *) @@ -602,7 +598,6 @@ PERLVAR(I, utf8_charname_continue, SV *) PERLVARA(I, utf8_swash_ptrs, POSIX_SWASH_COUNT, SV *) PERLVARA(I, Posix_ptrs, POSIX_CC_COUNT, SV *) -PERLVARA(I, L1Posix_ptrs, POSIX_CC_COUNT, SV *) PERLVARA(I, XPosix_ptrs, POSIX_CC_COUNT, SV *) PERLVAR(I, last_swash_hv, HV *) @@ -741,7 +736,7 @@ PERLVAR(I, debug_pad, struct perl_debug_pad) /* always needed because of the re /* Hook for File::Glob */ PERLVARI(I, globhook, globhook_t, NULL) -/* The last unconditional member of the interpreter structure when 5.18.2 was +/* The last unconditional member of the interpreter structure when 5.20.2 was released. The offset of the end of this is baked into a global variable in any shared perl library which will allow a sanity test in future perl releases. */ @@ -775,6 +770,19 @@ PERLVARI(I, xmlfp, PerlIO *, NULL) PERLVARI(I, sv_serial, U32, 0) /* SV serial number, used in sv.c */ #endif +PERLVARA(I, sv_consts, SV_CONSTS_COUNT, SV*) /* constant SVs with precomputed hash value */ + +#ifdef PERL_TRACE_OPS +PERLVARA(I, op_exec_cnt, OP_max+2, UV) /* Counts of executed OPs of the given type. + If PERL_TRACE_OPS is enabled, we'll dump + a summary count of all ops executed in the + program at perl_destruct time. For + profiling/debugging only. Works only if + DEBUGGING is enabled, too. */ +#endif + +PERLVAR(I, random_state, PL_RANDOM_STATE_TYPE) + /* If you are adding a U8 or U16, check to see if there are 'Space' comments * above on where there are gaps which currently will be structure padding. */ diff --git a/Master/tlpkg/tlperl/lib/CORE/iperlsys.h b/Master/tlpkg/tlperl/lib/CORE/iperlsys.h index b23f4d3eb29..003405f690f 100644 --- a/Master/tlpkg/tlperl/lib/CORE/iperlsys.h +++ b/Master/tlpkg/tlperl/lib/CORE/iperlsys.h @@ -933,10 +933,10 @@ typedef int (*LPProcExecv)(struct IPerlProc*, const char*, const char*const*); typedef int (*LPProcExecvp)(struct IPerlProc*, const char*, const char*const*); -typedef uid_t (*LPProcGetuid)(struct IPerlProc*); -typedef uid_t (*LPProcGeteuid)(struct IPerlProc*); -typedef gid_t (*LPProcGetgid)(struct IPerlProc*); -typedef gid_t (*LPProcGetegid)(struct IPerlProc*); +typedef Uid_t (*LPProcGetuid)(struct IPerlProc*); +typedef Uid_t (*LPProcGeteuid)(struct IPerlProc*); +typedef Gid_t (*LPProcGetgid)(struct IPerlProc*); +typedef Gid_t (*LPProcGetegid)(struct IPerlProc*); typedef char* (*LPProcGetlogin)(struct IPerlProc*); typedef int (*LPProcKill)(struct IPerlProc*, int, int); typedef int (*LPProcKillpg)(struct IPerlProc*, int, int); diff --git a/Master/tlpkg/tlperl/lib/CORE/keywords.h b/Master/tlpkg/tlperl/lib/CORE/keywords.h index 5ebde874ff7..f23896c4106 100644 --- a/Master/tlpkg/tlperl/lib/CORE/keywords.h +++ b/Master/tlpkg/tlperl/lib/CORE/keywords.h @@ -23,253 +23,252 @@ #define KEY_AUTOLOAD 7 #define KEY_BEGIN 8 #define KEY_UNITCHECK 9 -#define KEY_CORE 10 -#define KEY_DESTROY 11 -#define KEY_END 12 -#define KEY_INIT 13 -#define KEY_CHECK 14 -#define KEY_abs 15 -#define KEY_accept 16 -#define KEY_alarm 17 -#define KEY_and 18 -#define KEY_atan2 19 -#define KEY_bind 20 -#define KEY_binmode 21 -#define KEY_bless 22 -#define KEY_break 23 -#define KEY_caller 24 -#define KEY_chdir 25 -#define KEY_chmod 26 -#define KEY_chomp 27 -#define KEY_chop 28 -#define KEY_chown 29 -#define KEY_chr 30 -#define KEY_chroot 31 -#define KEY_close 32 -#define KEY_closedir 33 -#define KEY_cmp 34 -#define KEY_connect 35 -#define KEY_continue 36 -#define KEY_cos 37 -#define KEY_crypt 38 -#define KEY_dbmclose 39 -#define KEY_dbmopen 40 -#define KEY_default 41 -#define KEY_defined 42 -#define KEY_delete 43 -#define KEY_die 44 -#define KEY_do 45 -#define KEY_dump 46 -#define KEY_each 47 -#define KEY_else 48 -#define KEY_elsif 49 -#define KEY_endgrent 50 -#define KEY_endhostent 51 -#define KEY_endnetent 52 -#define KEY_endprotoent 53 -#define KEY_endpwent 54 -#define KEY_endservent 55 -#define KEY_eof 56 -#define KEY_eq 57 -#define KEY_eval 58 -#define KEY_evalbytes 59 -#define KEY_exec 60 -#define KEY_exists 61 -#define KEY_exit 62 -#define KEY_exp 63 -#define KEY_fc 64 -#define KEY_fcntl 65 -#define KEY_fileno 66 -#define KEY_flock 67 -#define KEY_for 68 -#define KEY_foreach 69 -#define KEY_fork 70 -#define KEY_format 71 -#define KEY_formline 72 -#define KEY_ge 73 -#define KEY_getc 74 -#define KEY_getgrent 75 -#define KEY_getgrgid 76 -#define KEY_getgrnam 77 -#define KEY_gethostbyaddr 78 -#define KEY_gethostbyname 79 -#define KEY_gethostent 80 -#define KEY_getlogin 81 -#define KEY_getnetbyaddr 82 -#define KEY_getnetbyname 83 -#define KEY_getnetent 84 -#define KEY_getpeername 85 -#define KEY_getpgrp 86 -#define KEY_getppid 87 -#define KEY_getpriority 88 -#define KEY_getprotobyname 89 -#define KEY_getprotobynumber 90 -#define KEY_getprotoent 91 -#define KEY_getpwent 92 -#define KEY_getpwnam 93 -#define KEY_getpwuid 94 -#define KEY_getservbyname 95 -#define KEY_getservbyport 96 -#define KEY_getservent 97 -#define KEY_getsockname 98 -#define KEY_getsockopt 99 -#define KEY_given 100 -#define KEY_glob 101 -#define KEY_gmtime 102 -#define KEY_goto 103 -#define KEY_grep 104 -#define KEY_gt 105 -#define KEY_hex 106 -#define KEY_if 107 -#define KEY_index 108 -#define KEY_int 109 -#define KEY_ioctl 110 -#define KEY_join 111 -#define KEY_keys 112 -#define KEY_kill 113 -#define KEY_last 114 -#define KEY_lc 115 -#define KEY_lcfirst 116 -#define KEY_le 117 -#define KEY_length 118 -#define KEY_link 119 -#define KEY_listen 120 -#define KEY_local 121 -#define KEY_localtime 122 -#define KEY_lock 123 -#define KEY_log 124 -#define KEY_lstat 125 -#define KEY_lt 126 -#define KEY_m 127 -#define KEY_map 128 -#define KEY_mkdir 129 -#define KEY_msgctl 130 -#define KEY_msgget 131 -#define KEY_msgrcv 132 -#define KEY_msgsnd 133 -#define KEY_my 134 -#define KEY_ne 135 -#define KEY_next 136 -#define KEY_no 137 -#define KEY_not 138 -#define KEY_oct 139 -#define KEY_open 140 -#define KEY_opendir 141 -#define KEY_or 142 -#define KEY_ord 143 -#define KEY_our 144 -#define KEY_pack 145 -#define KEY_package 146 -#define KEY_pipe 147 -#define KEY_pop 148 -#define KEY_pos 149 -#define KEY_print 150 -#define KEY_printf 151 -#define KEY_prototype 152 -#define KEY_push 153 -#define KEY_q 154 -#define KEY_qq 155 -#define KEY_qr 156 -#define KEY_quotemeta 157 -#define KEY_qw 158 -#define KEY_qx 159 -#define KEY_rand 160 -#define KEY_read 161 -#define KEY_readdir 162 -#define KEY_readline 163 -#define KEY_readlink 164 -#define KEY_readpipe 165 -#define KEY_recv 166 -#define KEY_redo 167 -#define KEY_ref 168 -#define KEY_rename 169 -#define KEY_require 170 -#define KEY_reset 171 -#define KEY_return 172 -#define KEY_reverse 173 -#define KEY_rewinddir 174 -#define KEY_rindex 175 -#define KEY_rmdir 176 -#define KEY_s 177 -#define KEY_say 178 -#define KEY_scalar 179 -#define KEY_seek 180 -#define KEY_seekdir 181 -#define KEY_select 182 -#define KEY_semctl 183 -#define KEY_semget 184 -#define KEY_semop 185 -#define KEY_send 186 -#define KEY_setgrent 187 -#define KEY_sethostent 188 -#define KEY_setnetent 189 -#define KEY_setpgrp 190 -#define KEY_setpriority 191 -#define KEY_setprotoent 192 -#define KEY_setpwent 193 -#define KEY_setservent 194 -#define KEY_setsockopt 195 -#define KEY_shift 196 -#define KEY_shmctl 197 -#define KEY_shmget 198 -#define KEY_shmread 199 -#define KEY_shmwrite 200 -#define KEY_shutdown 201 -#define KEY_sin 202 -#define KEY_sleep 203 -#define KEY_socket 204 -#define KEY_socketpair 205 -#define KEY_sort 206 -#define KEY_splice 207 -#define KEY_split 208 -#define KEY_sprintf 209 -#define KEY_sqrt 210 -#define KEY_srand 211 -#define KEY_stat 212 -#define KEY_state 213 -#define KEY_study 214 -#define KEY_sub 215 -#define KEY_substr 216 -#define KEY_symlink 217 -#define KEY_syscall 218 -#define KEY_sysopen 219 -#define KEY_sysread 220 -#define KEY_sysseek 221 -#define KEY_system 222 -#define KEY_syswrite 223 -#define KEY_tell 224 -#define KEY_telldir 225 -#define KEY_tie 226 -#define KEY_tied 227 -#define KEY_time 228 -#define KEY_times 229 -#define KEY_tr 230 -#define KEY_truncate 231 -#define KEY_uc 232 -#define KEY_ucfirst 233 -#define KEY_umask 234 -#define KEY_undef 235 -#define KEY_unless 236 -#define KEY_unlink 237 -#define KEY_unpack 238 -#define KEY_unshift 239 -#define KEY_untie 240 -#define KEY_until 241 -#define KEY_use 242 -#define KEY_utime 243 -#define KEY_values 244 -#define KEY_vec 245 -#define KEY_wait 246 -#define KEY_waitpid 247 -#define KEY_wantarray 248 -#define KEY_warn 249 -#define KEY_when 250 -#define KEY_while 251 -#define KEY_write 252 -#define KEY_x 253 -#define KEY_xor 254 -#define KEY_y 255 +#define KEY_DESTROY 10 +#define KEY_END 11 +#define KEY_INIT 12 +#define KEY_CHECK 13 +#define KEY_abs 14 +#define KEY_accept 15 +#define KEY_alarm 16 +#define KEY_and 17 +#define KEY_atan2 18 +#define KEY_bind 19 +#define KEY_binmode 20 +#define KEY_bless 21 +#define KEY_break 22 +#define KEY_caller 23 +#define KEY_chdir 24 +#define KEY_chmod 25 +#define KEY_chomp 26 +#define KEY_chop 27 +#define KEY_chown 28 +#define KEY_chr 29 +#define KEY_chroot 30 +#define KEY_close 31 +#define KEY_closedir 32 +#define KEY_cmp 33 +#define KEY_connect 34 +#define KEY_continue 35 +#define KEY_cos 36 +#define KEY_crypt 37 +#define KEY_dbmclose 38 +#define KEY_dbmopen 39 +#define KEY_default 40 +#define KEY_defined 41 +#define KEY_delete 42 +#define KEY_die 43 +#define KEY_do 44 +#define KEY_dump 45 +#define KEY_each 46 +#define KEY_else 47 +#define KEY_elsif 48 +#define KEY_endgrent 49 +#define KEY_endhostent 50 +#define KEY_endnetent 51 +#define KEY_endprotoent 52 +#define KEY_endpwent 53 +#define KEY_endservent 54 +#define KEY_eof 55 +#define KEY_eq 56 +#define KEY_eval 57 +#define KEY_evalbytes 58 +#define KEY_exec 59 +#define KEY_exists 60 +#define KEY_exit 61 +#define KEY_exp 62 +#define KEY_fc 63 +#define KEY_fcntl 64 +#define KEY_fileno 65 +#define KEY_flock 66 +#define KEY_for 67 +#define KEY_foreach 68 +#define KEY_fork 69 +#define KEY_format 70 +#define KEY_formline 71 +#define KEY_ge 72 +#define KEY_getc 73 +#define KEY_getgrent 74 +#define KEY_getgrgid 75 +#define KEY_getgrnam 76 +#define KEY_gethostbyaddr 77 +#define KEY_gethostbyname 78 +#define KEY_gethostent 79 +#define KEY_getlogin 80 +#define KEY_getnetbyaddr 81 +#define KEY_getnetbyname 82 +#define KEY_getnetent 83 +#define KEY_getpeername 84 +#define KEY_getpgrp 85 +#define KEY_getppid 86 +#define KEY_getpriority 87 +#define KEY_getprotobyname 88 +#define KEY_getprotobynumber 89 +#define KEY_getprotoent 90 +#define KEY_getpwent 91 +#define KEY_getpwnam 92 +#define KEY_getpwuid 93 +#define KEY_getservbyname 94 +#define KEY_getservbyport 95 +#define KEY_getservent 96 +#define KEY_getsockname 97 +#define KEY_getsockopt 98 +#define KEY_given 99 +#define KEY_glob 100 +#define KEY_gmtime 101 +#define KEY_goto 102 +#define KEY_grep 103 +#define KEY_gt 104 +#define KEY_hex 105 +#define KEY_if 106 +#define KEY_index 107 +#define KEY_int 108 +#define KEY_ioctl 109 +#define KEY_join 110 +#define KEY_keys 111 +#define KEY_kill 112 +#define KEY_last 113 +#define KEY_lc 114 +#define KEY_lcfirst 115 +#define KEY_le 116 +#define KEY_length 117 +#define KEY_link 118 +#define KEY_listen 119 +#define KEY_local 120 +#define KEY_localtime 121 +#define KEY_lock 122 +#define KEY_log 123 +#define KEY_lstat 124 +#define KEY_lt 125 +#define KEY_m 126 +#define KEY_map 127 +#define KEY_mkdir 128 +#define KEY_msgctl 129 +#define KEY_msgget 130 +#define KEY_msgrcv 131 +#define KEY_msgsnd 132 +#define KEY_my 133 +#define KEY_ne 134 +#define KEY_next 135 +#define KEY_no 136 +#define KEY_not 137 +#define KEY_oct 138 +#define KEY_open 139 +#define KEY_opendir 140 +#define KEY_or 141 +#define KEY_ord 142 +#define KEY_our 143 +#define KEY_pack 144 +#define KEY_package 145 +#define KEY_pipe 146 +#define KEY_pop 147 +#define KEY_pos 148 +#define KEY_print 149 +#define KEY_printf 150 +#define KEY_prototype 151 +#define KEY_push 152 +#define KEY_q 153 +#define KEY_qq 154 +#define KEY_qr 155 +#define KEY_quotemeta 156 +#define KEY_qw 157 +#define KEY_qx 158 +#define KEY_rand 159 +#define KEY_read 160 +#define KEY_readdir 161 +#define KEY_readline 162 +#define KEY_readlink 163 +#define KEY_readpipe 164 +#define KEY_recv 165 +#define KEY_redo 166 +#define KEY_ref 167 +#define KEY_rename 168 +#define KEY_require 169 +#define KEY_reset 170 +#define KEY_return 171 +#define KEY_reverse 172 +#define KEY_rewinddir 173 +#define KEY_rindex 174 +#define KEY_rmdir 175 +#define KEY_s 176 +#define KEY_say 177 +#define KEY_scalar 178 +#define KEY_seek 179 +#define KEY_seekdir 180 +#define KEY_select 181 +#define KEY_semctl 182 +#define KEY_semget 183 +#define KEY_semop 184 +#define KEY_send 185 +#define KEY_setgrent 186 +#define KEY_sethostent 187 +#define KEY_setnetent 188 +#define KEY_setpgrp 189 +#define KEY_setpriority 190 +#define KEY_setprotoent 191 +#define KEY_setpwent 192 +#define KEY_setservent 193 +#define KEY_setsockopt 194 +#define KEY_shift 195 +#define KEY_shmctl 196 +#define KEY_shmget 197 +#define KEY_shmread 198 +#define KEY_shmwrite 199 +#define KEY_shutdown 200 +#define KEY_sin 201 +#define KEY_sleep 202 +#define KEY_socket 203 +#define KEY_socketpair 204 +#define KEY_sort 205 +#define KEY_splice 206 +#define KEY_split 207 +#define KEY_sprintf 208 +#define KEY_sqrt 209 +#define KEY_srand 210 +#define KEY_stat 211 +#define KEY_state 212 +#define KEY_study 213 +#define KEY_sub 214 +#define KEY_substr 215 +#define KEY_symlink 216 +#define KEY_syscall 217 +#define KEY_sysopen 218 +#define KEY_sysread 219 +#define KEY_sysseek 220 +#define KEY_system 221 +#define KEY_syswrite 222 +#define KEY_tell 223 +#define KEY_telldir 224 +#define KEY_tie 225 +#define KEY_tied 226 +#define KEY_time 227 +#define KEY_times 228 +#define KEY_tr 229 +#define KEY_truncate 230 +#define KEY_uc 231 +#define KEY_ucfirst 232 +#define KEY_umask 233 +#define KEY_undef 234 +#define KEY_unless 235 +#define KEY_unlink 236 +#define KEY_unpack 237 +#define KEY_unshift 238 +#define KEY_untie 239 +#define KEY_until 240 +#define KEY_use 241 +#define KEY_utime 242 +#define KEY_values 243 +#define KEY_vec 244 +#define KEY_wait 245 +#define KEY_waitpid 246 +#define KEY_wantarray 247 +#define KEY_warn 248 +#define KEY_when 249 +#define KEY_while 250 +#define KEY_write 251 +#define KEY_x 252 +#define KEY_xor 253 +#define KEY_y 254 /* Generated from: - * e5a540774760ea54c761ef17ee4a153cc264e9a700b817d561e390730c457406 regen/keywords.pl + * 7c6d47fd2890b2422a40331ec90eac08f9808209b01f2b9c113141410fea91b5 regen/keywords.pl * ex: set ro: */ diff --git a/Master/tlpkg/tlperl/lib/CORE/libperl518.a b/Master/tlpkg/tlperl/lib/CORE/libperl520.a Binary files differindex ad9154cfd61..7ceb92ba676 100755..100644 --- a/Master/tlpkg/tlperl/lib/CORE/libperl518.a +++ b/Master/tlpkg/tlperl/lib/CORE/libperl520.a diff --git a/Master/tlpkg/tlperl/lib/CORE/mg.h b/Master/tlpkg/tlperl/lib/CORE/mg.h index 995bc5eb1ab..81ed296f8a2 100644 --- a/Master/tlpkg/tlperl/lib/CORE/mg.h +++ b/Master/tlpkg/tlperl/lib/CORE/mg.h @@ -8,9 +8,6 @@ * */ -#ifdef STRUCT_MGVTBL_DEFINITION -STRUCT_MGVTBL_DEFINITION; -#else struct mgvtbl { int (*svt_get) (pTHX_ SV *sv, MAGIC* mg); int (*svt_set) (pTHX_ SV *sv, MAGIC* mg); @@ -22,7 +19,6 @@ struct mgvtbl { int (*svt_dup) (pTHX_ MAGIC *mg, CLONE_PARAMS *param); int (*svt_local)(pTHX_ SV *nsv, MAGIC *mg); }; -#endif struct magic { MAGIC* mg_moremagic; @@ -30,7 +26,7 @@ struct magic { U16 mg_private; char mg_type; U8 mg_flags; - I32 mg_len; + SSize_t mg_len; SV* mg_obj; char* mg_ptr; }; @@ -42,6 +38,7 @@ struct magic { #define MGf_COPY 8 /* has an svt_copy MGVTBL entry */ #define MGf_DUP 0x10 /* has an svt_dup MGVTBL entry */ #define MGf_LOCAL 0x20 /* has an svt_local MGVTBL entry */ +#define MGf_BYTES 0x40 /* PERL_MAGIC_regex_global only */ #define MgTAINTEDDIR(mg) (mg->mg_flags & MGf_TAINTEDDIR) #define MgTAINTEDDIR_on(mg) (mg->mg_flags |= MGf_TAINTEDDIR) @@ -61,6 +58,19 @@ struct magic { #define SvTIED_obj(sv,mg) \ ((mg)->mg_obj ? (mg)->mg_obj : sv_2mortal(newRV(sv))) +#if defined(PERL_CORE) || defined(PERL_EXT) +# define MgBYTEPOS(mg,sv,pv,len) S_MgBYTEPOS(aTHX_ mg,sv,pv,len) +/* assumes get-magic and stringification have already occurred */ +# define MgBYTEPOS_set(mg,sv,pv,off) ( \ + assert_((mg)->mg_type == PERL_MAGIC_regex_global) \ + SvPOK(sv) && !SvGMAGICAL(sv) \ + ? (mg)->mg_len = (off), (mg)->mg_flags |= MGf_BYTES \ + : ((mg)->mg_len = DO_UTF8(sv) \ + ? (SSize_t)utf8_length((U8 *)(pv), (U8 *)(pv)+(off)) \ + : (SSize_t)(off), \ + (mg)->mg_flags &= ~MGf_BYTES)) +#endif + #define whichsig(pv) whichsig_pv(pv) /* diff --git a/Master/tlpkg/tlperl/lib/CORE/mg_data.h b/Master/tlpkg/tlperl/lib/CORE/mg_data.h index 23645abef46..1a7670bc6cd 100644 --- a/Master/tlpkg/tlperl/lib/CORE/mg_data.h +++ b/Master/tlpkg/tlperl/lib/CORE/mg_data.h @@ -145,7 +145,7 @@ /* tiedscalar 'q' Tied scalar or handle */ want_vtbl_packelem, /* qr 'r' precompiled qr// regex */ - want_vtbl_regexp | PERL_MAGIC_VALUE_MAGIC, + want_vtbl_regexp | PERL_MAGIC_READONLY_ACCEPTABLE | PERL_MAGIC_VALUE_MAGIC, /* sigelem 's' %SIG hash element */ want_vtbl_sigelem, /* taint 't' Taintedness */ diff --git a/Master/tlpkg/tlperl/lib/CORE/mg_raw.h b/Master/tlpkg/tlperl/lib/CORE/mg_raw.h index 487e209da1f..f508ad0e572 100644 --- a/Master/tlpkg/tlperl/lib/CORE/mg_raw.h +++ b/Master/tlpkg/tlperl/lib/CORE/mg_raw.h @@ -60,7 +60,7 @@ "/* tiedelem 'p' Tied array or hash element */" }, { 'q', "want_vtbl_packelem", "/* tiedscalar 'q' Tied scalar or handle */" }, - { 'r', "want_vtbl_regexp | PERL_MAGIC_VALUE_MAGIC", + { 'r', "want_vtbl_regexp | PERL_MAGIC_READONLY_ACCEPTABLE | PERL_MAGIC_VALUE_MAGIC", "/* qr 'r' precompiled qr// regex */" }, { 'S', "magic_vtable_max", "/* sig 'S' %SIG hash */" }, diff --git a/Master/tlpkg/tlperl/lib/CORE/op.h b/Master/tlpkg/tlperl/lib/CORE/op.h index 7c5030dde70..9d9dd58d8fa 100644 --- a/Master/tlpkg/tlperl/lib/CORE/op.h +++ b/Master/tlpkg/tlperl/lib/CORE/op.h @@ -23,7 +23,8 @@ * op_static tell op_free() to skip PerlMemShared_free(), when * !op_slabbed. * op_savefree on savestack via SAVEFREEOP - * op_spare Three spare bits + * op_folded Result/remainder of a constant fold operation. + * op_spare Two spare bits * op_flags Flags common to all operations. See OPf_* below. * op_private Flags peculiar to a particular operation (BUT, * by default, set to the number of children until @@ -56,7 +57,8 @@ typedef PERL_BITFIELD16 Optype; PERL_BITFIELD16 op_slabbed:1; \ PERL_BITFIELD16 op_savefree:1; \ PERL_BITFIELD16 op_static:1; \ - PERL_BITFIELD16 op_spare:3; \ + PERL_BITFIELD16 op_folded:1; \ + PERL_BITFIELD16 op_spare:2; \ U8 op_flags; \ U8 op_private; #endif @@ -78,7 +80,7 @@ typedef PERL_BITFIELD16 Optype; =for apidoc Amn|U32|GIMME_V The XSUB-writer's equivalent to Perl's C<wantarray>. Returns C<G_VOID>, C<G_SCALAR> or C<G_ARRAY> for void, scalar or list context, -respectively. See L<perlcall> for a usage example. +respectively. See L<perlcall> for a usage example. =for apidoc Amn|U32|GIMME A backward-compatible version of C<GIMME_V> which can only return @@ -141,6 +143,7 @@ Deprecated. Use C<GIMME_V> instead. - After ck_glob, use Perl glob function */ /* On OP_PADRANGE, push @_ */ + /* On OP_DUMP, has no label */ /* old names; don't use in new code, but don't break them, either */ #define OPf_LIST OPf_WANT_LIST @@ -169,6 +172,9 @@ Deprecated. Use C<GIMME_V> instead. /* Private for OP_LEAVE, OP_LEAVESUB, OP_LEAVESUBLV and OP_LEAVEWRITE */ #define OPpREFCOUNTED 64 /* op_targ carries a refcount */ +/* Private for OP_LEAVE and OP_LEAVELOOP */ +#define OPpLVALUE 128 /* Do not copy return value */ + /* Private for OP_AASSIGN */ #define OPpASSIGN_COMMON 64 /* Left & right have syms in common. */ @@ -199,12 +205,38 @@ Deprecated. Use C<GIMME_V> instead. #define OPpDEREF_HV 64 /* Want ref to HV. */ #define OPpDEREF_SV (32|64) /* Want ref to SV. */ +/* OP_ENTERSUB and OP_RV2CV flags + +Flags are set on entersub and rv2cv in three phases: + parser - the parser passes the flag to the op constructor + check - the check routine called by the op constructor sets the flag + context - application of scalar/ref/lvalue context applies the flag + +In the third stage, an entersub op might turn into an rv2cv op (undef &foo, +\&foo, lock &foo, exists &foo, defined &foo). The two places where that +happens (op_lvalue_flags and doref in op.c) need to make sure the flags do +not conflict. Flags applied in the context phase are only set when there +is no conversion of op type. + + bit entersub flag phase rv2cv flag phase + --- ------------- ----- ---------- ----- + 1 OPpENTERSUB_INARGS context OPpMAY_RETURN_CONSTANT context + 2 HINT_STRICT_REFS check HINT_STRICT_REFS check + 4 OPpENTERSUB_HASTARG check + 8 OPpENTERSUB_AMPER parser + 16 OPpENTERSUB_DB check + 32 OPpDEREF_AV context + 64 OPpDEREF_HV context + 128 OPpLVAL_INTRO context OPpENTERSUB_NOPAREN parser + +*/ + /* OP_ENTERSUB only */ #define OPpENTERSUB_DB 16 /* Debug subroutine. */ #define OPpENTERSUB_HASTARG 4 /* Called from OP tree. */ #define OPpENTERSUB_INARGS 1 /* Lval used as arg to a sub. */ /* used by OPpDEREF (32|64) */ -/* used by HINT_STRICT_SUBS 2 */ +/* used by HINT_STRICT_REFS 2 */ /* Mask for OP_ENTERSUB flags, the absence of which must be propagated in dynamic context */ #define OPpENTERSUB_LVAL_MASK (OPpLVAL_INTRO|OPpENTERSUB_INARGS) @@ -218,6 +250,8 @@ Deprecated. Use C<GIMME_V> instead. #define OPpEARLY_CV 32 /* foo() called before sub foo was parsed */ /* OP_?ELEM only */ #define OPpLVAL_DEFER 16 /* Defer creation of array/hash elem */ + /* OP_RV2[AH]V OP_[AH]SLICE */ +#define OPpSLICEWARNING 4 /* warn about @hash{$scalar} */ /* OP_RV2[SAH]V, OP_GVSV, OP_ENTERITER only */ #define OPpOUR_INTRO 16 /* Variable was in an our() */ /* OP_RV2[AGH]V, OP_PAD[AH]V, OP_[AH]ELEM, OP_[AH]SLICE OP_AV2ARYLEN, @@ -257,7 +291,6 @@ Deprecated. Use C<GIMME_V> instead. #define OPpCONST_STRICT 8 /* bareword subject to strict 'subs' */ #define OPpCONST_ENTERED 16 /* Has been entered as symbol. */ #define OPpCONST_BARE 64 /* Was a bare word (filehandle?). */ -#define OPpCONST_FOLDED 128 /* Result of constant folding */ /* Private for OP_FLIP/FLOP */ #define OPpFLIP_LINENUM 64 /* Range arg potentially a line num. */ @@ -290,9 +323,13 @@ Deprecated. Use C<GIMME_V> instead. #define OPpOPEN_OUT_RAW 64 /* binmode(F,":raw") on output fh */ #define OPpOPEN_OUT_CRLF 128 /* binmode(F,":crlf") on output fh */ -/* Private for OP_EXIT, HUSH also for OP_DIE */ -#define OPpHUSH_VMSISH 64 /* hush DCL exit msg vmsish mode*/ -#define OPpEXIT_VMSISH 128 /* exit(0) vs. exit(1) vmsish mode*/ +/* Private for COPs */ +#define OPpHUSH_VMSISH 32 /* hush DCL exit msg vmsish mode*/ +/* Note: Used for NATIVE_HINTS (shifted from the values in PL_hints), + currently defined by vms/vmsish.h: + 64 + 128 + */ /* Private for OP_FTXXX */ #define OPpFT_ACCESS 2 /* use filetest 'access' */ @@ -324,6 +361,9 @@ Deprecated. Use C<GIMME_V> instead. /* Private for OP_(LAST|REDO|NEXT|GOTO|DUMP) */ #define OPpPV_IS_UTF8 128 /* label is in UTF8 */ +/* Private for OP_SPLIT */ +#define OPpSPLIT_IMPLIM 128 /* implicit limit */ + struct op { BASEOP }; @@ -356,7 +396,7 @@ struct pmop { OP * op_first; OP * op_last; #ifdef USE_ITHREADS - IV op_pmoffset; + PADOFFSET op_pmoffset; #else REGEXP * op_pmregexp; /* compiled expression */ #endif @@ -655,7 +695,7 @@ struct loop { #define PERL_LOADMOD_NOIMPORT 0x2 /* use Module () */ #define PERL_LOADMOD_IMPORT_OPS 0x4 /* use Module (...) */ -#if defined(PERL_IN_PERLY_C) || defined(PERL_IN_OP_C) +#if defined(PERL_IN_PERLY_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_TOKE_C) #define ref(o, type) doref(o, type, TRUE) #endif @@ -664,9 +704,9 @@ struct loop { =for apidoc Am|OP*|LINKLIST|OP *o Given the root of an optree, link the tree in execution order using the -C<op_next> pointers and return the first op executed. If this has +C<op_next> pointers and return the first op executed. If this has already been done, it will not be redone, and C<< o->op_next >> will be -returned. If C<< o->op_next >> is not already set, I<o> should be at +returned. If C<< o->op_next >> is not already set, I<o> should be at least an C<UNOP>. =cut @@ -765,29 +805,29 @@ struct block_hooks { Return the BHK's flags. =for apidoc mx|void *|BhkENTRY|BHK *hk|which -Return an entry from the BHK structure. I<which> is a preprocessor token -indicating which entry to return. If the appropriate flag is not set -this will return NULL. The type of the return value depends on which +Return an entry from the BHK structure. I<which> is a preprocessor token +indicating which entry to return. If the appropriate flag is not set +this will return NULL. The type of the return value depends on which entry you ask for. =for apidoc Amx|void|BhkENTRY_set|BHK *hk|which|void *ptr Set an entry in the BHK structure, and set the flags to indicate it is -valid. I<which> is a preprocessing token indicating which entry to set. +valid. I<which> is a preprocessing token indicating which entry to set. The type of I<ptr> depends on the entry. =for apidoc Amx|void|BhkDISABLE|BHK *hk|which Temporarily disable an entry in this BHK structure, by clearing the -appropriate flag. I<which> is a preprocessor token indicating which +appropriate flag. I<which> is a preprocessor token indicating which entry to disable. =for apidoc Amx|void|BhkENABLE|BHK *hk|which Re-enable an entry in this BHK structure, by setting the appropriate -flag. I<which> is a preprocessor token indicating which entry to enable. +flag. I<which> is a preprocessor token indicating which entry to enable. This will assert (under -DDEBUGGING) if the entry doesn't contain a valid pointer. =for apidoc mx|void|CALL_BLOCK_HOOKS|which|arg -Call all the registered block hooks for type I<which>. I<which> is a +Call all the registered block hooks for type I<which>. I<which> is a preprocessing token; the type of I<arg> depends on I<which>. =cut @@ -823,8 +863,8 @@ preprocessing token; the type of I<arg> depends on I<which>. #define CALL_BLOCK_HOOKS(which, arg) \ STMT_START { \ if (PL_blockhooks) { \ - I32 i; \ - for (i = av_len(PL_blockhooks); i >= 0; i--) { \ + SSize_t i; \ + for (i = av_tindex(PL_blockhooks); i >= 0; i--) { \ SV *sv = AvARRAY(PL_blockhooks)[i]; \ BHK *hk; \ \ @@ -858,14 +898,23 @@ preprocessing token; the type of I<arg> depends on I<which>. Return the XOP's flags. =for apidoc Am||XopENTRY|XOP *xop|which -Return a member of the XOP structure. I<which> is a cpp token indicating -which entry to return. If the member is not set this will return a -default value. The return type depends on I<which>. +Return a member of the XOP structure. I<which> is a cpp token +indicating which entry to return. If the member is not set +this will return a default value. The return type depends +on I<which>. This macro evaluates its arguments more than +once. If you are using C<Perl_custom_op_xop> to retreive a +C<XOP *> from a C<OP *>, use the more efficient L</XopENTRYCUSTOM> instead. + +=for apidoc Am||XopENTRYCUSTOM|const OP *o|which +Exactly like C<XopENTRY(XopENTRY(Perl_custom_op_xop(aTHX_ o), which)> but more +efficient. The I<which> parameter is identical to L</XopENTRY>. =for apidoc Am|void|XopENTRY_set|XOP *xop|which|value -Set a member of the XOP structure. I<which> is a cpp token indicating -which entry to set. See L<perlguts/"Custom Operators"> for details about -the available members and how they are used. +Set a member of the XOP structure. I<which> is a cpp token +indicating which entry to set. See L<perlguts/"Custom Operators"> +for details about the available members and how +they are used. This macro evaluates its argument +more than once. =for apidoc Am|void|XopDISABLE|XOP *xop|which Temporarily disable a member of the XOP, by clearing the appropriate flag. @@ -884,6 +933,17 @@ struct custom_op { void (*xop_peep)(pTHX_ OP *o, OP *oldop); }; +/* return value of Perl_custom_op_get_field, similar to void * then casting but + the U32 doesn't need truncation on 64 bit platforms in the caller, also + for easier macro writing */ +typedef union { + const char *xop_name; + const char *xop_desc; + U32 xop_class; + void (*xop_peep)(pTHX_ OP *o, OP *oldop); + XOP *xop_ptr; +} XOPRETANY; + #define XopFLAGS(xop) ((xop)->xop_flags) #define XOPf_xop_name 0x01 @@ -891,6 +951,15 @@ struct custom_op { #define XOPf_xop_class 0x04 #define XOPf_xop_peep 0x08 +/* used by Perl_custom_op_get_field for option checking */ +typedef enum { + XOPe_xop_ptr = 0, /* just get the XOP *, don't look inside it */ + XOPe_xop_name = XOPf_xop_name, + XOPe_xop_desc = XOPf_xop_desc, + XOPe_xop_class = XOPf_xop_class, + XOPe_xop_peep = XOPf_xop_peep +} xop_flags_enum; + #define XOPd_xop_name PL_op_name[OP_CUSTOM] #define XOPd_xop_desc PL_op_desc[OP_CUSTOM] #define XOPd_xop_class OA_BASEOP @@ -905,6 +974,9 @@ struct custom_op { #define XopENTRY(xop, which) \ ((XopFLAGS(xop) & XOPf_ ## which) ? (xop)->which : XOPd_ ## which) +#define XopENTRYCUSTOM(o, which) \ + (Perl_custom_op_get_field(aTHX_ o, XOPe_ ## which).which) + #define XopDISABLE(xop, which) ((xop)->xop_flags &= ~XOPf_ ## which) #define XopENABLE(xop, which) \ STMT_START { \ @@ -912,11 +984,14 @@ struct custom_op { assert(XopENTRY(xop, which)); \ } STMT_END +#define Perl_custom_op_xop(x) \ + (Perl_custom_op_get_field(x, XOPe_xop_ptr).xop_ptr) + /* =head1 Optree Manipulation Functions =for apidoc Am|const char *|OP_NAME|OP *o -Return the name of the provided OP. For core ops this looks up the name +Return the name of the provided OP. For core ops this looks up the name from the op_type; for custom ops from the op_ppaddr. =for apidoc Am|const char *|OP_DESC|OP *o @@ -924,26 +999,68 @@ Return a short description of the provided OP. =for apidoc Am|U32|OP_CLASS|OP *o Return the class of the provided OP: that is, which of the *OP -structures it uses. For core ops this currently gets the information out +structures it uses. For core ops this currently gets the information out of PL_opargs, which does not always accurately reflect the type used. For custom ops the type is returned from the registration, and it is up -to the registree to ensure it is accurate. The value returned will be +to the registree to ensure it is accurate. The value returned will be one of the OA_* constants from op.h. +=for apidoc Am|bool|OP_TYPE_IS|OP *o, Optype type +Returns true if the given OP is not a NULL pointer +and if it is of the given type. + +The negation of this macro, C<OP_TYPE_ISNT> is also available +as well as C<OP_TYPE_IS_NN> and C<OP_TYPE_ISNT_NN> which elide +the NULL pointer check. + +=for apidoc Am|bool|OP_TYPE_IS_OR_WAS|OP *o, Optype type +Returns true if the given OP is not a NULL pointer and +if it is of the given type or used to be before being +replaced by an OP of type OP_NULL. + +The negation of this macro, C<OP_TYPE_ISNT_AND_WASNT> +is also available as well as C<OP_TYPE_IS_OR_WAS_NN> +and C<OP_TYPE_ISNT_AND_WASNT_NN> which elide +the NULL pointer check. + =cut */ #define OP_NAME(o) ((o)->op_type == OP_CUSTOM \ - ? XopENTRY(Perl_custom_op_xop(aTHX_ o), xop_name) \ + ? XopENTRYCUSTOM(o, xop_name) \ : PL_op_name[(o)->op_type]) #define OP_DESC(o) ((o)->op_type == OP_CUSTOM \ - ? XopENTRY(Perl_custom_op_xop(aTHX_ o), xop_desc) \ + ? XopENTRYCUSTOM(o, xop_desc) \ : PL_op_desc[(o)->op_type]) #define OP_CLASS(o) ((o)->op_type == OP_CUSTOM \ - ? XopENTRY(Perl_custom_op_xop(aTHX_ o), xop_class) \ + ? XopENTRYCUSTOM(o, xop_class) \ : (PL_opargs[(o)->op_type] & OA_CLASS_MASK)) -#define newSUB(f, o, p, b) Perl_newATTRSUB(aTHX_ (f), (o), (p), NULL, (b)) +#define OP_TYPE_IS(o, type) ((o) && (o)->op_type == (type)) +#define OP_TYPE_IS_NN(o, type) ((o)->op_type == (type)) +#define OP_TYPE_ISNT(o, type) ((o) && (o)->op_type != (type)) +#define OP_TYPE_ISNT_NN(o, type) ((o)->op_type != (type)) + +#define OP_TYPE_IS_OR_WAS_NN(o, type) \ + ( ((o)->op_type == OP_NULL \ + ? (o)->op_targ \ + : (o)->op_type) \ + == (type) ) + +#define OP_TYPE_IS_OR_WAS(o, type) \ + ( (o) && OP_TYPE_IS_OR_WAS_NN(o, type) ) + +#define OP_TYPE_ISNT_AND_WASNT_NN(o, type) \ + ( ((o)->op_type == OP_NULL \ + ? (o)->op_targ \ + : (o)->op_type) \ + != (type) ) + +#define OP_TYPE_ISNT_AND_WASNT(o, type) \ + ( (o) && OP_TYPE_ISNT_AND_WASNT_NN(o, type) ) + +#define newATTRSUB(f, o, p, a, b) Perl_newATTRSUB_x(aTHX_ f, o, p, a, b, FALSE) +#define newSUB(f, o, p, b) newATTRSUB((f), (o), (p), NULL, (b)) #ifdef PERL_MAD # define MAD_NULL 1 diff --git a/Master/tlpkg/tlperl/lib/CORE/opcode.h b/Master/tlpkg/tlperl/lib/CORE/opcode.h index 540dc0ba974..fbc3fe12ee8 100644 --- a/Master/tlpkg/tlperl/lib/CORE/opcode.h +++ b/Master/tlpkg/tlperl/lib/CORE/opcode.h @@ -280,6 +280,7 @@ EXTCONST char* const PL_op_name[] = { "aelemfast_lex", "aelem", "aslice", + "kvaslice", "aeach", "akeys", "avalues", @@ -291,6 +292,7 @@ EXTCONST char* const PL_op_name[] = { "rv2hv", "helem", "hslice", + "kvhslice", "unpack", "pack", "split", @@ -665,6 +667,7 @@ EXTCONST char* const PL_op_desc[] = { "constant lexical array element", "array element", "array slice", + "index/value array slice", "each on array", "keys on array", "values on array", @@ -676,6 +679,7 @@ EXTCONST char* const PL_op_desc[] = { "hash dereference", "hash element", "hash slice", + "key/value hash slice", "unpack", "pack", "split", @@ -1064,6 +1068,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ Perl_pp_aelemfast_lex, /* implemented by Perl_pp_aelemfast */ Perl_pp_aelem, Perl_pp_aslice, + Perl_pp_kvaslice, Perl_pp_aeach, Perl_pp_akeys, Perl_pp_avalues, /* implemented by Perl_pp_akeys */ @@ -1075,6 +1080,7 @@ EXT Perl_ppaddr_t PL_ppaddr[] /* or perlvars.h */ Perl_pp_rv2hv, /* implemented by Perl_pp_rv2av */ Perl_pp_helem, Perl_pp_hslice, + Perl_pp_kvhslice, Perl_pp_unpack, Perl_pp_pack, Perl_pp_split, @@ -1351,7 +1357,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ Perl_ck_null, /* srefgen */ Perl_ck_fun, /* ref */ Perl_ck_fun, /* bless */ - Perl_ck_open, /* backtick */ + Perl_ck_backtick, /* backtick */ Perl_ck_glob, /* glob */ Perl_ck_readline, /* readline */ Perl_ck_null, /* rcatline */ @@ -1459,6 +1465,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ Perl_ck_null, /* aelemfast_lex */ Perl_ck_null, /* aelem */ Perl_ck_null, /* aslice */ + Perl_ck_null, /* kvaslice */ Perl_ck_each, /* aeach */ Perl_ck_each, /* akeys */ Perl_ck_each, /* avalues */ @@ -1470,6 +1477,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ Perl_ck_rvconst, /* rv2hv */ Perl_ck_null, /* helem */ Perl_ck_null, /* hslice */ + Perl_ck_null, /* kvhslice */ Perl_ck_fun, /* unpack */ Perl_ck_fun, /* pack */ Perl_ck_split, /* split */ @@ -1506,7 +1514,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ Perl_ck_null, /* leavesublv */ Perl_ck_fun, /* caller */ Perl_ck_fun, /* warn */ - Perl_ck_die, /* die */ + Perl_ck_fun, /* die */ Perl_ck_fun, /* reset */ Perl_ck_null, /* lineseq */ Perl_ck_null, /* nextstate */ @@ -1525,7 +1533,7 @@ EXT Perl_check_t PL_check[] /* or perlvars.h */ Perl_ck_null, /* redo */ Perl_ck_null, /* dump */ Perl_ck_null, /* goto */ - Perl_ck_exit, /* exit */ + Perl_ck_fun, /* exit */ Perl_ck_null, /* method_named */ Perl_ck_null, /* entergiven */ Perl_ck_null, /* leavegiven */ @@ -1848,6 +1856,7 @@ EXTCONST U32 PL_opargs[] = { 0x00013040, /* aelemfast_lex */ 0x00013204, /* aelem */ 0x00023401, /* aslice */ + 0x00023401, /* kvaslice */ 0x00003b00, /* aeach */ 0x00003b08, /* akeys */ 0x00003b08, /* avalues */ @@ -1856,9 +1865,10 @@ EXTCONST U32 PL_opargs[] = { 0x00004b08, /* keys */ 0x00001b00, /* delete */ 0x00001b04, /* exists */ - 0x00000148, /* rv2hv */ + 0x00000140, /* rv2hv */ 0x00014204, /* helem */ 0x00024401, /* hslice */ + 0x00024401, /* kvhslice */ 0x00091480, /* unpack */ 0x0002140f, /* pack */ 0x00111408, /* split */ diff --git a/Master/tlpkg/tlperl/lib/CORE/opnames.h b/Master/tlpkg/tlperl/lib/CORE/opnames.h index 5502ba4d15d..68ce927cd9e 100644 --- a/Master/tlpkg/tlperl/lib/CORE/opnames.h +++ b/Master/tlpkg/tlperl/lib/CORE/opnames.h @@ -146,255 +146,257 @@ typedef enum opcode { OP_AELEMFAST_LEX = 129, OP_AELEM = 130, OP_ASLICE = 131, - OP_AEACH = 132, - OP_AKEYS = 133, - OP_AVALUES = 134, - OP_EACH = 135, - OP_VALUES = 136, - OP_KEYS = 137, - OP_DELETE = 138, - OP_EXISTS = 139, - OP_RV2HV = 140, - OP_HELEM = 141, - OP_HSLICE = 142, - OP_UNPACK = 143, - OP_PACK = 144, - OP_SPLIT = 145, - OP_JOIN = 146, - OP_LIST = 147, - OP_LSLICE = 148, - OP_ANONLIST = 149, - OP_ANONHASH = 150, - OP_SPLICE = 151, - OP_PUSH = 152, - OP_POP = 153, - OP_SHIFT = 154, - OP_UNSHIFT = 155, - OP_SORT = 156, - OP_REVERSE = 157, - OP_GREPSTART = 158, - OP_GREPWHILE = 159, - OP_MAPSTART = 160, - OP_MAPWHILE = 161, - OP_RANGE = 162, - OP_FLIP = 163, - OP_FLOP = 164, - OP_AND = 165, - OP_OR = 166, - OP_XOR = 167, - OP_DOR = 168, - OP_COND_EXPR = 169, - OP_ANDASSIGN = 170, - OP_ORASSIGN = 171, - OP_DORASSIGN = 172, - OP_METHOD = 173, - OP_ENTERSUB = 174, - OP_LEAVESUB = 175, - OP_LEAVESUBLV = 176, - OP_CALLER = 177, - OP_WARN = 178, - OP_DIE = 179, - OP_RESET = 180, - OP_LINESEQ = 181, - OP_NEXTSTATE = 182, - OP_DBSTATE = 183, - OP_UNSTACK = 184, - OP_ENTER = 185, - OP_LEAVE = 186, - OP_SCOPE = 187, - OP_ENTERITER = 188, - OP_ITER = 189, - OP_ENTERLOOP = 190, - OP_LEAVELOOP = 191, - OP_RETURN = 192, - OP_LAST = 193, - OP_NEXT = 194, - OP_REDO = 195, - OP_DUMP = 196, - OP_GOTO = 197, - OP_EXIT = 198, - OP_METHOD_NAMED = 199, - OP_ENTERGIVEN = 200, - OP_LEAVEGIVEN = 201, - OP_ENTERWHEN = 202, - OP_LEAVEWHEN = 203, - OP_BREAK = 204, - OP_CONTINUE = 205, - OP_OPEN = 206, - OP_CLOSE = 207, - OP_PIPE_OP = 208, - OP_FILENO = 209, - OP_UMASK = 210, - OP_BINMODE = 211, - OP_TIE = 212, - OP_UNTIE = 213, - OP_TIED = 214, - OP_DBMOPEN = 215, - OP_DBMCLOSE = 216, - OP_SSELECT = 217, - OP_SELECT = 218, - OP_GETC = 219, - OP_READ = 220, - OP_ENTERWRITE = 221, - OP_LEAVEWRITE = 222, - OP_PRTF = 223, - OP_PRINT = 224, - OP_SAY = 225, - OP_SYSOPEN = 226, - OP_SYSSEEK = 227, - OP_SYSREAD = 228, - OP_SYSWRITE = 229, - OP_EOF = 230, - OP_TELL = 231, - OP_SEEK = 232, - OP_TRUNCATE = 233, - OP_FCNTL = 234, - OP_IOCTL = 235, - OP_FLOCK = 236, - OP_SEND = 237, - OP_RECV = 238, - OP_SOCKET = 239, - OP_SOCKPAIR = 240, - OP_BIND = 241, - OP_CONNECT = 242, - OP_LISTEN = 243, - OP_ACCEPT = 244, - OP_SHUTDOWN = 245, - OP_GSOCKOPT = 246, - OP_SSOCKOPT = 247, - OP_GETSOCKNAME = 248, - OP_GETPEERNAME = 249, - OP_LSTAT = 250, - OP_STAT = 251, - OP_FTRREAD = 252, - OP_FTRWRITE = 253, - OP_FTREXEC = 254, - OP_FTEREAD = 255, - OP_FTEWRITE = 256, - OP_FTEEXEC = 257, - OP_FTIS = 258, - OP_FTSIZE = 259, - OP_FTMTIME = 260, - OP_FTATIME = 261, - OP_FTCTIME = 262, - OP_FTROWNED = 263, - OP_FTEOWNED = 264, - OP_FTZERO = 265, - OP_FTSOCK = 266, - OP_FTCHR = 267, - OP_FTBLK = 268, - OP_FTFILE = 269, - OP_FTDIR = 270, - OP_FTPIPE = 271, - OP_FTSUID = 272, - OP_FTSGID = 273, - OP_FTSVTX = 274, - OP_FTLINK = 275, - OP_FTTTY = 276, - OP_FTTEXT = 277, - OP_FTBINARY = 278, - OP_CHDIR = 279, - OP_CHOWN = 280, - OP_CHROOT = 281, - OP_UNLINK = 282, - OP_CHMOD = 283, - OP_UTIME = 284, - OP_RENAME = 285, - OP_LINK = 286, - OP_SYMLINK = 287, - OP_READLINK = 288, - OP_MKDIR = 289, - OP_RMDIR = 290, - OP_OPEN_DIR = 291, - OP_READDIR = 292, - OP_TELLDIR = 293, - OP_SEEKDIR = 294, - OP_REWINDDIR = 295, - OP_CLOSEDIR = 296, - OP_FORK = 297, - OP_WAIT = 298, - OP_WAITPID = 299, - OP_SYSTEM = 300, - OP_EXEC = 301, - OP_KILL = 302, - OP_GETPPID = 303, - OP_GETPGRP = 304, - OP_SETPGRP = 305, - OP_GETPRIORITY = 306, - OP_SETPRIORITY = 307, - OP_TIME = 308, - OP_TMS = 309, - OP_LOCALTIME = 310, - OP_GMTIME = 311, - OP_ALARM = 312, - OP_SLEEP = 313, - OP_SHMGET = 314, - OP_SHMCTL = 315, - OP_SHMREAD = 316, - OP_SHMWRITE = 317, - OP_MSGGET = 318, - OP_MSGCTL = 319, - OP_MSGSND = 320, - OP_MSGRCV = 321, - OP_SEMOP = 322, - OP_SEMGET = 323, - OP_SEMCTL = 324, - OP_REQUIRE = 325, - OP_DOFILE = 326, - OP_HINTSEVAL = 327, - OP_ENTEREVAL = 328, - OP_LEAVEEVAL = 329, - OP_ENTERTRY = 330, - OP_LEAVETRY = 331, - OP_GHBYNAME = 332, - OP_GHBYADDR = 333, - OP_GHOSTENT = 334, - OP_GNBYNAME = 335, - OP_GNBYADDR = 336, - OP_GNETENT = 337, - OP_GPBYNAME = 338, - OP_GPBYNUMBER = 339, - OP_GPROTOENT = 340, - OP_GSBYNAME = 341, - OP_GSBYPORT = 342, - OP_GSERVENT = 343, - OP_SHOSTENT = 344, - OP_SNETENT = 345, - OP_SPROTOENT = 346, - OP_SSERVENT = 347, - OP_EHOSTENT = 348, - OP_ENETENT = 349, - OP_EPROTOENT = 350, - OP_ESERVENT = 351, - OP_GPWNAM = 352, - OP_GPWUID = 353, - OP_GPWENT = 354, - OP_SPWENT = 355, - OP_EPWENT = 356, - OP_GGRNAM = 357, - OP_GGRGID = 358, - OP_GGRENT = 359, - OP_SGRENT = 360, - OP_EGRENT = 361, - OP_GETLOGIN = 362, - OP_SYSCALL = 363, - OP_LOCK = 364, - OP_ONCE = 365, - OP_CUSTOM = 366, - OP_REACH = 367, - OP_RKEYS = 368, - OP_RVALUES = 369, - OP_COREARGS = 370, - OP_RUNCV = 371, - OP_FC = 372, - OP_PADCV = 373, - OP_INTROCV = 374, - OP_CLONECV = 375, - OP_PADRANGE = 376, + OP_KVASLICE = 132, + OP_AEACH = 133, + OP_AKEYS = 134, + OP_AVALUES = 135, + OP_EACH = 136, + OP_VALUES = 137, + OP_KEYS = 138, + OP_DELETE = 139, + OP_EXISTS = 140, + OP_RV2HV = 141, + OP_HELEM = 142, + OP_HSLICE = 143, + OP_KVHSLICE = 144, + OP_UNPACK = 145, + OP_PACK = 146, + OP_SPLIT = 147, + OP_JOIN = 148, + OP_LIST = 149, + OP_LSLICE = 150, + OP_ANONLIST = 151, + OP_ANONHASH = 152, + OP_SPLICE = 153, + OP_PUSH = 154, + OP_POP = 155, + OP_SHIFT = 156, + OP_UNSHIFT = 157, + OP_SORT = 158, + OP_REVERSE = 159, + OP_GREPSTART = 160, + OP_GREPWHILE = 161, + OP_MAPSTART = 162, + OP_MAPWHILE = 163, + OP_RANGE = 164, + OP_FLIP = 165, + OP_FLOP = 166, + OP_AND = 167, + OP_OR = 168, + OP_XOR = 169, + OP_DOR = 170, + OP_COND_EXPR = 171, + OP_ANDASSIGN = 172, + OP_ORASSIGN = 173, + OP_DORASSIGN = 174, + OP_METHOD = 175, + OP_ENTERSUB = 176, + OP_LEAVESUB = 177, + OP_LEAVESUBLV = 178, + OP_CALLER = 179, + OP_WARN = 180, + OP_DIE = 181, + OP_RESET = 182, + OP_LINESEQ = 183, + OP_NEXTSTATE = 184, + OP_DBSTATE = 185, + OP_UNSTACK = 186, + OP_ENTER = 187, + OP_LEAVE = 188, + OP_SCOPE = 189, + OP_ENTERITER = 190, + OP_ITER = 191, + OP_ENTERLOOP = 192, + OP_LEAVELOOP = 193, + OP_RETURN = 194, + OP_LAST = 195, + OP_NEXT = 196, + OP_REDO = 197, + OP_DUMP = 198, + OP_GOTO = 199, + OP_EXIT = 200, + OP_METHOD_NAMED = 201, + OP_ENTERGIVEN = 202, + OP_LEAVEGIVEN = 203, + OP_ENTERWHEN = 204, + OP_LEAVEWHEN = 205, + OP_BREAK = 206, + OP_CONTINUE = 207, + OP_OPEN = 208, + OP_CLOSE = 209, + OP_PIPE_OP = 210, + OP_FILENO = 211, + OP_UMASK = 212, + OP_BINMODE = 213, + OP_TIE = 214, + OP_UNTIE = 215, + OP_TIED = 216, + OP_DBMOPEN = 217, + OP_DBMCLOSE = 218, + OP_SSELECT = 219, + OP_SELECT = 220, + OP_GETC = 221, + OP_READ = 222, + OP_ENTERWRITE = 223, + OP_LEAVEWRITE = 224, + OP_PRTF = 225, + OP_PRINT = 226, + OP_SAY = 227, + OP_SYSOPEN = 228, + OP_SYSSEEK = 229, + OP_SYSREAD = 230, + OP_SYSWRITE = 231, + OP_EOF = 232, + OP_TELL = 233, + OP_SEEK = 234, + OP_TRUNCATE = 235, + OP_FCNTL = 236, + OP_IOCTL = 237, + OP_FLOCK = 238, + OP_SEND = 239, + OP_RECV = 240, + OP_SOCKET = 241, + OP_SOCKPAIR = 242, + OP_BIND = 243, + OP_CONNECT = 244, + OP_LISTEN = 245, + OP_ACCEPT = 246, + OP_SHUTDOWN = 247, + OP_GSOCKOPT = 248, + OP_SSOCKOPT = 249, + OP_GETSOCKNAME = 250, + OP_GETPEERNAME = 251, + OP_LSTAT = 252, + OP_STAT = 253, + OP_FTRREAD = 254, + OP_FTRWRITE = 255, + OP_FTREXEC = 256, + OP_FTEREAD = 257, + OP_FTEWRITE = 258, + OP_FTEEXEC = 259, + OP_FTIS = 260, + OP_FTSIZE = 261, + OP_FTMTIME = 262, + OP_FTATIME = 263, + OP_FTCTIME = 264, + OP_FTROWNED = 265, + OP_FTEOWNED = 266, + OP_FTZERO = 267, + OP_FTSOCK = 268, + OP_FTCHR = 269, + OP_FTBLK = 270, + OP_FTFILE = 271, + OP_FTDIR = 272, + OP_FTPIPE = 273, + OP_FTSUID = 274, + OP_FTSGID = 275, + OP_FTSVTX = 276, + OP_FTLINK = 277, + OP_FTTTY = 278, + OP_FTTEXT = 279, + OP_FTBINARY = 280, + OP_CHDIR = 281, + OP_CHOWN = 282, + OP_CHROOT = 283, + OP_UNLINK = 284, + OP_CHMOD = 285, + OP_UTIME = 286, + OP_RENAME = 287, + OP_LINK = 288, + OP_SYMLINK = 289, + OP_READLINK = 290, + OP_MKDIR = 291, + OP_RMDIR = 292, + OP_OPEN_DIR = 293, + OP_READDIR = 294, + OP_TELLDIR = 295, + OP_SEEKDIR = 296, + OP_REWINDDIR = 297, + OP_CLOSEDIR = 298, + OP_FORK = 299, + OP_WAIT = 300, + OP_WAITPID = 301, + OP_SYSTEM = 302, + OP_EXEC = 303, + OP_KILL = 304, + OP_GETPPID = 305, + OP_GETPGRP = 306, + OP_SETPGRP = 307, + OP_GETPRIORITY = 308, + OP_SETPRIORITY = 309, + OP_TIME = 310, + OP_TMS = 311, + OP_LOCALTIME = 312, + OP_GMTIME = 313, + OP_ALARM = 314, + OP_SLEEP = 315, + OP_SHMGET = 316, + OP_SHMCTL = 317, + OP_SHMREAD = 318, + OP_SHMWRITE = 319, + OP_MSGGET = 320, + OP_MSGCTL = 321, + OP_MSGSND = 322, + OP_MSGRCV = 323, + OP_SEMOP = 324, + OP_SEMGET = 325, + OP_SEMCTL = 326, + OP_REQUIRE = 327, + OP_DOFILE = 328, + OP_HINTSEVAL = 329, + OP_ENTEREVAL = 330, + OP_LEAVEEVAL = 331, + OP_ENTERTRY = 332, + OP_LEAVETRY = 333, + OP_GHBYNAME = 334, + OP_GHBYADDR = 335, + OP_GHOSTENT = 336, + OP_GNBYNAME = 337, + OP_GNBYADDR = 338, + OP_GNETENT = 339, + OP_GPBYNAME = 340, + OP_GPBYNUMBER = 341, + OP_GPROTOENT = 342, + OP_GSBYNAME = 343, + OP_GSBYPORT = 344, + OP_GSERVENT = 345, + OP_SHOSTENT = 346, + OP_SNETENT = 347, + OP_SPROTOENT = 348, + OP_SSERVENT = 349, + OP_EHOSTENT = 350, + OP_ENETENT = 351, + OP_EPROTOENT = 352, + OP_ESERVENT = 353, + OP_GPWNAM = 354, + OP_GPWUID = 355, + OP_GPWENT = 356, + OP_SPWENT = 357, + OP_EPWENT = 358, + OP_GGRNAM = 359, + OP_GGRGID = 360, + OP_GGRENT = 361, + OP_SGRENT = 362, + OP_EGRENT = 363, + OP_GETLOGIN = 364, + OP_SYSCALL = 365, + OP_LOCK = 366, + OP_ONCE = 367, + OP_CUSTOM = 368, + OP_REACH = 369, + OP_RKEYS = 370, + OP_RVALUES = 371, + OP_COREARGS = 372, + OP_RUNCV = 373, + OP_FC = 374, + OP_PADCV = 375, + OP_INTROCV = 376, + OP_CLONECV = 377, + OP_PADRANGE = 378, OP_max } opcode; -#define MAXO 377 +#define MAXO 379 #define OP_FREED MAXO /* the OP_IS_* macros are optimized to a simple range check because diff --git a/Master/tlpkg/tlperl/lib/CORE/pad.h b/Master/tlpkg/tlperl/lib/CORE/pad.h index 26e183ccd83..90517c65df8 100644 --- a/Master/tlpkg/tlperl/lib/CORE/pad.h +++ b/Master/tlpkg/tlperl/lib/CORE/pad.h @@ -143,14 +143,14 @@ typedef enum { # define ASSERT_CURPAD_LEGAL(label) \ pad_peg(label); \ if (PL_comppad ? (AvARRAY(PL_comppad) != PL_curpad) : (PL_curpad != 0)) \ - Perl_croak(aTHX_ "panic: illegal pad in %s: 0x%"UVxf"[0x%"UVxf"]",\ + Perl_croak(aTHX_ "panic: illegal pad in %s: 0x%" UVxf "[0x%" UVxf "]",\ label, PTR2UV(PL_comppad), PTR2UV(PL_curpad)); # define ASSERT_CURPAD_ACTIVE(label) \ pad_peg(label); \ if (!PL_comppad || (AvARRAY(PL_comppad) != PL_curpad)) \ - Perl_croak(aTHX_ "panic: invalid pad in %s: 0x%"UVxf"[0x%"UVxf"]",\ + Perl_croak(aTHX_ "panic: invalid pad in %s: 0x%" UVxf "[0x%" UVxf "]",\ label, PTR2UV(PL_comppad), PTR2UV(PL_curpad)); #else # define ASSERT_CURPAD_LEGAL(label) @@ -168,7 +168,8 @@ Save a pad slot (used to restore after an iteration) XXX DAPM it would make more sense to make the arg a PADOFFSET =for apidoc m|void|SAVECLEARSV |SV **svp -Clear the pointed to pad value on scope exit. (i.e. the runtime action of 'my') +Clear the pointed to pad value on scope exit. (i.e. the runtime action of +'my') =for apidoc m|void|SAVECOMPPAD save PL_comppad and PL_curpad @@ -179,7 +180,9 @@ The C array of a padlist, containing the pads. Only subscript it with numbers >= 1, as the 0th entry is not guaranteed to remain usable. =for apidoc Amx|SSize_t|PadlistMAX|PADLIST padlist -The index of the last pad in the padlist. +The index of the last allocated space in the padlist. Note that the last +pad may be in an earlier slot. Any entries following it will be NULL in +that case. =for apidoc Amx|PADNAMELIST *|PadlistNAMES|PADLIST padlist The names associated with pad entries. @@ -239,7 +242,7 @@ for C<my Foo $bar>. =for apidoc m|SV *|PAD_SETSV |PADOFFSET po|SV* sv Set the slot at offset C<po> in the current pad to C<sv> -=for apidoc m|void|PAD_SV |PADOFFSET po +=for apidoc m|SV *|PAD_SV |PADOFFSET po Get the value at offset C<po> in the current pad =for apidoc m|SV *|PAD_SVl |PADOFFSET po @@ -253,7 +256,7 @@ Get the value from slot C<po> in the base (DEPTH=1) pad of a padlist =for apidoc m|void|PAD_SET_CUR |PADLIST padlist|I32 n Set the current pad to be pad C<n> in the padlist, saving -the previous current pad. NB currently this macro expands to a string too +the previous current pad. NB currently this macro expands to a string too long for some compilers, so it's best to replace it with SAVECOMPPAD(); @@ -285,12 +288,14 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL() #define PadnamelistARRAY(pnl) AvARRAY(pnl) #define PadnamelistMAX(pnl) AvFILLp(pnl) +#define PadnamelistMAXNAMED(pnl) \ + ((XPVAV*) SvANY(pnl))->xmg_u.xmg_hash_index #define PadARRAY(pad) AvARRAY(pad) #define PadMAX(pad) AvFILLp(pad) #define PadnamePV(pn) (SvPOKp(pn) ? SvPVX(pn) : NULL) -#define PadnameLEN(pn) SvCUR(pn) +#define PadnameLEN(pn) ((pn) == &PL_sv_undef ? 0 : SvCUR(pn)) #define PadnameUTF8(pn) !!SvUTF8(pn) #define PadnameSV(pn) pn #define PadnameIsOUR(pn) !!SvPAD_OUR(pn) @@ -320,7 +325,7 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL() PL_comppad = (PAD*) (PadlistARRAY(padlist)[nth]); \ PL_curpad = AvARRAY(PL_comppad); \ DEBUG_Xv(PerlIO_printf(Perl_debug_log, \ - "Pad 0x%"UVxf"[0x%"UVxf"] set_cur depth=%d\n", \ + "Pad 0x%" UVxf "[0x%" UVxf "] set_cur depth=%d\n", \ PTR2UV(PL_comppad), PTR2UV(PL_curpad), (int)(nth))); @@ -338,7 +343,7 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL() PL_comppad = (npad); \ PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \ DEBUG_Xv(PerlIO_printf(Perl_debug_log, \ - "Pad 0x%"UVxf"[0x%"UVxf"] save_local\n", \ + "Pad 0x%" UVxf "[0x%" UVxf "] save_local\n", \ PTR2UV(PL_comppad), PTR2UV(PL_curpad))); #define PAD_RESTORE_LOCAL(opad) \ @@ -346,7 +351,7 @@ Restore the old pad saved into the local variable opad by PAD_SAVE_LOCAL() PL_comppad = opad; \ PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \ DEBUG_Xv(PerlIO_printf(Perl_debug_log, \ - "Pad 0x%"UVxf"[0x%"UVxf"] restore_local\n", \ + "Pad 0x%" UVxf "[0x%" UVxf "] restore_local\n", \ PTR2UV(PL_comppad), PTR2UV(PL_curpad))); @@ -368,15 +373,15 @@ context block structure (can be used as an lvalue). /* =for apidoc m|U32|PAD_COMPNAME_FLAGS|PADOFFSET po Return the flags for the current compiling pad name -at offset C<po>. Assumes a valid slot entry. +at offset C<po>. Assumes a valid slot entry. =for apidoc m|char *|PAD_COMPNAME_PV|PADOFFSET po Return the name of the current compiling pad name -at offset C<po>. Assumes a valid slot entry. +at offset C<po>. Assumes a valid slot entry. =for apidoc m|HV *|PAD_COMPNAME_TYPE|PADOFFSET po Return the type (stash) of the current compiling pad name at offset -C<po>. Must be a valid name. Returns null if not typed. +C<po>. Must be a valid name. Returns null if not typed. =for apidoc m|HV *|PAD_COMPNAME_OURSTASH|PADOFFSET po Return the stash associated with an C<our> variable. @@ -384,7 +389,7 @@ Assumes the slot entry is a valid C<our> lexical. =for apidoc m|STRLEN|PAD_COMPNAME_GEN|PADOFFSET po The generation number of the name at offset C<po> in the current -compiling pad (lvalue). Note that C<SvUVX> is hijacked for this purpose. +compiling pad (lvalue). Note that C<SvUVX> is hijacked for this purpose. =for apidoc m|STRLEN|PAD_COMPNAME_GEN_set|PADOFFSET po|int gen Sets the generation number of the name at offset C<po> in the current diff --git a/Master/tlpkg/tlperl/lib/CORE/parser.h b/Master/tlpkg/tlperl/lib/CORE/parser.h index e7b887ec3b4..ff5867e4427 100644 --- a/Master/tlpkg/tlperl/lib/CORE/parser.h +++ b/Master/tlpkg/tlperl/lib/CORE/parser.h @@ -29,7 +29,6 @@ typedef struct yy_lexshared { char *ls_bufptr; /* mirrors PL_parser->bufptr */ char *re_eval_start; /* start of "(?{..." text */ SV *re_eval_str; /* "(?{...})" text */ - line_t herelines; /* number of lines in here-doc */ } LEXSHARED; typedef struct yy_parser { @@ -55,7 +54,8 @@ typedef struct yy_parser { char *lex_brackstack;/* what kind of brackets to pop */ char *lex_casestack; /* what kind of case mods in effect */ U8 lex_defer; /* state after determined token */ - bool lex_dojoin; /* doing an array interpolation */ + U8 lex_dojoin; /* doing an array interpolation + 1 = @{...} 2 = ->@ */ U8 lex_expect; /* expect after determined token */ U8 expect; /* how to interpret ambiguous tokens */ I32 lex_formbrack; /* bracket count at outer format level */ @@ -123,11 +123,13 @@ typedef struct yy_parser { COP *saved_curcop; /* the previous PL_curcop */ char tokenbuf[256]; - + line_t herelines; /* number of lines in here-doc */ + line_t preambling; /* line # when processing $ENV{PERL5DB} */ U8 lex_fakeeof; /* precedence at which to fake EOF */ U8 lex_flags; PERL_BITFIELD16 in_pod:1; /* lexer is within a =pod section */ PERL_BITFIELD16 filtered:1; /* source filters in evalbytes */ + PERL_BITFIELD16 saw_infix_sigil:1; /* saw & or * or % operator */ } yy_parser; /* flags for lexer API */ diff --git a/Master/tlpkg/tlperl/lib/CORE/patchlevel.h b/Master/tlpkg/tlperl/lib/CORE/patchlevel.h index 9f85e9452ad..07e1217e991 100644 --- a/Master/tlpkg/tlperl/lib/CORE/patchlevel.h +++ b/Master/tlpkg/tlperl/lib/CORE/patchlevel.h @@ -14,7 +14,7 @@ * exactly on the third column */ #define PERL_REVISION 5 /* age */ -#define PERL_VERSION 18 /* epoch */ +#define PERL_VERSION 20 /* epoch */ #define PERL_SUBVERSION 2 /* generation */ /* The following numbers describe the earliest compatible version of @@ -35,7 +35,7 @@ changing them should not be necessary. */ #define PERL_API_REVISION 5 -#define PERL_API_VERSION 18 +#define PERL_API_VERSION 20 #define PERL_API_SUBVERSION 0 /* XXX Note: The selection of non-default Configure options, such @@ -144,7 +144,7 @@ static const char * const local_patches[] = { /* Initial space prevents this variable from being inserted in config.sh */ # define LOCAL_PATCH_COUNT \ - ((int)(sizeof(local_patches)/sizeof(local_patches[0])-2)) + ((int)(C_ARRAY_LENGTH(local_patches)-2)) /* the old terms of reference, add them only when explicitly included */ #define PATCHLEVEL PERL_VERSION diff --git a/Master/tlpkg/tlperl/lib/CORE/perl.h b/Master/tlpkg/tlperl/lib/CORE/perl.h index 89f4c98904f..1325de9b9d0 100644 --- a/Master/tlpkg/tlperl/lib/CORE/perl.h +++ b/Master/tlpkg/tlperl/lib/CORE/perl.h @@ -22,23 +22,10 @@ #define USE_STDIO #endif /* PERL_FOR_X2P */ -#if defined(DGUX) -#include <sys/fcntl.h> -#endif - -#ifdef VOIDUSED -# undef VOIDUSED -#endif -#define VOIDUSED 1 - #ifdef PERL_MICRO # include "uconfig.h" #else -# ifndef USE_CROSS_COMPILE -# include "config.h" -# else -# include "xconfig.h" -# endif +# include "config.h" #endif /* See L<perlguts/"The Perl API"> for detailed notes on @@ -99,7 +86,7 @@ # define USE_HEAP_INSTEAD_OF_STACK #endif -#/* Use the reentrant APIs like localtime_r and getpwent_r */ +/* Use the reentrant APIs like localtime_r and getpwent_r */ /* Win32 has naturally threadsafe libraries, no need to use any _r variants. */ #if defined(USE_ITHREADS) && !defined(USE_REENTRANT_API) && !defined(NETWARE) && !defined(WIN32) && !defined(PERL_DARWIN) # define USE_REENTRANT_API @@ -107,15 +94,9 @@ /* <--- here ends the logic shared by perl.h and makedef.pl */ -/* - * PERL_DARWIN for MacOSX (__APPLE__ exists but is not officially sanctioned) - * (The -DPERL_DARWIN comes from the hints/darwin.sh.) - * __bsdi__ for BSD/OS - */ -#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(PERL_DARWIN) || defined(__bsdi__) || defined(BSD41) || defined(BSD42) || defined(BSD43) || defined(BSD44) -# ifndef BSDish -# define BSDish -# endif +/* Microsoft Visual C++ 6.0 needs special treatment in numerous places */ +#if defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1200 && _MSC_VER < 1300 +# define USING_MSVC6 #endif #undef START_EXTERN_C @@ -194,6 +175,7 @@ # define pTHX_7 8 # define pTHX_8 9 # define pTHX_9 10 +# define pTHX_12 13 # if defined(DEBUGGING) && !defined(PERL_TRACK_MEMPOOL) # define PERL_TRACK_MEMPOOL # endif @@ -225,11 +207,11 @@ #define CALLREGCOMP(sv, flags) Perl_pregcomp(aTHX_ (sv),(flags)) #define CALLREGCOMP_ENG(prog, sv, flags) (prog)->comp(aTHX_ sv, flags) -#define CALLREGEXEC(prog,stringarg,strend,strbeg,minend,screamer,data,flags) \ +#define CALLREGEXEC(prog,stringarg,strend,strbeg,minend,sv,data,flags) \ RX_ENGINE(prog)->exec(aTHX_ (prog),(stringarg),(strend), \ - (strbeg),(minend),(screamer),(data),(flags)) -#define CALLREG_INTUIT_START(prog,sv,strpos,strend,flags,data) \ - RX_ENGINE(prog)->intuit(aTHX_ (prog), (sv), (strpos), \ + (strbeg),(minend),(sv),(data),(flags)) +#define CALLREG_INTUIT_START(prog,sv,strbeg,strpos,strend,flags,data) \ + RX_ENGINE(prog)->intuit(aTHX_ (prog), (sv), (strbeg), (strpos), \ (strend),(flags),(data)) #define CALLREG_INTUIT_STRING(prog) \ RX_ENGINE(prog)->checkstr(aTHX_ (prog)) @@ -345,6 +327,78 @@ # define PERL_UNUSED_CONTEXT #endif +/* gcc (-ansi) -pedantic doesn't allow gcc statement expressions, + * g++ allows them but seems to have problems with them + * (insane errors ensue). + * g++ does not give insane errors now (RMB 2008-01-30, gcc 4.2.2). + */ +#if defined(PERL_GCC_PEDANTIC) || \ + (defined(__GNUC__) && defined(__cplusplus) && \ + ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 2)))) +# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN +# define PERL_GCC_BRACE_GROUPS_FORBIDDEN +# endif +#endif + +/* Use PERL_UNUSED_RESULT() to suppress the warnings about unused results + * of function calls, e.g. PERL_UNUSED_RESULT(foo(a, b)). + * + * The main reason for this is that the combination of gcc -Wunused-result + * (part of -Wall) and the __attribute__((warn_unused_result)) cannot + * be silenced with casting to void. This causes trouble when the system + * header files use the attribute. + * + * Use PERL_UNUSED_RESULT sparingly, though, since usually the warning + * is there for a good reason: you might lose success/failure information, + * or leak resources, or changes in resources. + * + * But sometimes you just want to ignore the return value, e.g. on + * codepaths soon ending up in abort, or in "best effort" attempts, + * or in situations where there is no good way to handle failures. + * + * Sometimes PERL_UNUSED_RESULT might not be the most natural way: + * another possibility is that you can capture the return value + * and use PERL_UNUSED_VAR on that. + * + * The __typeof__() is used instead of typeof() since typeof() is not + * available under strict C89, and because of compilers masquerading + * as gcc (clang and icc), we want exactly the gcc extension + * __typeof__ and nothing else. + */ +#ifndef PERL_UNUSED_RESULT +# if defined(__GNUC__) && defined(HASATTRIBUTE_WARN_UNUSED_RESULT) +# define PERL_UNUSED_RESULT(v) STMT_START { __typeof__(v) z = (v); (void)sizeof(z); } STMT_END +# else +# define PERL_UNUSED_RESULT(v) ((void)(v)) +# endif +#endif + +/* on gcc (and clang), specify that a warning should be temporarily + * ignored; e.g. + * + * GCC_DIAG_IGNORE(-Wmultichar); + * char b = 'ab'; + * GCC_DIAG_RESTORE; + * + * based on http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html + * + * Note that "pragma GCC diagnostic push/pop" was added in GCC 4.6, Mar 2011; + * clang only pretends to be GCC 4.2, but still supports push/pop. + */ + +#if defined(__clang) || \ + (defined( __GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) +# define GCC_DIAG_DO_PRAGMA_(x) _Pragma (#x) + +# define GCC_DIAG_IGNORE(x) _Pragma("GCC diagnostic push") \ + GCC_DIAG_DO_PRAGMA_(GCC diagnostic ignored #x) +# define GCC_DIAG_RESTORE _Pragma("GCC diagnostic pop") +#else +# define GCC_DIAG_IGNORE(w) +# define GCC_DIAG_RESTORE +#endif + + #define NOOP /*EMPTY*/(void)0 /* cea2e8a9dd23747f accidentally lost the comment originally from the first check in of thread.h, explaining why we need dNOOP at all: */ @@ -358,7 +412,7 @@ #endif #ifndef pTHX -/* Don't bother defining tTHX and sTHX; using them outside +/* Don't bother defining tTHX ; using it outside * code guarded by PERL_IMPLICIT_CONTEXT is an error. */ # define pTHX void @@ -377,6 +431,7 @@ # define pTHX_7 7 # define pTHX_8 8 # define pTHX_9 9 +# define pTHX_12 12 #endif #ifndef dVAR @@ -438,27 +493,6 @@ # endif #endif -#ifdef OP_IN_REGISTER -# ifdef __GNUC__ -# define stringify_immed(s) #s -# define stringify(s) stringify_immed(s) -struct op *Perl_op asm(stringify(OP_IN_REGISTER)); -# endif -#endif - -/* gcc (-ansi) -pedantic doesn't allow gcc statement expressions, - * g++ allows them but seems to have problems with them - * (insane errors ensue). - * g++ does not give insane errors now (RMB 2008-01-30, gcc 4.2.2). - */ -#if defined(PERL_GCC_PEDANTIC) || \ - (defined(__GNUC__) && defined(__cplusplus) && \ - ((__GNUC__ < 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ < 2)))) -# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN -# define PERL_GCC_BRACE_GROUPS_FORBIDDEN -# endif -#endif - #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus) # ifndef PERL_USE_GCC_BRACE_GROUPS # define PERL_USE_GCC_BRACE_GROUPS @@ -477,14 +511,8 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # define STMT_START (void)( /* gcc supports "({ STATEMENTS; })" */ # define STMT_END ) # else - /* Now which other defined()s do we need here ??? */ -# if (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__) -# define STMT_START if (1) -# define STMT_END else (void)0 -# else # define STMT_START do # define STMT_END while (0) -# endif # endif #endif @@ -520,7 +548,7 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # define STANDARD_C 1 #endif -#if defined(__cplusplus) || defined(WIN32) || defined(__sgi) || defined(__EMX__) || defined(__DGUX) || defined(__QNX__) || defined(NETWARE) || defined(PERL_MICRO) +#if defined(__cplusplus) || defined(WIN32) || defined(__sgi) || defined(__EMX__) || defined(__QNX__) || defined(NETWARE) || defined(PERL_MICRO) # define DONT_DECLARE_STD 1 #endif @@ -545,7 +573,7 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); * DANGER! Using NO_TAINT_SUPPORT or SILENT_NO_TAINT_SUPPORT * voids your nonexistent warranty! */ -#if SILENT_NO_TAINT_SUPPORT && !defined(NO_TAINT_SUPPORT) +#if defined(SILENT_NO_TAINT_SUPPORT) && !defined(NO_TAINT_SUPPORT) # define NO_TAINT_SUPPORT 1 #endif @@ -553,7 +581,7 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); * operations into no-ops for a very modest speed-up. Enable only if you * know what you're doing: tests and CPAN modules' tests are bound to fail. */ -#if NO_TAINT_SUPPORT +#ifdef NO_TAINT_SUPPORT # define TAINT NOOP # define TAINT_NOT NOOP # define TAINT_IF(c) NOOP @@ -645,11 +673,7 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # include <pthread.h> #endif -#ifndef _TYPES_ /* If types.h defines this it's easy. */ -# ifndef major /* Does everyone's types.h define this? */ -# include <sys/types.h> -# endif -#endif +#include <sys/types.h> #ifdef __cplusplus # ifndef I_STDARG @@ -657,6 +681,15 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # endif #endif +/* EVC 4 SDK headers includes a bad definition of MB_CUR_MAX in stdlib.h + which is included from stdarg.h. Bad definition not present in SD 2008 + SDK headers. wince.h is not yet included, so we cant fix this from there + since by then MB_CUR_MAX will be defined from stdlib.h. + cewchar.h includes a correct definition of MB_CUR_MAX and it is copied here + since cewchar.h can't be included this early */ +#if defined(UNDER_CE) && (_MSC_VER < 1300) +# define MB_CUR_MAX 1 +#endif #ifdef I_STDARG # include <stdarg.h> #else @@ -695,6 +728,8 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); #if !defined(NO_LOCALE) && defined(HAS_SETLOCALE) # define USE_LOCALE +# define HAS_SKIP_LOCALE_INIT /* Solely for XS code to test for this + capability */ # if !defined(NO_LOCALE_COLLATE) && defined(LC_COLLATE) \ && defined(HAS_STRXFRM) # define USE_LOCALE_COLLATE @@ -705,6 +740,15 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # if !defined(NO_LOCALE_NUMERIC) && defined(LC_NUMERIC) # define USE_LOCALE_NUMERIC # endif +# if !defined(NO_LOCALE_MESSAGES) && defined(LC_MESSAGES) +# define USE_LOCALE_MESSAGES +# endif +# if !defined(NO_LOCALE_MONETARY) && defined(LC_MONETARY) +# define USE_LOCALE_MONETARY +# endif +# ifndef WIN32 /* No wrapper except on Windows */ +# define my_setlocale(a,b) setlocale(a,b) +# endif #endif /* !NO_LOCALE && HAS_SETLOCALE */ #include <setjmp.h> @@ -716,6 +760,16 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # include <sys/param.h> #endif +/* On BSD-derived systems, <sys/param.h> defines BSD to a year-month + value something like 199306. This may be useful if no more-specific + feature test is available. +*/ +#if defined(BSD) +# ifndef BSDish +# define BSDish +# endif +#endif + /* Use all the "standard" definitions? */ #if defined(STANDARD_C) && defined(I_STDLIB) # include <stdlib.h> @@ -735,23 +789,14 @@ struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # undef _SC_ARG_MAX /* Symbian has _SC_ARG_MAX but no sysconf() */ #endif -#if defined(HAS_SYSCALL) && !defined(HAS_SYSCALL_PROTO) && !defined(PERL_MICRO) +#if defined(HAS_SYSCALL) && !defined(HAS_SYSCALL_PROTO) EXTERN_C int syscall(int, ...); #endif -#if defined(HAS_USLEEP) && !defined(HAS_USLEEP_PROTO) && !defined(PERL_MICRO) +#if defined(HAS_USLEEP) && !defined(HAS_USLEEP_PROTO) EXTERN_C int usleep(unsigned int); #endif -/* Funky places that do not have socket stuff. */ -#if defined(__LIBCATAMOUNT__) -# define MYSWAP -#endif - -#ifdef PERL_MICRO /* Last chance to export Perl_my_swap */ -# define MYSWAP -#endif - #ifdef PERL_CORE /* macros for correct constant construction */ @@ -804,189 +849,6 @@ EXTERN_C int usleep(unsigned int); (((U64)(x) & U64_CONST(0xff00000000000000)) >> 56) )) # endif -/*----------------------------------------------------------------------------*/ -# if BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 /* little-endian */ -/*----------------------------------------------------------------------------*/ -# define my_htole16(x) (x) -# define my_letoh16(x) (x) -# define my_htole32(x) (x) -# define my_letoh32(x) (x) -# define my_htobe16(x) _swab_16_(x) -# define my_betoh16(x) _swab_16_(x) -# define my_htobe32(x) _swab_32_(x) -# define my_betoh32(x) _swab_32_(x) -# ifdef HAS_QUAD -# define my_htole64(x) (x) -# define my_letoh64(x) (x) -# define my_htobe64(x) _swab_64_(x) -# define my_betoh64(x) _swab_64_(x) -# endif -# define my_htoles(x) (x) -# define my_letohs(x) (x) -# define my_htolei(x) (x) -# define my_letohi(x) (x) -# define my_htolel(x) (x) -# define my_letohl(x) (x) -# if SHORTSIZE == 1 -# define my_htobes(x) (x) -# define my_betohs(x) (x) -# elif SHORTSIZE == 2 -# define my_htobes(x) _swab_16_(x) -# define my_betohs(x) _swab_16_(x) -# elif SHORTSIZE == 4 -# define my_htobes(x) _swab_32_(x) -# define my_betohs(x) _swab_32_(x) -# elif SHORTSIZE == 8 -# define my_htobes(x) _swab_64_(x) -# define my_betohs(x) _swab_64_(x) -# else -# define PERL_NEED_MY_HTOBES -# define PERL_NEED_MY_BETOHS -# endif -# if INTSIZE == 1 -# define my_htobei(x) (x) -# define my_betohi(x) (x) -# elif INTSIZE == 2 -# define my_htobei(x) _swab_16_(x) -# define my_betohi(x) _swab_16_(x) -# elif INTSIZE == 4 -# define my_htobei(x) _swab_32_(x) -# define my_betohi(x) _swab_32_(x) -# elif INTSIZE == 8 -# define my_htobei(x) _swab_64_(x) -# define my_betohi(x) _swab_64_(x) -# else -# define PERL_NEED_MY_HTOBEI -# define PERL_NEED_MY_BETOHI -# endif -# if LONGSIZE == 1 -# define my_htobel(x) (x) -# define my_betohl(x) (x) -# elif LONGSIZE == 2 -# define my_htobel(x) _swab_16_(x) -# define my_betohl(x) _swab_16_(x) -# elif LONGSIZE == 4 -# define my_htobel(x) _swab_32_(x) -# define my_betohl(x) _swab_32_(x) -# elif LONGSIZE == 8 -# define my_htobel(x) _swab_64_(x) -# define my_betohl(x) _swab_64_(x) -# else -# define PERL_NEED_MY_HTOBEL -# define PERL_NEED_MY_BETOHL -# endif -# define my_htolen(p,n) NOOP -# define my_letohn(p,n) NOOP -# define my_htoben(p,n) my_swabn(p,n) -# define my_betohn(p,n) my_swabn(p,n) -/*----------------------------------------------------------------------------*/ -# elif BYTEORDER == 0x4321 || BYTEORDER == 0x87654321 /* big-endian */ -/*----------------------------------------------------------------------------*/ -# define my_htobe16(x) (x) -# define my_betoh16(x) (x) -# define my_htobe32(x) (x) -# define my_betoh32(x) (x) -# define my_htole16(x) _swab_16_(x) -# define my_letoh16(x) _swab_16_(x) -# define my_htole32(x) _swab_32_(x) -# define my_letoh32(x) _swab_32_(x) -# ifdef HAS_QUAD -# define my_htobe64(x) (x) -# define my_betoh64(x) (x) -# define my_htole64(x) _swab_64_(x) -# define my_letoh64(x) _swab_64_(x) -# endif -# define my_htobes(x) (x) -# define my_betohs(x) (x) -# define my_htobei(x) (x) -# define my_betohi(x) (x) -# define my_htobel(x) (x) -# define my_betohl(x) (x) -# if SHORTSIZE == 1 -# define my_htoles(x) (x) -# define my_letohs(x) (x) -# elif SHORTSIZE == 2 -# define my_htoles(x) _swab_16_(x) -# define my_letohs(x) _swab_16_(x) -# elif SHORTSIZE == 4 -# define my_htoles(x) _swab_32_(x) -# define my_letohs(x) _swab_32_(x) -# elif SHORTSIZE == 8 -# define my_htoles(x) _swab_64_(x) -# define my_letohs(x) _swab_64_(x) -# else -# define PERL_NEED_MY_HTOLES -# define PERL_NEED_MY_LETOHS -# endif -# if INTSIZE == 1 -# define my_htolei(x) (x) -# define my_letohi(x) (x) -# elif INTSIZE == 2 -# define my_htolei(x) _swab_16_(x) -# define my_letohi(x) _swab_16_(x) -# elif INTSIZE == 4 -# define my_htolei(x) _swab_32_(x) -# define my_letohi(x) _swab_32_(x) -# elif INTSIZE == 8 -# define my_htolei(x) _swab_64_(x) -# define my_letohi(x) _swab_64_(x) -# else -# define PERL_NEED_MY_HTOLEI -# define PERL_NEED_MY_LETOHI -# endif -# if LONGSIZE == 1 -# define my_htolel(x) (x) -# define my_letohl(x) (x) -# elif LONGSIZE == 2 -# define my_htolel(x) _swab_16_(x) -# define my_letohl(x) _swab_16_(x) -# elif LONGSIZE == 4 -# define my_htolel(x) _swab_32_(x) -# define my_letohl(x) _swab_32_(x) -# elif LONGSIZE == 8 -# define my_htolel(x) _swab_64_(x) -# define my_letohl(x) _swab_64_(x) -# else -# define PERL_NEED_MY_HTOLEL -# define PERL_NEED_MY_LETOHL -# endif -# define my_htolen(p,n) my_swabn(p,n) -# define my_letohn(p,n) my_swabn(p,n) -# define my_htoben(p,n) NOOP -# define my_betohn(p,n) NOOP -/*----------------------------------------------------------------------------*/ -# else /* all other byte-orders */ -/*----------------------------------------------------------------------------*/ -# define PERL_NEED_MY_HTOLE16 -# define PERL_NEED_MY_LETOH16 -# define PERL_NEED_MY_HTOBE16 -# define PERL_NEED_MY_BETOH16 -# define PERL_NEED_MY_HTOLE32 -# define PERL_NEED_MY_LETOH32 -# define PERL_NEED_MY_HTOBE32 -# define PERL_NEED_MY_BETOH32 -# ifdef HAS_QUAD -# define PERL_NEED_MY_HTOLE64 -# define PERL_NEED_MY_LETOH64 -# define PERL_NEED_MY_HTOBE64 -# define PERL_NEED_MY_BETOH64 -# endif -# define PERL_NEED_MY_HTOLES -# define PERL_NEED_MY_LETOHS -# define PERL_NEED_MY_HTOBES -# define PERL_NEED_MY_BETOHS -# define PERL_NEED_MY_HTOLEI -# define PERL_NEED_MY_LETOHI -# define PERL_NEED_MY_HTOBEI -# define PERL_NEED_MY_BETOHI -# define PERL_NEED_MY_HTOLEL -# define PERL_NEED_MY_LETOHL -# define PERL_NEED_MY_HTOBEL -# define PERL_NEED_MY_BETOHL -/*----------------------------------------------------------------------------*/ -# endif /* end of byte-order macros */ -/*----------------------------------------------------------------------------*/ - /* The old value was hard coded at 1008. (4096-16) seems to be a bit faster, at least on FreeBSD. YMMV, so experiment. */ #ifndef PERL_ARENA_SIZE @@ -1157,9 +1019,6 @@ EXTERN_C int usleep(unsigned int); extern int memcmp (char*, char*, int); # endif # endif -# ifdef BUGGY_MSC -# pragma function(memcmp) -# endif #else # ifndef memcmp # define memcmp my_memcmp @@ -1200,12 +1059,6 @@ EXTERN_C int usleep(unsigned int); # include <arpa/inet.h> #endif -#if defined(SF_APPEND) && defined(USE_SFIO) && defined(I_SFIO) -/* <sfio.h> defines SF_APPEND and <sys/stat.h> might define SF_APPEND - * (the neo-BSD seem to do this). */ -# undef SF_APPEND -#endif - #ifdef I_SYS_STAT # include <sys/stat.h> #endif @@ -1263,14 +1116,6 @@ EXTERN_C int usleep(unsigned int); # define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */ #endif -/* In Tru64 use the 4.4BSD struct msghdr, not the 4.3 one. - * This is important for using IPv6. - * For OSF/1 3.2, however, defining _SOCKADDR_LEN would be - * a bad idea since it breaks send() and recv(). */ -#if defined(__osf__) && defined(__alpha) && !defined(_SOCKADDR_LEN) && !defined(DEC_OSF1_3_X) -# define _SOCKADDR_LEN -#endif - #if defined(HAS_SOCKET) && !defined(WIN32) /* WIN32 handles sockets via win32.h */ # include <sys/socket.h> # if defined(USE_SOCKS) && defined(I_SOCKS) @@ -1321,7 +1166,7 @@ EXTERN_C char **environ; #endif #if defined(__cplusplus) -# if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) +# if defined(BSDish) EXTERN_C char **environ; # elif defined(__CYGWIN__) EXTERN_C char *crypt(const char *, const char *); @@ -1356,12 +1201,6 @@ EXTERN_C char *crypt(const char *, const char *); # define SS_IVCHAN SS$_IVCHAN # define SS_NORMAL SS$_NORMAL #else -# define SETERRNO(errcode,vmserrcode) (errno = (errcode)) -# define dSAVEDERRNO int saved_errno -# define dSAVE_ERRNO int saved_errno = errno -# define SAVE_ERRNO (saved_errno = errno) -# define RESTORE_ERRNO (errno = saved_errno) - # define LIB_INVARG 0 # define RMS_DIR 0 # define RMS_FAC 0 @@ -1376,6 +1215,31 @@ EXTERN_C char *crypt(const char *, const char *); # define SS_NORMAL 0 #endif +#ifdef WIN32 +# define dSAVEDERRNO int saved_errno; DWORD saved_win32_errno +# define dSAVE_ERRNO int saved_errno = errno; DWORD saved_win32_errno = GetLastError() +# define SAVE_ERRNO ( saved_errno = errno, saved_win32_errno = GetLastError() ) +# define RESTORE_ERRNO ( errno = saved_errno, SetLastError(saved_win32_errno) ) +#endif + +#ifdef OS2 +# define dSAVEDERRNO int saved_errno; unsigned long saved_os2_errno +# define dSAVE_ERRNO int saved_errno = errno; unsigned long saved_os2_errno = Perl_rc +# define SAVE_ERRNO ( saved_errno = errno, saved_os2_errno = Perl_rc ) +# define RESTORE_ERRNO ( errno = saved_errno, Perl_rc = saved_os2_errno ) +#endif + +#ifndef SETERRNO +# define SETERRNO(errcode,vmserrcode) (errno = (errcode)) +#endif + +#ifndef dSAVEDERRNO +# define dSAVEDERRNO int saved_errno +# define dSAVE_ERRNO int saved_errno = errno +# define SAVE_ERRNO (saved_errno = errno) +# define RESTORE_ERRNO (errno = saved_errno) +#endif + #define ERRSV GvSVn(PL_errgv) #define CLEAR_ERRSV() STMT_START { \ @@ -1412,8 +1276,6 @@ EXTERN_C char *crypt(const char *, const char *); # define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv)) #endif -#define ERRHV GvHV(PL_errgv) /* XXX unused, here for compatibility */ - #ifndef errno extern int errno; /* ANSI allows errno to be an lvalue expr. * For example in multithreaded environments @@ -1422,24 +1284,26 @@ EXTERN_C char *crypt(const char *, const char *); * #define errno (*_errno()) */ #endif +#define UNKNOWN_ERRNO_MSG "(unknown)" + #ifdef HAS_STRERROR -#ifndef DONT_DECLARE_STD +# ifndef DONT_DECLARE_STD # ifdef VMS char *strerror (int,...); # else char *strerror (int); # endif -#endif -# ifndef Strerror -# define Strerror strerror -# endif +# endif +# ifndef Strerror +# define Strerror strerror +# endif #else # ifdef HAS_SYS_ERRLIST extern int sys_nerr; extern char *sys_errlist[]; # ifndef Strerror # define Strerror(e) \ - ((e) < 0 || (e) >= sys_nerr ? "(unknown)" : sys_errlist[e]) + ((e) < 0 || (e) >= sys_nerr ? UNKNOWN_ERRNO_MSG : sys_errlist[e]) # endif # endif #endif @@ -1494,26 +1358,13 @@ EXTERN_C char *crypt(const char *, const char *); # endif #endif -#ifdef PERL_MICRO -# ifndef DIR -# define DIR void -# endif -#endif - -#ifdef FPUTS_BOTCH -/* work around botch in SunOS 4.0.1 and 4.0.2 */ -# ifndef fputs -# define fputs(sv,fp) fprintf(fp,"%s",sv) -# endif -#endif - /* * The following gobbledygook brought to you on behalf of __STDC__. * (I could just use #ifndef __STDC__, but this is more bulletproof * in the face of half-implementations.) */ -#if defined(I_SYSMODE) && !defined(PERL_MICRO) +#if defined(I_SYSMODE) #include <sys/mode.h> #endif @@ -1657,10 +1508,6 @@ EXTERN_C char *crypt(const char *, const char *); # define S_IEXEC S_IXUSR #endif -#ifdef ff_next -# undef ff_next -#endif - #if defined(cray) || defined(gould) || defined(i860) || defined(pyr) # define SLOPPYDIVIDE #endif @@ -1785,16 +1632,17 @@ typedef UVTYPE UV; # else # undef IV_IS_QUAD # undef UV_IS_QUAD +#if !defined(PERL_CORE) || defined(USING_MSVC6) +/* We think that removing this decade-old undef this will cause too much + breakage on CPAN for too little gain. (See RT #119753) + However, we do need HAS_QUAD in the core for use by the drand48 code, + but not for Win32 VC6 because it has poor __int64 support. */ # undef HAS_QUAD +#endif # endif #endif -#ifndef HAS_QUAD -# undef PERL_NEED_MY_HTOLE64 -# undef PERL_NEED_MY_LETOH64 -# undef PERL_NEED_MY_HTOBE64 -# undef PERL_NEED_MY_BETOH64 -#endif +#define SSize_t_MAX (SSize_t)(~(size_t)0 >> 1) #define IV_DIG (BIT_DIGITS(IVSIZE * 8)) #define UV_DIG (BIT_DIGITS(UVSIZE * 8)) @@ -1950,6 +1798,16 @@ typedef NVTYPE NV; # include <ieeefp.h> #endif +#ifdef USING_MSVC6 +/* VC6 has broken NaN semantics: NaN == NaN returns true instead of false, + * and for example NaN < IV_MIN. */ +# define NAN_COMPARE_BROKEN +#endif +#if defined(__DECC) && defined(__osf__) +/* Also Tru64 cc has broken NaN comparisons. */ +# define NAN_COMPARE_BROKEN +#endif + #ifdef USE_LONG_DOUBLE # ifdef I_SUNMATH # include <sunmath.h> @@ -2109,7 +1967,7 @@ EXTERN_C long double modfl(long double, long double *); # define Perl_fp_class_zero(x) (Perl_fp_class(x)==FP_CLASS_NZERO||Perl_fp_class(x)==FP_CLASS_PZERO) #endif -#if !defined(Perl_fp_class) && defined(HAS_FP_CLASS) && !defined(PERL_MICRO) +#if !defined(Perl_fp_class) && defined(HAS_FP_CLASS) # include <math.h> # if !defined(FP_SNAN) && defined(I_FP_CLASS) # include <fp_class.h> @@ -2418,9 +2276,6 @@ int isnan(double d); #endif -struct RExC_state_t; -struct _reg_trie_data; - typedef MEM_SIZE STRLEN; #ifdef PERL_MAD @@ -2474,6 +2329,7 @@ typedef struct xpvuv XPVUV; typedef struct xpvnv XPVNV; typedef struct xpvmg XPVMG; typedef struct xpvlv XPVLV; +typedef struct xpvinvlist XINVLIST; typedef struct xpvav XPVAV; typedef struct xpvhv XPVHV; typedef struct xpvgv XPVGV; @@ -2494,11 +2350,10 @@ typedef AV PAD; typedef AV PADNAMELIST; typedef SV PADNAME; -/* XXX for 5.18, disable the COW by default - * #if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW) - * # define PERL_NEW_COPY_ON_WRITE - * #endif - */ +/* enable PERL_NEW_COPY_ON_WRITE by default */ +#if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW) +# define PERL_NEW_COPY_ON_WRITE +#endif #if defined(PERL_OLD_COPY_ON_WRITE) || defined(PERL_NEW_COPY_ON_WRITE) # if defined(PERL_OLD_COPY_ON_WRITE) && defined(PERL_NEW_COPY_ON_WRITE) @@ -2622,42 +2477,22 @@ typedef SV PADNAME; # else # include "dosish.h" # endif -# define ISHISH "dos" -#endif - -#if defined(VMS) +#elif defined(VMS) # include "vmsish.h" -# define ISHISH "vms" -#endif - -#if defined(PLAN9) +#elif defined(PLAN9) # include "./plan9/plan9ish.h" -# define ISHISH "plan9" -#endif - -#if defined(__VOS__) +#elif defined(__VOS__) # ifdef __GNUC__ # include "./vos/vosish.h" # else # include "vos/vosish.h" # endif -# define ISHISH "vos" -#endif - -#ifdef __SYMBIAN32__ +#elif defined(__SYMBIAN32__) # include "symbian/symbianish.h" -# define ISHISH "symbian" -#endif - - -#if defined(__HAIKU__) +#elif defined(__HAIKU__) # include "haiku/haikuish.h" -# define ISHISH "haiku" -#endif - -#ifndef ISHISH +#else # include "unixish.h" -# define ISHISH "unix" #endif /* NSIG logic from Configure --> */ @@ -2758,17 +2593,17 @@ typedef SV PADNAME; /* =for apidoc Am|void|PERL_SYS_INIT|int *argc|char*** argv Provides system-specific tune up of the C runtime environment necessary to -run Perl interpreters. This should be called only once, before creating +run Perl interpreters. This should be called only once, before creating any Perl interpreters. =for apidoc Am|void|PERL_SYS_INIT3|int *argc|char*** argv|char*** env Provides system-specific tune up of the C runtime environment necessary to -run Perl interpreters. This should be called only once, before creating +run Perl interpreters. This should be called only once, before creating any Perl interpreters. =for apidoc Am|void|PERL_SYS_TERM| Provides system-specific clean up of the C runtime environment after -running Perl interpreters. This should be called only once, after +running Perl interpreters. This should be called only once, after freeing any remaining Perl interpreters. =cut @@ -2862,9 +2697,6 @@ freeing any remaining Perl interpreters. # ifdef NETWARE # include <nw5thread.h> # else -# ifdef FAKE_THREADS -# include "fakethr.h" -# else # ifdef WIN32 # include <win32thread.h> # else @@ -2891,8 +2723,7 @@ typedef pthread_key_t perl_key; # endif /* I_MACH_CTHREADS */ # endif /* OS2 */ # endif /* WIN32 */ -# endif /* FAKE_THREADS */ -#endif /* NETWARE */ +# endif /* NETWARE */ #endif /* USE_ITHREADS */ #if defined(WIN32) @@ -3145,6 +2976,8 @@ typedef pthread_key_t perl_key; /* flags in PL_exit_flags for nature of exit() */ #define PERL_EXIT_EXPECTED 0x01 #define PERL_EXIT_DESTRUCT_END 0x02 /* Run END in perl_destruct */ +#define PERL_EXIT_WARN 0x04 /* Warn if Perl_my_exit() or Perl_my_failure_exit() called */ +#define PERL_EXIT_ABORT 0x08 /* Call abort() if Perl_my_exit() or Perl_my_failure_exit() called */ #ifndef PERL_CORE /* format to use for version numbers in file/directory names */ @@ -3166,7 +2999,7 @@ typedef pthread_key_t perl_key; * out there, Solaris being the most prominent. */ #ifndef PERL_FLUSHALL_FOR_CHILD -# if defined(USE_PERLIO) || defined(FFLUSH_NULL) || defined(USE_SFIO) +# if defined(USE_PERLIO) || defined(FFLUSH_NULL) # define PERL_FLUSHALL_FOR_CHILD PerlIO_flush((PerlIO*)NULL) # else # ifdef FFLUSH_ALL @@ -3239,14 +3072,11 @@ typedef pthread_key_t perl_key; #define HEKfARG(p) ((void*)(p)) -#ifdef PERL_CORE -/* not used; but needed for backward compatibility with XS code? - RMB */ -# undef VDf -#else -# ifndef VDf -# define VDf "vd" -# endif +/* Takes three arguments: is_utf8, length, str */ +#ifndef UTF8f +# define UTF8f "d%" UVuf "%4p" #endif +#define UTF8fARG(u,l,p) (int)cBOOL(u), (UV)(l), (void*)(p) #ifdef PERL_CORE /* not used; but needed for backward compatibility with XS code? - RMB */ @@ -3312,9 +3142,9 @@ typedef pthread_key_t perl_key; appropriate to call return. In either case, include the lint directive. */ #ifdef HASATTRIBUTE_NORETURN -# define NORETURN_FUNCTION_END assert(0); /* NOTREACHED */ +# define NORETURN_FUNCTION_END NOT_REACHED; /* NOTREACHED */ #else -# define NORETURN_FUNCTION_END assert(0); /* NOTREACHED */ return 0 +# define NORETURN_FUNCTION_END NOT_REACHED; /* NOTREACHED */ return 0 #endif /* Some OS warn on NULL format to printf */ @@ -3329,12 +3159,45 @@ typedef pthread_key_t perl_key; #else # define EXPECT(expr,val) (expr) #endif -#define LIKELY(cond) EXPECT(cond,1) -#define UNLIKELY(cond) EXPECT(cond,0) +#define LIKELY(cond) EXPECT(cBOOL(cond),TRUE) +#define UNLIKELY(cond) EXPECT(cBOOL(cond),FALSE) #ifdef HAS_BUILTIN_CHOOSE_EXPR /* placeholder */ #endif + +#ifndef __has_builtin +# define __has_builtin(x) 0 /* not a clang style compiler */ +#endif + +/* ASSUME is like assert(), but it has a benefit in a release build. It is a + hint to a compiler about a statement of fact in a function call free + expression, which allows the compiler to generate better machine code. + In a debug build, ASSUME(x) is a synonym for assert(x). ASSUME(0) means + the control path is unreachable. In a for loop, ASSUME can be used to hint + that a loop will run atleast X times. ASSUME is based off MSVC's __assume + intrinsic function, see its documents for more details. +*/ + +#ifndef DEBUGGING +# if __has_builtin(__builtin_unreachable) \ + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5 || __GNUC__ > 5) /* 4.5 -> */ +# define ASSUME(x) ((x) ? (void) 0 : __builtin_unreachable()) +# elif defined(_MSC_VER) +# define ASSUME(x) __assume(x) +# elif defined(__ARMCC_VERSION) /* untested */ +# define ASSUME(x) __promise(x) +# else +/* a random compiler might define assert to its own special optimization token + so pass it through to C lib as a last resort */ +# define ASSUME(x) assert(x) +# endif +#else +# define ASSUME(x) assert(x) +#endif + +#define NOT_REACHED ASSUME(0) + /* Some unistd.h's give a prototype for pause() even though HAS_PAUSE ends up undefined. This causes the #define below to be rejected by the compiler. Sigh. @@ -3383,6 +3246,7 @@ UNION_ANY_DEFINITION; union any { void* any_ptr; I32 any_i32; + U32 any_u32; IV any_iv; UV any_uv; long any_long; @@ -3402,7 +3266,7 @@ typedef I32 (*filter_t) (pTHX_ int, SV *, int); && idx >= AvFILLp(PL_parser->rsfp_filters)) #define PERL_FILTER_EXISTS(i) \ (PL_parser && PL_parser->rsfp_filters \ - && (i) <= av_len(PL_parser->rsfp_filters)) + && (i) <= av_tindex(PL_parser->rsfp_filters)) #if defined(_AIX) && !defined(_AIX43) #if defined(USE_REENTRANT) || defined(_REENTRANT) || defined(_THREAD_SAFE) @@ -3506,8 +3370,25 @@ struct _sublex_info { typedef struct magic_state MGS; /* struct magic_state defined in mg.c */ -struct scan_data_t; /* Used in S_* functions in regcomp.c */ -struct regnode_charclass_class; /* Used in S_* functions in regcomp.c */ +#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) + +/* These have to be predeclared, as they are used in proto.h which is #included + * before their definitions in regcomp.h. */ + +struct scan_data_t; +typedef struct regnode_charclass regnode_charclass; + +struct regnode_charclass_class; + +/* A hopefully less confusing name. The sub-classes are all Posix classes only + * used under /l matching */ +typedef struct regnode_charclass_class regnode_charclass_posixl; + +typedef struct regnode_ssc regnode_ssc; +typedef struct RExC_state_t RExC_state_t; +struct _reg_trie_data; + +#endif struct ptr_tbl_ent { struct ptr_tbl_ent* next; @@ -3537,36 +3418,70 @@ struct ptr_tbl { #define HAS_NTOHS #endif #ifndef HAS_HTONL -#if (BYTEORDER & 0xffff) != 0x4321 #define HAS_HTONS #define HAS_HTONL #define HAS_NTOHS #define HAS_NTOHL -#define MYSWAP -#define htons my_swap -#define htonl my_htonl -#define ntohs my_swap -#define ntohl my_ntohl -#endif -#else -#if (BYTEORDER & 0xffff) == 0x4321 -#undef HAS_HTONS -#undef HAS_HTONL -#undef HAS_NTOHS -#undef HAS_NTOHL -#endif +# if (BYTEORDER & 0xffff) == 0x4321 +/* Big endian system, so ntohl, ntohs, htonl and htons do not need to + re-order their values. However, to behave identically to the alternative + implementations, they should truncate to the correct size. */ +# define ntohl(x) ((x)&0xFFFFFFFF) +# define htonl(x) ntohl(x) +# define ntohs(x) ((x)&0xFFFF) +# define htons(x) ntohs(x) +# elif BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 + +/* Note that we can't straight out declare our own htonl and htons because + the Win32 build process forcibly undefines HAS_HTONL etc for its miniperl, + to avoid the overhead of initialising the socket subsystem, but the headers + that *declare* the various functions are still seen. If we declare our own + htonl etc they will clash with the declarations in the Win32 headers. */ + +PERL_STATIC_INLINE U32 +my_swap32(const U32 x) { + return ((x & 0xFF) << 24) | ((x >> 24) & 0xFF) + | ((x & 0x0000FF00) << 8) | ((x & 0x00FF0000) >> 8); +} + +PERL_STATIC_INLINE U16 +my_swap16(const U16 x) { + return ((x & 0xFF) << 8) | ((x >> 8) & 0xFF); +} + +# define htonl(x) my_swap32(x) +# define ntohl(x) my_swap32(x) +# define ntohs(x) my_swap16(x) +# define htons(x) my_swap16(x) +# else +# error "Unsupported byteorder" +/* The C pre-processor doesn't let us return the value of BYTEORDER as part of + the error message. Please check the value of the macro BYTEORDER, as defined + in config.h. The values of BYTEORDER we expect are + + big endian little endian + 32 bit 0x4321 0x1234 + 64 bit 0x87654321 0x12345678 + + If you have a system with a different byte order, please see + pod/perlhack.pod for how to submit a patch to add supporting code. +*/ +# endif #endif /* * Little-endian byte order functions - 'v' for 'VAX', or 'reVerse'. * -DWS */ -#if BYTEORDER != 0x1234 -# define HAS_VTOHL -# define HAS_VTOHS -# define HAS_HTOVL -# define HAS_HTOVS -# if BYTEORDER == 0x4321 || BYTEORDER == 0x87654321 +#if BYTEORDER == 0x1234 || BYTEORDER == 0x12345678 +/* Little endian system, so vtohl, vtohs, htovl and htovs do not need to + re-order their values. However, to behave identically to the alternative + implementations, they should truncate to the correct size. */ +# define vtohl(x) ((x)&0xFFFFFFFF) +# define vtohs(x) ((x)&0xFFFF) +# define htovl(x) vtohl(x) +# define htovs(x) vtohs(x) +#elif BYTEORDER == 0x4321 || BYTEORDER == 0x87654321 # define vtohl(x) ((((x)&0xFF)<<24) \ +(((x)>>24)&0xFF) \ +(((x)&0x0000FF00)<<8) \ @@ -3574,14 +3489,11 @@ struct ptr_tbl { # define vtohs(x) ((((x)&0xFF)<<8) + (((x)>>8)&0xFF)) # define htovl(x) vtohl(x) # define htovs(x) vtohs(x) -# endif - /* otherwise default to functions in util.c */ -#ifndef htovs -short htovs(short n); -short vtohs(short n); -long htovl(long n); -long vtohl(long n); -#endif +#else +# error "Unsupported byteorder" +/* If you have need for current perl on PDP-11 or similar, and can help test + that blead keeps working on a mixed-endian system, then see + pod/perlhack.pod for how to submit patches to things working again. */ #endif /* *MAX Plus 1. A floating point value. @@ -3619,11 +3531,11 @@ long vtohl(long n); #define U_32(n) ((n) < 0.0 ? ((n) < I32_MIN ? (UV) I32_MIN : (U32)(I32) (n)) \ : ((n) < U32_MAX_P1 ? (U32) (n) \ : ((n) > 0 ? U32_MAX : 0 /* NaN */))) -#define I_V(n) ((n) < IV_MAX_P1 ? ((n) < IV_MIN ? IV_MIN : (IV) (n)) \ - : ((n) < UV_MAX_P1 ? (IV)(UV) (n) \ +#define I_V(n) (LIKELY((n) < IV_MAX_P1) ? (UNLIKELY((n) < IV_MIN) ? IV_MIN : (IV) (n)) \ + : (LIKELY((n) < UV_MAX_P1) ? (IV)(UV) (n) \ : ((n) > 0 ? (IV)UV_MAX : 0 /* NaN */))) -#define U_V(n) ((n) < 0.0 ? ((n) < IV_MIN ? (UV) IV_MIN : (UV)(IV) (n)) \ - : ((n) < UV_MAX_P1 ? (UV) (n) \ +#define U_V(n) ((n) < 0.0 ? (UNLIKELY((n) < IV_MIN) ? (UV) IV_MIN : (UV)(IV) (n)) \ + : (LIKELY((n) < UV_MAX_P1) ? (UV) (n) \ : ((n) > 0 ? UV_MAX : 0 /* NaN */))) #endif @@ -3698,7 +3610,8 @@ Gid_t getegid (void); #define DEBUG_q_FLAG 0x00800000 /*8388608 */ #define DEBUG_M_FLAG 0x01000000 /*16777216*/ #define DEBUG_B_FLAG 0x02000000 /*33554432*/ -#define DEBUG_MASK 0x03FFEFFF /* mask of all the standard flags */ +#define DEBUG_L_FLAG 0x04000000 /*67108864*/ +#define DEBUG_MASK 0x07FFEFFF /* mask of all the standard flags */ #define DEBUG_DB_RECURSE_FLAG 0x40000000 #define DEBUG_TOP_FLAG 0x80000000 /* XXX what's this for ??? Signal @@ -3730,6 +3643,7 @@ Gid_t getegid (void); # define DEBUG_q_TEST_ (PL_debug & DEBUG_q_FLAG) # define DEBUG_M_TEST_ (PL_debug & DEBUG_M_FLAG) # define DEBUG_B_TEST_ (PL_debug & DEBUG_B_FLAG) +# define DEBUG_L_TEST_ (PL_debug & DEBUG_L_FLAG) # define DEBUG_Xv_TEST_ (DEBUG_X_TEST_ && DEBUG_v_TEST_) # define DEBUG_Uv_TEST_ (DEBUG_U_TEST_ && DEBUG_v_TEST_) # define DEBUG_Pv_TEST_ (DEBUG_P_TEST_ && DEBUG_v_TEST_) @@ -3762,6 +3676,7 @@ Gid_t getegid (void); # define DEBUG_q_TEST DEBUG_q_TEST_ # define DEBUG_M_TEST DEBUG_M_TEST_ # define DEBUG_B_TEST DEBUG_B_TEST_ +# define DEBUG_L_TEST DEBUG_L_TEST_ # define DEBUG_Xv_TEST DEBUG_Xv_TEST_ # define DEBUG_Uv_TEST DEBUG_Uv_TEST_ # define DEBUG_Pv_TEST DEBUG_Pv_TEST_ @@ -3813,6 +3728,7 @@ Gid_t getegid (void); # define DEBUG_q(a) DEBUG__(DEBUG_q_TEST, a) # define DEBUG_M(a) DEBUG__(DEBUG_M_TEST, a) # define DEBUG_B(a) DEBUG__(DEBUG_B_TEST, a) +# define DEBUG_L(a) DEBUG__(DEBUG_L_TEST, a) #else /* DEBUGGING */ @@ -3842,6 +3758,7 @@ Gid_t getegid (void); # define DEBUG_q_TEST (0) # define DEBUG_M_TEST (0) # define DEBUG_B_TEST (0) +# define DEBUG_L_TEST (0) # define DEBUG_Xv_TEST (0) # define DEBUG_Uv_TEST (0) # define DEBUG_Pv_TEST (0) @@ -3873,6 +3790,7 @@ Gid_t getegid (void); # define DEBUG_q(a) # define DEBUG_M(a) # define DEBUG_B(a) +# define DEBUG_L(a) # define DEBUG_Xv(a) # define DEBUG_Uv(a) # define DEBUG_Pv(a) @@ -4105,7 +4023,7 @@ typedef Sighandler_t Sigsave_t; # define RUNOPS_DEFAULT Perl_runops_standard #endif -#ifdef USE_PERLIO +#if defined(USE_PERLIO) EXTERN_C void PerlIO_teardown(void); # ifdef USE_ITHREADS # define PERLIO_INIT MUTEX_INIT(&PL_perlio_mutex) @@ -4150,28 +4068,52 @@ EXTERN_C void PerlIO_teardown(void); struct perl_memory_debug_header; struct perl_memory_debug_header { tTHX interpreter; -# ifdef PERL_POISON +# if defined(PERL_POISON) || defined(PERL_DEBUG_READONLY_COW) MEM_SIZE size; # endif struct perl_memory_debug_header *prev; struct perl_memory_debug_header *next; +# ifdef PERL_DEBUG_READONLY_COW + bool readonly; +# endif +}; + +#elif defined(PERL_DEBUG_READONLY_COW) + +struct perl_memory_debug_header; +struct perl_memory_debug_header { + MEM_SIZE size; }; -# define sTHX (sizeof(struct perl_memory_debug_header) + \ +#endif + +#if defined (PERL_TRACK_MEMPOOL) || defined (PERL_DEBUG_READONLY_COW) + +# define PERL_MEMORY_DEBUG_HEADER_SIZE \ + (sizeof(struct perl_memory_debug_header) + \ (MEM_ALIGNBYTES - sizeof(struct perl_memory_debug_header) \ %MEM_ALIGNBYTES) % MEM_ALIGNBYTES) #else -# define sTHX 0 +# define PERL_MEMORY_DEBUG_HEADER_SIZE 0 #endif #ifdef PERL_TRACK_MEMPOOL +# ifdef PERL_DEBUG_READONLY_COW # define INIT_TRACK_MEMPOOL(header, interp) \ STMT_START { \ (header).interpreter = (interp); \ (header).prev = (header).next = &(header); \ + (header).readonly = 0; \ } STMT_END -# else +# else +# define INIT_TRACK_MEMPOOL(header, interp) \ + STMT_START { \ + (header).interpreter = (interp); \ + (header).prev = (header).next = &(header); \ + } STMT_END +# endif +# else # define INIT_TRACK_MEMPOOL(header, interp) #endif @@ -4183,10 +4125,10 @@ struct perl_memory_debug_header { #ifdef MYMALLOC # define Perl_safesysmalloc_size(where) Perl_malloced_size(where) #else -# ifdef HAS_MALLOC_SIZE +# if defined(HAS_MALLOC_SIZE) && !defined(PERL_DEBUG_READONLY_COW) # ifdef PERL_TRACK_MEMPOOL # define Perl_safesysmalloc_size(where) \ - (malloc_size(((char *)(where)) - sTHX) - sTHX) + (malloc_size(((char *)(where)) - PERL_MEMORY_DEBUG_HEADER_SIZE) - PERL_MEMORY_DEBUG_HEADER_SIZE) # else # define Perl_safesysmalloc_size(where) malloc_size(where) # endif @@ -4194,7 +4136,7 @@ struct perl_memory_debug_header { # ifdef HAS_MALLOC_GOOD_SIZE # ifdef PERL_TRACK_MEMPOOL # define Perl_malloc_good_size(how_much) \ - (malloc_good_size((how_much) + sTHX) - sTHX) + (malloc_good_size((how_much) + PERL_MEMORY_DEBUG_HEADER_SIZE) - PERL_MEMORY_DEBUG_HEADER_SIZE) # else # define Perl_malloc_good_size(how_much) malloc_good_size(how_much) # endif @@ -4228,9 +4170,8 @@ EXT char *** environ_pointer; /* VMS and some other platforms don't use the environ array */ # ifdef USE_ENVIRON_ARRAY # if !defined(DONT_DECLARE_STD) || \ - (defined(__svr4__) && defined(__GNUC__) && defined(sun)) || \ - defined(__sgi) || \ - defined(__DGUX) + (defined(__svr4__) && defined(__GNUC__) && defined(__sun)) || \ + defined(__sgi) extern char ** environ; /* environment variables supplied via exec */ # endif # endif @@ -4254,7 +4195,7 @@ START_EXTERN_C EXTCONST char PL_warn_uninit[] INIT("Use of uninitialized value%s%s%s"); EXTCONST char PL_warn_uninit_sv[] - INIT("Use of uninitialized value%"SVf"%s%s"); + INIT("Use of uninitialized value%" SVf "%s%s"); EXTCONST char PL_warn_nosemi[] INIT("Semicolon seems to be missing"); EXTCONST char PL_warn_reserved[] @@ -4274,7 +4215,7 @@ EXTCONST char PL_no_usym[] EXTCONST char PL_no_aelem[] INIT("Modification of non-creatable array value attempted, subscript %d"); EXTCONST char PL_no_helem_sv[] - INIT("Modification of non-creatable hash value attempted, subscript \"%"SVf"\""); + INIT("Modification of non-creatable hash value attempted, subscript \"%" SVf "\""); EXTCONST char PL_no_modify[] INIT("Modification of a read-only value attempted"); EXTCONST char PL_no_mem[sizeof("Out of memory!\n")] @@ -4438,7 +4379,6 @@ EXTCONST unsigned char PL_fold_latin1[] = { 248-32, 249-32, 250-32, 251-32, 252-32, 253-32, 254-32, 255 /* y with diaeresis */ }; -#endif /* !EBCDIC, but still in DOINIT */ /* If these tables are accessed through ebcdic, the access will be converted to * latin1 first */ @@ -4513,13 +4453,14 @@ EXTCONST unsigned char PL_mod_latin1_uc[] = { 240-32, 241-32, 242-32, 243-32, 244-32, 245-32, 246-32, 247, 248-32, 249-32, 250-32, 251-32, 252-32, 253-32, 254-32, 255 }; +#endif /* !EBCDIC, but still in DOINIT */ #else /* ! DOINIT */ -#ifndef EBCDIC +# ifndef EBCDIC EXTCONST unsigned char PL_fold[]; EXTCONST unsigned char PL_fold_latin1[]; -#endif EXTCONST unsigned char PL_mod_latin1_uc[]; EXTCONST unsigned char PL_latin1_lc[]; +# endif #endif #ifndef PERL_GLOBAL_STRUCT /* or perlvars.h */ @@ -4674,9 +4615,6 @@ EXTCONST char PL_bincompat_options[] = # ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP " DEBUG_LEAKING_SCALARS_FORK_DUMP" # endif -# ifdef FAKE_THREADS - " FAKE_THREADS" -# endif # ifdef FCRYPT " FCRYPT" # endif @@ -4695,12 +4633,18 @@ EXTCONST char PL_bincompat_options[] = # ifdef PERLIO_LAYERS " PERLIO_LAYERS" # endif +# ifdef PERL_DEBUG_READONLY_COW + " PERL_DEBUG_READONLY_COW" +# endif # ifdef PERL_DEBUG_READONLY_OPS " PERL_DEBUG_READONLY_OPS" # endif # ifdef PERL_GLOBAL_STRUCT " PERL_GLOBAL_STRUCT" # endif +# ifdef PERL_GLOBAL_STRUCT_PRIVATE + " PERL_GLOBAL_STRUCT_PRIVATE" +# endif # ifdef PERL_IMPLICIT_CONTEXT " PERL_IMPLICIT_CONTEXT" # endif @@ -4722,9 +4666,6 @@ EXTCONST char PL_bincompat_options[] = # ifdef PERL_OLD_COPY_ON_WRITE " PERL_OLD_COPY_ON_WRITE" # endif -# ifdef PERL_NEW_COPY_ON_WRITE - " PERL_NEW_COPY_ON_WRITE" -# endif # ifdef PERL_POISON " PERL_POISON" # endif @@ -4767,9 +4708,6 @@ EXTCONST char PL_bincompat_options[] = # ifdef USE_REENTRANT_API " USE_REENTRANT_API" # endif -# ifdef USE_SFIO - " USE_SFIO" -# endif # ifdef USE_SOCKS " USE_SOCKS" # endif @@ -4828,6 +4766,8 @@ EXTCONST char *const PL_phase_names[]; # define PL_amagic_generation PL_na #endif /* !PERL_CORE */ +#define PL_hints PL_compiling.cop_hints + END_EXTERN_C /*****************************************************************************/ @@ -4856,13 +4796,17 @@ typedef enum { XATTRBLOCK, XATTRTERM, XTERMBLOCK, + XPOSTDEREF, XTERMORDORDOR /* evil hack */ /* update exp_name[] in toke.c if adding to this enum */ } expectation; /* Hints are now stored in a dedicated U32, so the bottom 8 bits are no longer special and there is no need for HINT_PRIVATE_MASK for COPs - However, bitops store HINT_INTEGER in their op_private. */ + However, bitops store HINT_INTEGER in their op_private. + + NOTE: The typical module using these has the bit value hard-coded, so don't + blindly change the values of these */ #define HINT_INTEGER 0x00000001 /* integer pragma */ #define HINT_STRICT_REFS 0x00000002 /* strict pragma */ #define HINT_LOCALE 0x00000004 /* locale pragma */ @@ -5214,19 +5158,19 @@ EXTCONST U8 PL_magic_data[256]; #endif #ifdef DOINIT - /* NL BD IV NV PV PI PN MG RX GV LV AV HV CV FM IO */ + /* NL IV NV PV INV PI PN MG RX GV LV AV HV CV FM IO */ EXTCONST bool -PL_valid_types_IVX[] = { 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 }; +PL_valid_types_IVX[] = { 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 }; EXTCONST bool -PL_valid_types_NVX[] = { 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 }; +PL_valid_types_NVX[] = { 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0 }; EXTCONST bool -PL_valid_types_PVX[] = { 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1 }; +PL_valid_types_PVX[] = { 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1 }; EXTCONST bool -PL_valid_types_RV[] = { 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1 }; +PL_valid_types_RV[] = { 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1 }; EXTCONST bool -PL_valid_types_IV_set[] = { 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1 }; +PL_valid_types_IV_set[] = { 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1 }; EXTCONST bool -PL_valid_types_NV_set[] = { 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; +PL_valid_types_NV_set[] = { 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; #else @@ -5352,25 +5296,39 @@ typedef struct am_table_short AMTS; #define PERLDB_SAVESRC_NOSUBS (PL_perldb && (PL_perldb & PERLDBf_SAVESRC_NOSUBS)) #define PERLDB_SAVESRC_INVALID (PL_perldb && (PL_perldb & PERLDBf_SAVESRC_INVALID)) -#ifdef USE_LOCALE_NUMERIC +/* -#define SET_NUMERIC_STANDARD() \ - set_numeric_standard(); +=head1 Locale-related functions and macros -#define SET_NUMERIC_LOCAL() \ - set_numeric_local(); +=for apidoc sync_locale + +Changing the program's locale should be avoided by XS code. Nevertheless, +certain non-Perl libraries called from XS, such as C<Gtk> do so. When this +happens, Perl needs to be told that the locale has changed. Use this macro +to do so, before returning to Perl code. + +=cut +*/ -/* Returns non-zero If the plain locale pragma without a parameter is in effect +/* Temporary for maint. Is a function in 5.21 */ +#define sync_locale() (new_ctype(setlocale(LC_CTYPE, NULL)), \ + new_collate(setlocale(LC_COLLATE, NULL)), \ + set_numeric_local(), \ + new_numeric(setlocale(LC_NUMERIC, NULL))) + +#ifdef USE_LOCALE_NUMERIC + +/* Returns TRUE if the plain locale pragma without a parameter is in effect */ -#define IN_LOCALE_RUNTIME (CopHINTS_get(PL_curcop) & HINT_LOCALE) +#define IN_LOCALE_RUNTIME cBOOL(CopHINTS_get(PL_curcop) & HINT_LOCALE) -/* Returns non-zero If either form of the locale pragma is in effect */ +/* Returns TRUE if either form of the locale pragma is in effect */ #define IN_SOME_LOCALE_FORM_RUNTIME \ - (CopHINTS_get(PL_curcop) & (HINT_LOCALE|HINT_LOCALE_NOT_CHARS)) + cBOOL(CopHINTS_get(PL_curcop) & (HINT_LOCALE|HINT_LOCALE_NOT_CHARS)) -#define IN_LOCALE_COMPILETIME (PL_hints & HINT_LOCALE) +#define IN_LOCALE_COMPILETIME cBOOL(PL_hints & HINT_LOCALE) #define IN_SOME_LOCALE_FORM_COMPILETIME \ - (PL_hints & (HINT_LOCALE|HINT_LOCALE_NOT_CHARS)) + cBOOL(PL_hints & (HINT_LOCALE|HINT_LOCALE_NOT_CHARS)) #define IN_LOCALE \ (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME) @@ -5378,12 +5336,68 @@ typedef struct am_table_short AMTS; (IN_PERL_COMPILETIME ? IN_SOME_LOCALE_FORM_COMPILETIME \ : IN_SOME_LOCALE_FORM_RUNTIME) +/* These macros are for toggling between the underlying locale (LOCAL) and the + * C locale. */ + +/* The first set makes sure that the locale is set to C unless within a 'use + * locale's scope; otherwise to the default locale. A function pointer is + * used, which can be declared separately by + * DECLARATION_FOR_STORE_LC_NUMERIC_SET_TO_NEEDED, followed by the actual + * setting (using STORE_LC_NUMERIC_SET_TO_NEEDED()), or the two can be combined + * into one call DECLARE_STORE_LC_NUMERIC_SET_TO_NEEDED(). + * RESTORE_LC_NUMERIC() in all cases restores the locale to what it was before + * these were called */ + +#define DECLARATION_FOR_STORE_LC_NUMERIC_SET_TO_NEEDED \ + void (*_restore_LC_NUMERIC_function)(pTHX) = NULL; + +#define STORE_LC_NUMERIC_SET_TO_NEEDED() \ + if (IN_SOME_LOCALE_FORM) { \ + if (! PL_numeric_local) { \ + SET_NUMERIC_LOCAL(); \ + _restore_LC_NUMERIC_function = &Perl_set_numeric_standard; \ + } \ + } \ + else { \ + if (! PL_numeric_standard) { \ + SET_NUMERIC_STANDARD(); \ + _restore_LC_NUMERIC_function = &Perl_set_numeric_local; \ + } \ + } + +#define DECLARE_STORE_LC_NUMERIC_SET_TO_NEEDED() \ + DECLARATION_FOR_STORE_LC_NUMERIC_SET_TO_NEEDED; \ + STORE_LC_NUMERIC_SET_TO_NEEDED(); + +#define RESTORE_LC_NUMERIC() \ + if (_restore_LC_NUMERIC_function) { \ + _restore_LC_NUMERIC_function(aTHX); \ + } + +/* The next two macros set unconditionally. These should be rarely used, and + * only after being sure that this is what is needed */ +#define SET_NUMERIC_STANDARD() \ + set_numeric_standard(); + +#define SET_NUMERIC_LOCAL() \ + set_numeric_local(); + +/* The rest of these LC_NUMERIC macros toggle to one or the other state, with + * the RESTORE_foo ones called to switch back, but only if need be */ #define STORE_NUMERIC_LOCAL_SET_STANDARD() \ - bool was_local = PL_numeric_local && IN_LOCALE; \ + bool was_local = PL_numeric_local; \ if (was_local) SET_NUMERIC_STANDARD(); +/* Doesn't change to underlying locale unless within the scope of some form of + * 'use locale'. This is the usual desired behavior. */ #define STORE_NUMERIC_STANDARD_SET_LOCAL() \ - bool was_standard = PL_numeric_standard && IN_LOCALE; \ + bool was_standard = PL_numeric_standard && IN_SOME_LOCALE_FORM; \ + if (was_standard) SET_NUMERIC_LOCAL(); + +/* Rarely, we want to change to the underlying locale even outside of 'use + * locale'. This is principally in the POSIX:: functions */ +#define STORE_NUMERIC_STANDARD_FORCE_LOCAL() \ + bool was_standard = PL_numeric_standard; \ if (was_standard) SET_NUMERIC_LOCAL(); #define RESTORE_NUMERIC_LOCAL() \ @@ -5401,8 +5415,14 @@ typedef struct am_table_short AMTS; #define IS_NUMERIC_RADIX(a, b) (0) #define STORE_NUMERIC_LOCAL_SET_STANDARD() /**/ #define STORE_NUMERIC_STANDARD_SET_LOCAL() /**/ +#define STORE_NUMERIC_STANDARD_FORCE_LOCAL() #define RESTORE_NUMERIC_LOCAL() /**/ #define RESTORE_NUMERIC_STANDARD() /**/ +#define DECLARATION_FOR_STORE_LC_NUMERIC_SET_TO_NEEDED +#define STORE_LC_NUMERIC_SET_TO_NEEDED() +#define DECLARE_STORE_LC_NUMERIC_SET_TO_NEEDED() +#define RESTORE_LC_NUMERIC() + #define Atof my_atof #define IN_LOCALE_RUNTIME 0 #define IN_LOCALE_COMPILETIME 0 @@ -5508,7 +5528,7 @@ typedef struct am_table_short AMTS; #ifndef PERL_MICRO # ifndef PERL_ASYNC_CHECK -# define PERL_ASYNC_CHECK() if (PL_sig_pending) PL_signalhook(aTHX) +# define PERL_ASYNC_CHECK() if (UNLIKELY(PL_sig_pending)) PL_signalhook(aTHX) # endif #endif @@ -5827,6 +5847,12 @@ extern void moncontrol(int); # define do_aexec(really, mark,sp) do_aexec5(really, mark, sp, 0, 0) #endif +/* check embedded \0 characters in pathnames passed to syscalls, + but allow one ending \0 */ +#define IS_SAFE_SYSCALL(p, len, what, op_name) (S_is_safe_syscall(aTHX_ (p), (len), (what), (op_name))) + +#define IS_SAFE_PATHNAME(p, len, op_name) IS_SAFE_SYSCALL((p), (len), "pathname", (op_name)) + #if defined(OEMVS) #define NO_ENV_ARRAY_IN_MAIN #endif @@ -5855,6 +5881,8 @@ extern void moncontrol(int); #define PERL_PV_ESCAPE_NOCLEAR 0x4000 #define PERL_PV_ESCAPE_RE 0x8000 +#define PERL_PV_ESCAPE_DWIM 0x10000 + #define PERL_PV_PRETTY_NOCLEAR PERL_PV_ESCAPE_NOCLEAR /* used by pv_display in dump.c*/ diff --git a/Master/tlpkg/tlperl/lib/CORE/perlio.h b/Master/tlpkg/tlperl/lib/CORE/perlio.h index 7b5adbd3458..777c886f3f3 100644 --- a/Master/tlpkg/tlperl/lib/CORE/perlio.h +++ b/Master/tlpkg/tlperl/lib/CORE/perlio.h @@ -21,13 +21,7 @@ USE_PERLIO - The primary Configure variable that enables PerlIO. If USE_PERLIO is _NOT_ set then USE_STDIO above will be set to be conservative. - If USE_PERLIO is set - then there are two modes determined by USE_SFIO: - - USE_SFIO - If set causes PerlIO_xxx() to be #define-d onto sfio functions. - A backward compatibility mode for some specialist applications. - - If USE_SFIO is not set then PerlIO_xxx() are real functions + PerlIO_xxx() are real functions defined in perlio.c which implement extra functionality required for utf8 support. @@ -80,11 +74,6 @@ #ifdef PERLIO_IS_STDIO /* #define PerlIO_xxxx() as equivalent stdio function */ #include "perlsdio.h" -#else /* PERLIO_IS_STDIO */ -#ifdef USE_SFIO -/* #define PerlIO_xxxx() as equivalent sfio function */ -#include "perlsfio.h" -#endif /* USE_SFIO */ #endif /* PERLIO_IS_STDIO */ #ifndef PerlIO @@ -132,19 +121,19 @@ PERL_EXPORT_C void PerlIO_clone(pTHX_ PerlInterpreter *proto, * can set how it wants. */ -#ifdef PERL_CORE +# ifdef PERL_CORE /* Make a choice for perl core code - currently this is set to try and catch lingering raw stdio calls. This is a known issue with some non UNIX ports which still use "native" stdio features. */ -#ifndef PERLIO_NOT_STDIO -#define PERLIO_NOT_STDIO 1 -#endif -#else -#ifndef PERLIO_NOT_STDIO -#define PERLIO_NOT_STDIO 0 -#endif +# ifndef PERLIO_NOT_STDIO +# define PERLIO_NOT_STDIO 1 +# endif + #else +# ifndef PERLIO_NOT_STDIO +# define PERLIO_NOT_STDIO 0 +# endif #endif #ifdef PERLIO_NOT_STDIO @@ -281,10 +270,6 @@ PERL_EXPORT_C void PerlIO_setlinebuf(PerlIO *); PERL_EXPORT_C int PerlIO_printf(PerlIO *, const char *, ...) __attribute__format__(__printf__, 2, 3); #endif -#ifndef PerlIO_sprintf -PERL_EXPORT_C int PerlIO_sprintf(char *, int, const char *, ...) - __attribute__format__(__printf__, 3, 4); -#endif #ifndef PerlIO_vprintf PERL_EXPORT_C int PerlIO_vprintf(PerlIO *, const char *, va_list); #endif @@ -313,19 +298,19 @@ PERL_EXPORT_C int PerlIO_canset_cnt(PerlIO *); PERL_EXPORT_C STDCHAR *PerlIO_get_ptr(PerlIO *); #endif #ifndef PerlIO_get_cnt -PERL_EXPORT_C int PerlIO_get_cnt(PerlIO *); +PERL_EXPORT_C SSize_t PerlIO_get_cnt(PerlIO *); #endif #ifndef PerlIO_set_cnt -PERL_EXPORT_C void PerlIO_set_cnt(PerlIO *, int); +PERL_EXPORT_C void PerlIO_set_cnt(PerlIO *, SSize_t); #endif #ifndef PerlIO_set_ptrcnt -PERL_EXPORT_C void PerlIO_set_ptrcnt(PerlIO *, STDCHAR *, int); +PERL_EXPORT_C void PerlIO_set_ptrcnt(PerlIO *, STDCHAR *, SSize_t); #endif #ifndef PerlIO_get_base PERL_EXPORT_C STDCHAR *PerlIO_get_base(PerlIO *); #endif #ifndef PerlIO_get_bufsiz -PERL_EXPORT_C int PerlIO_get_bufsiz(PerlIO *); +PERL_EXPORT_C SSize_t PerlIO_get_bufsiz(PerlIO *); #endif #ifndef PerlIO_tmpfile PERL_EXPORT_C PerlIO *PerlIO_tmpfile(void); diff --git a/Master/tlpkg/tlperl/lib/CORE/perliol.h b/Master/tlpkg/tlperl/lib/CORE/perliol.h index c667f1f5ebc..236932616df 100644 --- a/Master/tlpkg/tlperl/lib/CORE/perliol.h +++ b/Master/tlpkg/tlperl/lib/CORE/perliol.h @@ -158,8 +158,6 @@ PERL_EXPORT_C PerlIO_list_t * PerlIO_resolve_layers(pTHX_ const char *layers, co PERL_EXPORT_C PerlIO_funcs * PerlIO_default_layer(pTHX_ I32 n); PERL_EXPORT_C PerlIO_list_t * PerlIO_default_layers(pTHX); PERL_EXPORT_C PerlIO * PerlIO_reopen(const char *path, const char *mode, PerlIO *f); -PERL_EXPORT_C int PerlIO_vsprintf(char *s, int n, const char *fmt, va_list ap) - __attribute__format__(__printf__,3,0); PERL_EXPORT_C PerlIO_list_t *PerlIO_list_alloc(pTHX); PERL_EXPORT_C PerlIO_list_t *PerlIO_clone_list(pTHX_ PerlIO_list_t *proto, CLONE_PARAMS *param); @@ -217,7 +215,6 @@ PERL_EXPORT_C SSize_t PerlIOCrlf_get_cnt(pTHX_ PerlIO *f); PERL_EXPORT_C IV PerlIOCrlf_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab); PERL_EXPORT_C void PerlIOCrlf_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR * ptr, SSize_t cnt); PERL_EXPORT_C SSize_t PerlIOCrlf_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count); -PERL_EXPORT_C SSize_t PerlIOCrlf_unread(pTHX_ PerlIO *f, const void *vbuf, Size_t count); PERL_EXPORT_C SSize_t PerlIOCrlf_write(pTHX_ PerlIO *f, const void *vbuf, Size_t count); /* Pending */ @@ -242,9 +239,17 @@ PERL_EXPORT_C PerlIO * PerlIOStdio_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS PERL_EXPORT_C IV PerlIOStdio_eof(pTHX_ PerlIO *f); PERL_EXPORT_C IV PerlIOStdio_error(pTHX_ PerlIO *f); PERL_EXPORT_C IV PerlIOStdio_fileno(pTHX_ PerlIO *f); +#ifdef USE_STDIO_PTR +PERL_EXPORT_C STDCHAR * PerlIOStdio_get_ptr(pTHX_ PerlIO *f); +PERL_EXPORT_C SSize_t PerlIOStdio_get_cnt(pTHX_ PerlIO *f); +PERL_EXPORT_C void PerlIOStdio_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR * ptr, SSize_t cnt); +#endif PERL_EXPORT_C IV PerlIOStdio_fill(pTHX_ PerlIO *f); PERL_EXPORT_C IV PerlIOStdio_flush(pTHX_ PerlIO *f); +#ifdef FILE_base PERL_EXPORT_C STDCHAR * PerlIOStdio_get_base(pTHX_ PerlIO *f); +PERL_EXPORT_C Size_t PerlIOStdio_get_bufsiz(pTHX_ PerlIO *f); +#endif PERL_EXPORT_C char * PerlIOStdio_mode(const char *mode, char *tmode); PERL_EXPORT_C PerlIO * PerlIOStdio_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers, IV n, const char *mode, int fd, int imode, int perm, PerlIO *f, int narg, SV **args); PERL_EXPORT_C IV PerlIOStdio_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab); diff --git a/Master/tlpkg/tlperl/lib/CORE/perlsfio.h b/Master/tlpkg/tlperl/lib/CORE/perlsfio.h deleted file mode 100644 index 66ec10fdbd7..00000000000 --- a/Master/tlpkg/tlperl/lib/CORE/perlsfio.h +++ /dev/null @@ -1,84 +0,0 @@ -/* perlsfio.h - * - * Copyright (C) 1996, 1999, 2000, 2001, 2002, 2003, 2005, 2007, - * by Larry Wall and others - * - * You may distribute under the terms of either the GNU General Public - * License or the Artistic License, as specified in the README file. - * - */ - -/* The next #ifdef should be redundant if Configure behaves ... */ -#ifndef FILE -#define FILE FILE -#endif -#ifdef I_SFIO -#include <sfio.h> -#endif - -/* sfio 2000 changed _stdopen to _stdfdopen */ -#if SFIO_VERSION >= 20000101L -#define _stdopen _stdfdopen -#endif - -extern Sfio_t* _stdopen _ARG_((int, const char*)); -extern int _stdprintf _ARG_((const char*, ...)); - -#define PerlIO Sfio_t -#define PerlIO_stderr() sfstderr -#define PerlIO_stdout() sfstdout -#define PerlIO_stdin() sfstdin - -#define PerlIO_isutf8(f) 0 - -#define PerlIO_printf sfprintf -#define PerlIO_stdoutf _stdprintf -#define PerlIO_vprintf(f,fmt,a) sfvprintf(f,fmt,a) -#define PerlIO_read(f,buf,count) sfread(f,buf,count) -#define PerlIO_write(f,buf,count) sfwrite(f,buf,count) -#define PerlIO_open(path,mode) sfopen(NULL,path,mode) -#define PerlIO_fdopen(fd,mode) _stdopen(fd,mode) -#define PerlIO_reopen(path,mode,f) sfopen(f,path,mode) -#define PerlIO_close(f) sfclose(f) -#define PerlIO_puts(f,s) sfputr(f,s,-1) -#define PerlIO_putc(f,c) sfputc(f,c) -#define PerlIO_ungetc(f,c) sfungetc(f,c) -#define PerlIO_sprintf sfsprintf -#define PerlIO_getc(f) sfgetc(f) -#define PerlIO_eof(f) sfeof(f) -#define PerlIO_error(f) sferror(f) -#define PerlIO_fileno(f) sffileno(f) -#define PerlIO_clearerr(f) sfclrerr(f) -#define PerlIO_flush(f) sfsync(f) -#define PerlIO_tell(f) sftell(f) -#define PerlIO_seek(f,o,w) sfseek(f,o,w) -#define PerlIO_rewind(f) (void) sfseek((f),0L,0) -#define PerlIO_tmpfile() sftmp(0) -#define PerlIO_exportFILE(f,fl) Perl_croak(aTHX_ "Export to FILE * unimplemented") -#define PerlIO_releaseFILE(p,f) Perl_croak(aTHX_ "Release of FILE * unimplemented") - -#define PerlIO_setlinebuf(f) sfset(f,SF_LINE,1) - -/* Now our interface to equivalent of Configure's FILE_xxx macros */ - -#define PerlIO_has_cntptr(f) 1 -#define PerlIO_get_ptr(f) ((f)->next) -#define PerlIO_get_cnt(f) ((f)->endr - (f)->next) -#define PerlIO_canset_cnt(f) 1 -#define PerlIO_fast_gets(f) 1 -#define PerlIO_set_ptrcnt(f,p,c) STMT_START {(f)->next = (unsigned char *)(p); assert(PerlIO_get_cnt(f) == (c));} STMT_END -#define PerlIO_set_cnt(f,c) STMT_START {(f)->next = (f)->endr - (c);} STMT_END - -#define PerlIO_has_base(f) 1 -#define PerlIO_get_base(f) ((f)->data) -#define PerlIO_get_bufsiz(f) ((f)->endr - (f)->data) - -/* - * Local variables: - * c-indentation-style: bsd - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - * - * ex: set ts=8 sts=4 sw=4 et: - */ diff --git a/Master/tlpkg/tlperl/lib/CORE/perlvars.h b/Master/tlpkg/tlperl/lib/CORE/perlvars.h index 96dfe04c26a..7bafa40882f 100644 --- a/Master/tlpkg/tlperl/lib/CORE/perlvars.h +++ b/Master/tlpkg/tlperl/lib/CORE/perlvars.h @@ -32,7 +32,7 @@ all interpreters and all threads in a process. #if defined(USE_ITHREADS) PERLVAR(G, op_mutex, perl_mutex) /* Mutex for op refcounting */ #endif -PERLVAR(G, curinterp, PerlInterpreter *) +PERLVARI(G, curinterp, PerlInterpreter *, NULL) /* currently running interpreter * (initial parent interpreter under * useithreads) */ @@ -97,7 +97,7 @@ PERLVAR(G, hints_mutex, perl_mutex) /* Mutex for refcounted he refcounting */ #endif #ifdef DEBUGGING -PERLVAR(G, watch_pvx, char *) +PERLVARI(G, watch_pvx, char *, NULL) #endif /* @@ -217,7 +217,7 @@ the Perl core) will normally return C<KEYWORD_PLUGIN_DECLINE>. PERLVARI(G, keyword_plugin, Perl_keyword_plugin_t, Perl_keyword_plugin_standard) -PERLVAR(G, op_sequence, HV *) /* dump.c */ +PERLVARI(G, op_sequence, HV *, NULL) /* dump.c */ PERLVARI(G, op_seq, UV, 0) /* dump.c */ #ifdef USE_ITHREADS @@ -225,7 +225,10 @@ PERLVAR(G, dollarzero_mutex, perl_mutex) /* Modifying $0 */ #endif /* Restricted hashes placeholder value. - * The contents are never used, only the address. */ + In theory, the contents are never used, only the address. + In practice, &PL_sv_placeholder is returned by some APIs, and the calling + code is checking SvOK(). */ + PERLVAR(G, sv_placeholder, SV) #if defined(MYMALLOC) && defined(USE_ITHREADS) diff --git a/Master/tlpkg/tlperl/lib/CORE/perly.h b/Master/tlpkg/tlperl/lib/CORE/perly.h index 6f1d6b95db5..e6426df92ad 100644 --- a/Master/tlpkg/tlperl/lib/CORE/perly.h +++ b/Master/tlpkg/tlperl/lib/CORE/perly.h @@ -5,11 +5,11 @@ */ #ifdef PERL_CORE -/* A Bison parser, made by GNU Bison 2.6.1. */ +/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,13 +37,6 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif /* Tokens. */ #ifndef YYTOKENTYPE @@ -125,12 +118,13 @@ extern int yydebug; REFGEN = 329, UMINUS = 330, POWOP = 331, - POSTDEC = 332, - POSTINC = 333, - PREDEC = 334, - PREINC = 335, - ARROW = 336, - PEG = 337 + POSTJOIN = 332, + POSTDEC = 333, + POSTINC = 334, + PREDEC = 335, + PREINC = 336, + ARROW = 337, + PEG = 338 }; #endif @@ -209,12 +203,14 @@ extern int yydebug; #define REFGEN 329 #define UMINUS 330 #define POWOP 331 -#define POSTDEC 332 -#define POSTINC 333 -#define PREDEC 334 -#define PREINC 335 -#define ARROW 336 -#define PEG 337 +#define POSTJOIN 332 +#define POSTDEC 333 +#define POSTINC 334 +#define PREDEC 335 +#define PREINC 336 +#define ARROW 337 +#define PEG 338 + #ifdef PERL_IN_TOKE_C @@ -243,7 +239,8 @@ S_is_opval_token(int type) { #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { -/* Line 2049 of yacc.c */ + +/* Line 2068 of yacc.c */ I32 ival; /* __DEFAULT__ (marker for regen_perly.pl; must always be 1st union member) */ @@ -262,7 +259,8 @@ typedef union YYSTYPE #endif -/* Line 2049 of yacc.c */ + +/* Line 2068 of yacc.c */ } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -270,22 +268,10 @@ typedef union YYSTYPE #endif -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ + /* Generated from: - * 28c2c7738eefc00762e227af0363c729186c992e9127e0c935684cccbf3a3b4f perly.y + * bb8245a1a537b2afb2445b3973f63b210f9ec346a1955071aef7d05ba97196ae perly.y * 5c9d2a0262457fe9b70073fc8ad6c188f812f38ad57712b7e2f53daa01b297cc regen_perly.pl * ex: set ro: */ diff --git a/Master/tlpkg/tlperl/lib/CORE/pp.h b/Master/tlpkg/tlperl/lib/CORE/pp.h index cb6a0668f94..97738c2d8d4 100644 --- a/Master/tlpkg/tlperl/lib/CORE/pp.h +++ b/Master/tlpkg/tlperl/lib/CORE/pp.h @@ -30,7 +30,7 @@ the C<SP> macro. See C<SP>. =for apidoc ms||djSP -Declare Just C<SP>. This is actually identical to C<dSP>, and declares +Declare Just C<SP>. This is actually identical to C<dSP>, and declares a local copy of perl's stack pointer, available via the C<SP> macro. See C<SP>. (Available for backward source code compatibility with the old (Perl 5.005) thread model.) @@ -57,7 +57,7 @@ Refetch the stack pointer. Used after a callback. See L<perlcall>. #define PUSHMARK(p) \ STMT_START { \ - if (++PL_markstack_ptr == PL_markstack_max) \ + if (UNLIKELY(++PL_markstack_ptr == PL_markstack_max)) \ markstack_grow(); \ *PL_markstack_ptr = (I32)((p) - PL_stack_base);\ } STMT_END @@ -133,10 +133,6 @@ Pops a long off the stack. #define POPu ((UV)SvUVx(POPs)) #define POPl ((long)SvIVx(POPs)) #define POPul ((unsigned long)SvIVx(POPs)) -#ifdef HAS_QUAD -#define POPq ((Quad_t)SvIVx(POPs)) -#define POPuq ((Uquad_t)SvUVx(POPs)) -#endif #define TOPs (*sp) #define TOPm1s (*(sp-1)) @@ -148,16 +144,12 @@ Pops a long off the stack. #define TOPu ((UV)SvUV(TOPs)) #define TOPl ((long)SvIV(TOPs)) #define TOPul ((unsigned long)SvUV(TOPs)) -#ifdef HAS_QUAD -#define TOPq ((Quad_t)SvIV(TOPs)) -#define TOPuq ((Uquad_t)SvUV(TOPs)) -#endif /* Go to some pains in the rare event that we must extend the stack. */ /* -=for apidoc Am|void|EXTEND|SP|int nitems -Used to extend the argument stack for an XSUB's return values. Once +=for apidoc Am|void|EXTEND|SP|SSize_t nitems +Used to extend the argument stack for an XSUB's return values. Once used, guarantees that there is room for at least C<nitems> to be pushed onto the stack. @@ -278,15 +270,25 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. =cut */ -#define EXTEND(p,n) (void)(UNLIKELY(PL_stack_max - p < (int)(n)) && \ - (sp = stack_grow(sp,p, (int) (n)))) +#ifdef STRESS_REALLOC +# define EXTEND(p,n) (void)(sp = stack_grow(sp,p, (SSize_t)(n))) +/* Same thing, but update mark register too. */ +# define MEXTEND(p,n) STMT_START { \ + const int markoff = mark - PL_stack_base; \ + sp = stack_grow(sp,p,(SSize_t) (n)); \ + mark = PL_stack_base + markoff; \ + } STMT_END +#else +# define EXTEND(p,n) (void)(UNLIKELY(PL_stack_max - p < (SSize_t)(n)) && \ + (sp = stack_grow(sp,p, (SSize_t) (n)))) /* Same thing, but update mark register too. */ -#define MEXTEND(p,n) STMT_START {if (UNLIKELY(PL_stack_max - p < (int)(n))) {\ +# define MEXTEND(p,n) STMT_START {if (UNLIKELY(PL_stack_max - p < (int)(n))) {\ const int markoff = mark - PL_stack_base; \ - sp = stack_grow(sp,p,(int) (n)); \ + sp = stack_grow(sp,p,(SSize_t) (n)); \ mark = PL_stack_base + markoff; \ } } STMT_END +#endif #define PUSHs(s) (*++sp = (s)) #define PUSHTARG STMT_START { SvSETMAGIC(TARG); PUSHs(TARG); } STMT_END @@ -333,12 +335,6 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. #define dPOPiv IV value = POPi #define dTOPuv UV value = TOPu #define dPOPuv UV value = POPu -#ifdef HAS_QUAD -#define dTOPqv Quad_t value = TOPu -#define dPOPqv Quad_t value = POPu -#define dTOPuqv Uquad_t value = TOPuq -#define dPOPuqv Uquad_t value = POPuq -#endif #define dPOPXssrl(X) SV *right = POPs; SV *left = CAT2(X,s) #define dPOPXnnrl(X) NV right = POPn; NV left = CAT2(X,n) @@ -404,12 +400,12 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. /* do SvGETMAGIC on the stack args before checking for overload */ #define tryAMAGICun_MG(method, flags) STMT_START { \ - if ( (SvFLAGS(TOPs) & (SVf_ROK|SVs_GMG)) \ + if ( UNLIKELY((SvFLAGS(TOPs) & (SVf_ROK|SVs_GMG))) \ && Perl_try_amagic_un(aTHX_ method, flags)) \ return NORMAL; \ } STMT_END #define tryAMAGICbin_MG(method, flags) STMT_START { \ - if ( ((SvFLAGS(TOPm1s)|SvFLAGS(TOPs)) & (SVf_ROK|SVs_GMG)) \ + if ( UNLIKELY(((SvFLAGS(TOPm1s)|SvFLAGS(TOPs)) & (SVf_ROK|SVs_GMG))) \ && Perl_try_amagic_bin(aTHX_ method, flags)) \ return NORMAL; \ } STMT_END @@ -426,19 +422,20 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>. SV *tmpsv; \ SV *arg= *sp; \ int gimme = GIMME_V; \ - if (SvAMAGIC(arg) && \ + if (UNLIKELY(SvAMAGIC(arg) && \ (tmpsv = amagic_call(arg, &PL_sv_undef, meth, \ AMGf_want_list | AMGf_noright \ - |AMGf_unary))) { \ + |AMGf_unary)))) \ + { \ SPAGAIN; \ if (gimme == G_VOID) { \ (void)POPs; /* XXX ??? */ \ } \ else if (gimme == G_ARRAY) { \ - int i; \ - I32 len; \ + SSize_t i; \ + SSize_t len; \ assert(SvTYPE(tmpsv) == SVt_PVAV); \ - len = av_len((AV *)tmpsv) + 1; \ + len = av_tindex((AV *)tmpsv) + 1; \ (void)POPs; /* get rid of the arg */ \ EXTEND(sp, len); \ for (i = 0; i < len; ++i) \ diff --git a/Master/tlpkg/tlperl/lib/CORE/pp_proto.h b/Master/tlpkg/tlperl/lib/CORE/pp_proto.h index a4dd46d5cc0..73ff532b5c8 100644 --- a/Master/tlpkg/tlperl/lib/CORE/pp_proto.h +++ b/Master/tlpkg/tlperl/lib/CORE/pp_proto.h @@ -123,6 +123,8 @@ PERL_CALLCONV OP *Perl_pp_introcv(pTHX); PERL_CALLCONV OP *Perl_pp_ioctl(pTHX); PERL_CALLCONV OP *Perl_pp_iter(pTHX); PERL_CALLCONV OP *Perl_pp_join(pTHX); +PERL_CALLCONV OP *Perl_pp_kvaslice(pTHX); +PERL_CALLCONV OP *Perl_pp_kvhslice(pTHX); PERL_CALLCONV OP *Perl_pp_last(pTHX); PERL_CALLCONV OP *Perl_pp_lc(pTHX); PERL_CALLCONV OP *Perl_pp_le(pTHX); diff --git a/Master/tlpkg/tlperl/lib/CORE/proto.h b/Master/tlpkg/tlperl/lib/CORE/proto.h index 607eef8cbac..6532ba8afa2 100644 --- a/Master/tlpkg/tlperl/lib/CORE/proto.h +++ b/Master/tlpkg/tlperl/lib/CORE/proto.h @@ -17,15 +17,22 @@ */ START_EXTERN_C +PERL_CALLCONV UV ASCII_TO_NEED(const UV enc, const UV ch) + __attribute__deprecated__ + __attribute__warn_unused_result__ + __attribute__pure__; + PERL_CALLCONV int Perl_Gv_AMupdate(pTHX_ HV* stash, bool destructing) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_GV_AMUPDATE \ assert(stash) -PERL_CALLCONV const char * Perl_PerlIO_context_layers(pTHX_ const char *mode); -PERL_CALLCONV_NO_RET void Perl_croak_memory_wrap(void) - __attribute__noreturn__; +PERL_CALLCONV UV NATIVE_TO_NEED(const UV enc, const UV ch) + __attribute__deprecated__ + __attribute__warn_unused_result__ + __attribute__pure__; +PERL_CALLCONV const char * Perl_PerlIO_context_layers(pTHX_ const char *mode); PERL_CALLCONV void* Perl_Slab_Alloc(pTHX_ size_t sz) __attribute__malloc__ __attribute__warn_unused_result__; @@ -68,31 +75,31 @@ PERL_CALLCONV bool Perl__is_utf8_perl_idstart(pTHX_ const U8 *p) #define PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART \ assert(p) -PERL_CALLCONV UV Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, const U8 flags) +PERL_CALLCONV UV Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, U8 flags) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT__TO_UNI_FOLD_FLAGS \ assert(p); assert(lenp) -PERL_CALLCONV UV Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags, bool* tainted_ptr) +PERL_CALLCONV UV Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT__TO_UTF8_FOLD_FLAGS \ assert(p); assert(ustrp) -PERL_CALLCONV UV Perl__to_utf8_lower_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr) +PERL_CALLCONV UV Perl__to_utf8_lower_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT__TO_UTF8_LOWER_FLAGS \ assert(p); assert(ustrp) -PERL_CALLCONV UV Perl__to_utf8_title_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr) +PERL_CALLCONV UV Perl__to_utf8_title_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT__TO_UTF8_TITLE_FLAGS \ assert(p); assert(ustrp) -PERL_CALLCONV UV Perl__to_utf8_upper_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr) +PERL_CALLCONV UV Perl__to_utf8_upper_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, bool flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS \ @@ -115,6 +122,11 @@ PERL_CALLCONV SV * Perl_amagic_deref_call(pTHX_ SV *ref, int method) assert(ref) PERL_CALLCONV bool Perl_amagic_is_enabled(pTHX_ int method); +PERL_STATIC_INLINE void S_append_utf8_from_native_byte(const U8 byte, U8** dest) + __attribute__nonnull__(2); +#define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE \ + assert(dest) + PERL_CALLCONV I32 Perl_apply(pTHX_ I32 type, SV** mark, SV** sp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); @@ -152,36 +164,36 @@ PERL_CALLCONV SV** Perl_av_create_and_unshift_one(pTHX_ AV **const avp, SV *cons #define PERL_ARGS_ASSERT_AV_CREATE_AND_UNSHIFT_ONE \ assert(avp); assert(val) -PERL_CALLCONV SV* Perl_av_delete(pTHX_ AV *av, I32 key, I32 flags) +PERL_CALLCONV SV* Perl_av_delete(pTHX_ AV *av, SSize_t key, I32 flags) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_DELETE \ assert(av) -PERL_CALLCONV bool Perl_av_exists(pTHX_ AV *av, I32 key) +PERL_CALLCONV bool Perl_av_exists(pTHX_ AV *av, SSize_t key) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_EXISTS \ assert(av) -PERL_CALLCONV void Perl_av_extend(pTHX_ AV *av, I32 key) +PERL_CALLCONV void Perl_av_extend(pTHX_ AV *av, SSize_t key) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_EXTEND \ assert(av) -PERL_CALLCONV void Perl_av_extend_guts(pTHX_ AV *av, I32 key, SSize_t *maxp, SV ***allocp, SV ***arrayp) +PERL_CALLCONV void Perl_av_extend_guts(pTHX_ AV *av, SSize_t key, SSize_t *maxp, SV ***allocp, SV ***arrayp) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4) __attribute__nonnull__(pTHX_5); #define PERL_ARGS_ASSERT_AV_EXTEND_GUTS \ assert(maxp); assert(allocp); assert(arrayp) -PERL_CALLCONV SV** Perl_av_fetch(pTHX_ AV *av, I32 key, I32 lval) +PERL_CALLCONV SV** Perl_av_fetch(pTHX_ AV *av, SSize_t key, I32 lval) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_FETCH \ assert(av) -PERL_CALLCONV void Perl_av_fill(pTHX_ AV *av, I32 fill) +PERL_CALLCONV void Perl_av_fill(pTHX_ AV *av, SSize_t fill) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_FILL \ assert(av) @@ -191,13 +203,13 @@ PERL_CALLCONV IV* Perl_av_iter_p(pTHX_ AV *av) #define PERL_ARGS_ASSERT_AV_ITER_P \ assert(av) -PERL_CALLCONV I32 Perl_av_len(pTHX_ AV *av) +PERL_CALLCONV SSize_t Perl_av_len(pTHX_ AV *av) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_LEN \ assert(av) -PERL_CALLCONV AV* Perl_av_make(pTHX_ I32 size, SV **strp) +PERL_CALLCONV AV* Perl_av_make(pTHX_ SSize_t size, SV **strp) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_AV_MAKE \ @@ -225,16 +237,16 @@ PERL_CALLCONV SV* Perl_av_shift(pTHX_ AV *av) #define PERL_ARGS_ASSERT_AV_SHIFT \ assert(av) -PERL_CALLCONV SV** Perl_av_store(pTHX_ AV *av, I32 key, SV *val) +PERL_CALLCONV SV** Perl_av_store(pTHX_ AV *av, SSize_t key, SV *val) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_STORE \ assert(av) -/* PERL_CALLCONV I32 Perl_av_tindex(pTHX_ AV *av) +/* PERL_CALLCONV SSize_t Perl_av_tindex(pTHX_ AV *av) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ -PERL_STATIC_INLINE I32 S_av_top_index(pTHX_ AV *av) +PERL_STATIC_INLINE SSize_t S_av_top_index(pTHX_ AV *av) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_TOP_INDEX \ @@ -245,7 +257,7 @@ PERL_CALLCONV void Perl_av_undef(pTHX_ AV *av) #define PERL_ARGS_ASSERT_AV_UNDEF \ assert(av) -PERL_CALLCONV void Perl_av_unshift(pTHX_ AV *av, I32 num) +PERL_CALLCONV void Perl_av_unshift(pTHX_ AV *av, SSize_t num) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_AV_UNSHIFT \ assert(av) @@ -353,6 +365,12 @@ PERL_CALLCONV OP * Perl_ck_anoncode(pTHX_ OP *o) #define PERL_ARGS_ASSERT_CK_ANONCODE \ assert(o) +PERL_CALLCONV OP * Perl_ck_backtick(pTHX_ OP *o) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_BACKTICK \ + assert(o) + PERL_CALLCONV OP * Perl_ck_bitop(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -383,12 +401,6 @@ PERL_CALLCONV OP * Perl_ck_delete(pTHX_ OP *o) #define PERL_ARGS_ASSERT_CK_DELETE \ assert(o) -PERL_CALLCONV OP * Perl_ck_die(pTHX_ OP *o) - __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_CK_DIE \ - assert(o) - PERL_CALLCONV OP * Perl_ck_each(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -445,12 +457,6 @@ PERL_CALLCONV OP * Perl_ck_exists(pTHX_ OP *o) #define PERL_ARGS_ASSERT_CK_EXISTS \ assert(o) -PERL_CALLCONV OP * Perl_ck_exit(pTHX_ OP *o) - __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_CK_EXIT \ - assert(o) - PERL_CALLCONV OP * Perl_ck_ftst(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -651,6 +657,11 @@ PERL_CALLCONV void Perl_ck_warner_d(pTHX_ U32 err, const char* pat, ...) PERL_CALLCONV bool Perl_ckwarn(pTHX_ U32 w); PERL_CALLCONV bool Perl_ckwarn_d(pTHX_ U32 w); +PERL_CALLCONV const COP* Perl_closest_cop(pTHX_ const COP *cop, const OP *o, const OP *curop, bool opnext) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CLOSEST_COP \ + assert(cop) + PERL_CALLCONV OP* Perl_convert(pTHX_ I32 optype, I32 flags, OP* o) __attribute__warn_unused_result__; @@ -680,6 +691,9 @@ PERL_CALLCONV_NO_RET void Perl_croak(pTHX_ const char* pat, ...) __attribute__noreturn__ __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2); +PERL_STATIC_NO_RET void S_croak_memory_wrap(void) + __attribute__noreturn__; + PERL_CALLCONV_NO_RET void Perl_croak_no_mem(void) __attribute__noreturn__; @@ -709,6 +723,12 @@ PERL_CALLCONV const char * Perl_custom_op_desc(pTHX_ const OP *o) #define PERL_ARGS_ASSERT_CUSTOM_OP_DESC \ assert(o) +PERL_CALLCONV XOPRETANY Perl_custom_op_get_field(pTHX_ const OP *o, const xop_flags_enum field) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CUSTOM_OP_GET_FIELD \ + assert(o) + PERL_CALLCONV const char * Perl_custom_op_name(pTHX_ const OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -721,11 +741,9 @@ PERL_CALLCONV void Perl_custom_op_register(pTHX_ Perl_ppaddr_t ppaddr, const XOP #define PERL_ARGS_ASSERT_CUSTOM_OP_REGISTER \ assert(ppaddr); assert(xop) -PERL_CALLCONV const XOP * Perl_custom_op_xop(pTHX_ const OP *o) +/* PERL_CALLCONV const XOP * Perl_custom_op_xop(pTHX_ const OP *o) __attribute__pure__ - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_CUSTOM_OP_XOP \ - assert(o) + __attribute__nonnull__(pTHX_1); */ PERL_CALLCONV void Perl_cv_ckproto_len_flags(pTHX_ const CV* cv, const GV* gv, const char* p, const STRLEN len, const U32 flags) __attribute__nonnull__(pTHX_1); @@ -746,6 +764,9 @@ PERL_CALLCONV CV* Perl_cv_clone_into(pTHX_ CV* proto, CV *target) PERL_CALLCONV SV* Perl_cv_const_sv(pTHX_ const CV *const cv) __attribute__warn_unused_result__; +PERL_CALLCONV SV* Perl_cv_const_sv_or_av(pTHX_ const CV *const cv) + __attribute__warn_unused_result__; + PERL_CALLCONV void Perl_cv_forget_slab(pTHX_ CV *cv) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_CV_FORGET_SLAB \ @@ -803,6 +824,12 @@ PERL_CALLCONV I32 Perl_debop(pTHX_ const OP* o) PERL_CALLCONV void Perl_debprofdump(pTHX); PERL_CALLCONV I32 Perl_debstack(pTHX); PERL_CALLCONV I32 Perl_debstackptrs(pTHX); +PERL_CALLCONV SV * Perl_defelem_target(pTHX_ SV *sv, MAGIC *mg) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_DEFELEM_TARGET \ + assert(sv) + PERL_CALLCONV void Perl_delete_eval_scope(pTHX); PERL_CALLCONV char* Perl_delimcpy(char* to, const char* toend, const char* from, const char* fromend, int delim, I32* retlen) __attribute__nonnull__(1) @@ -907,6 +934,12 @@ PERL_CALLCONV void Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) #define PERL_ARGS_ASSERT_DO_OPEN \ assert(gv); assert(name) +PERL_CALLCONV bool Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len, PerlIO *supplied_fp, SV **svp, U32 num) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_OPEN6 \ + assert(gv); assert(oname) + PERL_CALLCONV bool Perl_do_open9(pTHX_ GV *gv, const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, I32 num) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) @@ -914,6 +947,12 @@ PERL_CALLCONV bool Perl_do_open9(pTHX_ GV *gv, const char *name, I32 len, int as #define PERL_ARGS_ASSERT_DO_OPEN9 \ assert(gv); assert(name); assert(svs) +PERL_CALLCONV bool Perl_do_open_raw(pTHX_ GV *gv, const char *oname, STRLEN len, int rawmode, int rawperm) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_DO_OPEN_RAW \ + assert(gv); assert(oname) + PERL_CALLCONV bool Perl_do_openn(pTHX_ GV *gv, const char *oname, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV **svp, I32 num) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); @@ -995,6 +1034,16 @@ PERL_CALLCONV void Perl_dounwind(pTHX_ I32 cxix); PERL_CALLCONV I32 Perl_dowantarray(pTHX) __attribute__warn_unused_result__; +PERL_CALLCONV void Perl_drand48_init_r(perl_drand48_t *random_state, U32 seed) + __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_DRAND48_INIT_R \ + assert(random_state) + +PERL_CALLCONV double Perl_drand48_r(perl_drand48_t *random_state) + __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_DRAND48_R \ + assert(random_state) + PERL_CALLCONV void Perl_dump_all(pTHX); PERL_CALLCONV void Perl_dump_all_perl(pTHX_ bool justperl); PERL_CALLCONV void Perl_dump_eval(pTHX); @@ -1275,7 +1324,7 @@ PERL_CALLCONV GV* Perl_gv_autoload_sv(pTHX_ HV* stash, SV* namesv, U32 flags) #define PERL_ARGS_ASSERT_GV_AUTOLOAD_SV \ assert(namesv) -PERL_CALLCONV void Perl_gv_check(pTHX_ const HV* stash) +PERL_CALLCONV void Perl_gv_check(pTHX_ HV* stash) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_GV_CHECK \ assert(stash) @@ -1449,6 +1498,11 @@ PERL_CALLCONV void Perl_gv_name_set(pTHX_ GV* gv, const char *name, U32 len, U32 #define PERL_ARGS_ASSERT_GV_NAME_SET \ assert(gv); assert(name) +PERL_CALLCONV GV * Perl_gv_override(pTHX_ const char * const name, const STRLEN len) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_OVERRIDE \ + assert(name) + PERL_CALLCONV HV* Perl_gv_stashpv(pTHX_ const char* name, I32 flags) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_GV_STASHPV \ @@ -1549,7 +1603,7 @@ PERL_CALLCONV void Perl_hv_ename_delete(pTHX_ HV *hv, const char *name, U32 len, #define PERL_ARGS_ASSERT_HV_FETCH_ENT \ assert(keysv) -PERL_CALLCONV STRLEN Perl_hv_fill(pTHX_ HV const *const hv) +PERL_CALLCONV STRLEN Perl_hv_fill(pTHX_ HV *const hv) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_HV_FILL \ assert(hv) @@ -1625,7 +1679,7 @@ PERL_CALLCONV I32 Perl_hv_placeholders_get(pTHX_ const HV *hv) #define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_GET \ assert(hv) -PERL_CALLCONV I32* Perl_hv_placeholders_p(pTHX_ HV *hv) +PERL_CALLCONV SSize_t* Perl_hv_placeholders_p(pTHX_ HV *hv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_P \ @@ -1732,6 +1786,14 @@ PERL_CALLCONV bool Perl_is_ascii_string(const U8 *s, STRLEN len) PERL_CALLCONV I32 Perl_is_lvalue_sub(pTHX) __attribute__warn_unused_result__; +PERL_STATIC_INLINE bool S_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_3) + __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL \ + assert(pv); assert(what); assert(op_name) + PERL_CALLCONV bool Perl_is_uni_alnum(pTHX_ UV c) __attribute__deprecated__ __attribute__warn_unused_result__ @@ -2280,7 +2342,7 @@ PERL_CALLCONV int Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg) #define PERL_ARGS_ASSERT_MAGIC_KILLBACKREFS \ assert(sv); assert(mg) -PERL_CALLCONV SV* Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, const char *meth, U32 flags, U32 argc, ...) +PERL_CALLCONV SV* Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, SV *meth, U32 flags, U32 argc, ...) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); @@ -2468,6 +2530,12 @@ PERL_CALLCONV int Perl_mg_copy(pTHX_ SV *sv, SV *nsv, const char *key, I32 klen) PERL_CALLCONV MAGIC* Perl_mg_find(pTHX_ const SV* sv, int type) __attribute__warn_unused_result__; +PERL_CALLCONV MAGIC* Perl_mg_find_mglob(pTHX_ SV* sv) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MG_FIND_MGLOB \ + assert(sv) + PERL_CALLCONV MAGIC* Perl_mg_findext(pTHX_ const SV* sv, int type, const MGVTBL *vtbl) __attribute__warn_unused_result__; @@ -2625,15 +2693,11 @@ PERL_CALLCONV int Perl_my_socketpair(int family, int type, int protocol, int fd[ /* PERL_CALLCONV I32 Perl_my_stat(pTHX); */ PERL_CALLCONV I32 Perl_my_stat_flags(pTHX_ const U32 flags); PERL_CALLCONV char * Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst) + __attribute__format__(__strftime__,pTHX_1,0) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_MY_STRFTIME \ assert(fmt) -PERL_CALLCONV void Perl_my_swabn(void* ptr, int n) - __attribute__nonnull__(1); -#define PERL_ARGS_ASSERT_MY_SWABN \ - assert(ptr) - PERL_CALLCONV void Perl_my_unexec(pTHX); PERL_CALLCONV int Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap) __attribute__nonnull__(1) @@ -2655,8 +2719,8 @@ PERL_CALLCONV OP* Perl_newASSIGNOP(pTHX_ I32 flags, OP* left, I32 optype, OP* ri __attribute__malloc__ __attribute__warn_unused_result__; -PERL_CALLCONV CV* Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block); -PERL_CALLCONV CV* Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block, U32 flags); +/* PERL_CALLCONV CV* newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block); */ +PERL_CALLCONV CV* Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block, bool o_is_gv); /* PERL_CALLCONV AV* Perl_newAV(pTHX) __attribute__warn_unused_result__; */ @@ -2850,6 +2914,13 @@ PERL_CALLCONV SV* Perl_newSV_type(pTHX_ const svtype type) __attribute__malloc__ __attribute__warn_unused_result__; +PERL_CALLCONV SV* Perl_newSVavdefelem(pTHX_ AV *av, SSize_t ix, bool extendible) + __attribute__malloc__ + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NEWSVAVDEFELEM \ + assert(av) + PERL_CALLCONV SV* Perl_newSVhek(pTHX_ const HEK *const hek) __attribute__malloc__ __attribute__warn_unused_result__; @@ -3121,6 +3192,9 @@ PERL_CALLCONV OP* Perl_parse_fullstmt(pTHX_ U32 flags); PERL_CALLCONV SV* Perl_parse_label(pTHX_ U32 flags); PERL_CALLCONV OP* Perl_parse_listexpr(pTHX_ U32 flags); PERL_CALLCONV OP* Perl_parse_stmtseq(pTHX_ U32 flags); +PERL_CALLCONV OP * Perl_parse_subsignature(pTHX) + __attribute__warn_unused_result__; + PERL_CALLCONV OP* Perl_parse_termexpr(pTHX_ U32 flags); PERL_CALLCONV U32 Perl_parse_unicode_opts(pTHX_ const char **popt) __attribute__nonnull__(pTHX_1); @@ -3177,7 +3251,7 @@ PERL_CALLCONV REGEXP* Perl_pregcomp(pTHX_ SV * const pattern, const U32 flags) #define PERL_ARGS_ASSERT_PREGCOMP \ assert(pattern) -PERL_CALLCONV I32 Perl_pregexec(pTHX_ REGEXP * const prog, char* stringarg, char* strend, char* strbeg, I32 minend, SV* screamer, U32 nosave) +PERL_CALLCONV I32 Perl_pregexec(pTHX_ REGEXP * const prog, char* stringarg, char* strend, char* strbeg, SSize_t minend, SV* screamer, U32 nosave) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) @@ -3257,12 +3331,13 @@ PERL_CALLCONV REGEXP* Perl_re_compile(pTHX_ SV * const pattern, U32 orig_rx_flag #define PERL_ARGS_ASSERT_RE_COMPILE \ assert(pattern) -PERL_CALLCONV char* Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV* sv, char* strpos, char* strend, const U32 flags, re_scream_pos_data *data) +PERL_CALLCONV char* Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV* sv, const char* const strbeg, char* strpos, char* strend, const U32 flags, re_scream_pos_data *data) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3) - __attribute__nonnull__(pTHX_4); + __attribute__nonnull__(pTHX_4) + __attribute__nonnull__(pTHX_5); #define PERL_ARGS_ASSERT_RE_INTUIT_START \ - assert(rx); assert(strpos); assert(strend) + assert(rx); assert(strbeg); assert(strpos); assert(strend) PERL_CALLCONV SV* Perl_re_intuit_string(pTHX_ REGEXP *const r) __attribute__nonnull__(pTHX_1); @@ -3398,7 +3473,7 @@ PERL_CALLCONV void Perl_regdump(pTHX_ const regexp* r) #define PERL_ARGS_ASSERT_REGDUMP \ assert(r) -PERL_CALLCONV I32 Perl_regexec_flags(pTHX_ REGEXP *const rx, char *stringarg, char *strend, char *strbeg, I32 minend, SV *sv, void *data, U32 flags) +PERL_CALLCONV I32 Perl_regexec_flags(pTHX_ REGEXP *const rx, char *stringarg, char *strend, char *strbeg, SSize_t minend, SV *sv, void *data, U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) @@ -3416,7 +3491,7 @@ PERL_CALLCONV void Perl_reginitcolors(pTHX); PERL_CALLCONV regnode* Perl_regnext(pTHX_ regnode* p) __attribute__warn_unused_result__; -PERL_CALLCONV void Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o) +PERL_CALLCONV void Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o, const regmatch_info *reginfo) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_REGPROP \ @@ -3495,16 +3570,16 @@ PERL_CALLCONV void Perl_save_I8(pTHX_ I8* bytep) #define PERL_ARGS_ASSERT_SAVE_I8 \ assert(bytep) -PERL_CALLCONV void Perl_save_adelete(pTHX_ AV *av, I32 key) +PERL_CALLCONV void Perl_save_adelete(pTHX_ AV *av, SSize_t key) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SAVE_ADELETE \ assert(av) -/* PERL_CALLCONV void Perl_save_aelem(pTHX_ AV* av, I32 idx, SV **sptr) +/* PERL_CALLCONV void Perl_save_aelem(pTHX_ AV* av, SSize_t idx, SV **sptr) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); */ -PERL_CALLCONV void Perl_save_aelem_flags(pTHX_ AV* av, I32 idx, SV **sptr, const U32 flags) +PERL_CALLCONV void Perl_save_aelem_flags(pTHX_ AV* av, SSize_t idx, SV **sptr, const U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_SAVE_AELEM_FLAGS \ @@ -3656,6 +3731,11 @@ PERL_CALLCONV void Perl_save_sptr(pTHX_ SV** sptr) #define PERL_ARGS_ASSERT_SAVE_SPTR \ assert(sptr) +PERL_CALLCONV void Perl_save_strlen(pTHX_ STRLEN* ptr) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SAVE_STRLEN \ + assert(ptr) + PERL_CALLCONV SV* Perl_save_svref(pTHX_ SV** sptr) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SAVE_SVREF \ @@ -3750,6 +3830,7 @@ PERL_CALLCONV char* Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_ assert(bigstr); assert(littlestr); assert(old_posp) PERL_CALLCONV U32 Perl_seed(pTHX); +PERL_CALLCONV void Perl_set_caret_X(pTHX); PERL_CALLCONV void Perl_set_context(void *t) __attribute__nonnull__(1); #define PERL_ARGS_ASSERT_SET_CONTEXT \ @@ -3778,7 +3859,7 @@ PERL_CALLCONV void Perl_sortsv_flags(pTHX_ SV** array, size_t num_elts, SVCOMPAR #define PERL_ARGS_ASSERT_SORTSV_FLAGS \ assert(cmp) -PERL_CALLCONV SV** Perl_stack_grow(pTHX_ SV** sp, SV** p, int n) +PERL_CALLCONV SV** Perl_stack_grow(pTHX_ SV** sp, SV** p, SSize_t n) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_STACK_GROW \ @@ -3805,7 +3886,7 @@ PERL_CALLCONV void Perl_sub_crush_depth(pTHX_ CV* cv) /* PERL_CALLCONV bool sv_2bool(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); */ -PERL_CALLCONV bool Perl_sv_2bool_flags(pTHX_ SV *const sv, const I32 flags) +PERL_CALLCONV bool Perl_sv_2bool_flags(pTHX_ SV *sv, I32 flags) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SV_2BOOL_FLAGS \ assert(sv) @@ -3821,17 +3902,37 @@ PERL_CALLCONV IO* Perl_sv_2io(pTHX_ SV *const sv) #define PERL_ARGS_ASSERT_SV_2IO \ assert(sv) -/* PERL_CALLCONV IV Perl_sv_2iv(pTHX_ SV *sv); */ -PERL_CALLCONV IV Perl_sv_2iv_flags(pTHX_ SV *const sv, const I32 flags); +/* PERL_CALLCONV IV Perl_sv_2iv(pTHX_ SV *sv) + __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_2IV \ + assert(sv) + +PERL_CALLCONV IV Perl_sv_2iv_flags(pTHX_ SV *const sv, const I32 flags) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2IV_FLAGS \ + assert(sv) + PERL_CALLCONV SV* Perl_sv_2mortal(pTHX_ SV *const sv); PERL_CALLCONV SV* Perl_sv_2num(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SV_2NUM \ assert(sv) -PERL_CALLCONV NV Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags); -/* PERL_CALLCONV char* Perl_sv_2pv(pTHX_ SV *sv, STRLEN *lp); */ -PERL_CALLCONV char* Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags); +PERL_CALLCONV NV Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2NV_FLAGS \ + assert(sv) + +/* PERL_CALLCONV char* Perl_sv_2pv(pTHX_ SV *sv, STRLEN *lp) + __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_2PV \ + assert(sv) + +PERL_CALLCONV char* Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2PV_FLAGS \ + assert(sv) + /* PERL_CALLCONV char* Perl_sv_2pv_nolen(pTHX_ SV* sv) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); */ @@ -3860,8 +3961,16 @@ PERL_CALLCONV char* Perl_sv_2pvutf8(pTHX_ SV *sv, STRLEN *const lp) #define PERL_ARGS_ASSERT_SV_2PVUTF8_NOLEN \ assert(sv) -/* PERL_CALLCONV UV Perl_sv_2uv(pTHX_ SV *sv); */ -PERL_CALLCONV UV Perl_sv_2uv_flags(pTHX_ SV *const sv, const I32 flags); +/* PERL_CALLCONV UV Perl_sv_2uv(pTHX_ SV *sv) + __attribute__nonnull__(pTHX_1); */ +#define PERL_ARGS_ASSERT_SV_2UV \ + assert(sv) + +PERL_CALLCONV UV Perl_sv_2uv_flags(pTHX_ SV *const sv, const I32 flags) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_2UV_FLAGS \ + assert(sv) + PERL_CALLCONV int Perl_sv_backoff(pTHX_ SV *const sv) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SV_BACKOFF \ @@ -4119,6 +4228,11 @@ PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV *const sv, SV *const obj, const #define PERL_ARGS_ASSERT_SV_MAGICEXT \ assert(sv) +PERL_CALLCONV MAGIC * Perl_sv_magicext_mglob(pTHX_ SV *sv) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_MAGICEXT_MGLOB \ + assert(sv) + /* PERL_CALLCONV SV* Perl_sv_mortalcopy(pTHX_ SV *const oldsv) __attribute__malloc__ __attribute__warn_unused_result__; */ @@ -4144,6 +4258,11 @@ PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV *const sv, I32 *const offsetp) #define PERL_ARGS_ASSERT_SV_POS_B2U \ assert(offsetp) +PERL_CALLCONV STRLEN Perl_sv_pos_b2u_flags(pTHX_ SV *const sv, STRLEN const offset, U32 flags) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_POS_B2U_FLAGS \ + assert(sv) + PERL_CALLCONV void Perl_sv_pos_u2b(pTHX_ SV *const sv, I32 *const offsetp, I32 *const lenp) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_SV_POS_U2B \ @@ -4527,6 +4646,7 @@ PERL_CALLCONV SV* Perl_swash_init(pTHX_ const char* pkg, const char* name, SV* l #define PERL_ARGS_ASSERT_SWASH_INIT \ assert(pkg); assert(name); assert(listsv) +/* PERL_CALLCONV void sync_locale(void); */ PERL_CALLCONV void Perl_sys_init(int* argc, char*** argv) __attribute__nonnull__(1) __attribute__nonnull__(2); @@ -4547,7 +4667,7 @@ PERL_CALLCONV void Perl_taint_proper(pTHX_ const char* f, const char *const s) #define PERL_ARGS_ASSERT_TAINT_PROPER \ assert(s) -PERL_CALLCONV OP * Perl_tied_method(pTHX_ const char *const methname, SV **sp, SV *const sv, const MAGIC *const mg, const U32 flags, U32 argc, ...) +PERL_CALLCONV OP * Perl_tied_method(pTHX_ SV *methname, SV **sp, SV *const sv, const MAGIC *const mg, const U32 flags, U32 argc, ...) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) @@ -4555,7 +4675,7 @@ PERL_CALLCONV OP * Perl_tied_method(pTHX_ const char *const methname, SV **sp, S #define PERL_ARGS_ASSERT_TIED_METHOD \ assert(methname); assert(sp); assert(sv); assert(mg) -PERL_CALLCONV void Perl_tmps_grow(pTHX_ I32 n); +PERL_CALLCONV void Perl_tmps_grow(pTHX_ SSize_t n); /* PERL_CALLCONV UV Perl_to_uni_fold(pTHX_ UV c, U8 *p, STRLEN *lenp) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); */ @@ -4699,11 +4819,9 @@ PERL_CALLCONV UV Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \ assert(s) -PERL_CALLCONV UV Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen) +/* PERL_CALLCONV UV utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); -#define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF \ - assert(s); assert(send) + __attribute__nonnull__(pTHX_2); */ PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) __attribute__deprecated__ @@ -4712,23 +4830,35 @@ PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) assert(s) PERL_CALLCONV UV Perl_utf8_to_uvuni_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen) + __attribute__deprecated__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_UTF8_TO_UVUNI_BUF \ assert(s); assert(send) +PERL_CALLCONV UV Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR \ + assert(s) + PERL_CALLCONV UV Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_UTF8N_TO_UVUNI \ assert(s) -PERL_CALLCONV U8* Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) +/* PERL_CALLCONV U8* uvchr_to_utf8(pTHX_ U8 *d, UV uv) + __attribute__nonnull__(pTHX_1); */ + +/* PERL_CALLCONV U8* uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) + __attribute__nonnull__(pTHX_1); */ + +PERL_CALLCONV U8* Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8_FLAGS \ +#define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS \ assert(d) -/* PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) - __attribute__nonnull__(pTHX_1); */ +PERL_CALLCONV U8* Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) + __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_UVUNI_TO_UTF8 \ assert(d) @@ -4737,11 +4867,22 @@ PERL_CALLCONV U8* Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) #define PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS \ assert(d) +PERL_CALLCONV UV Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR \ + assert(s) + PERL_CALLCONV UV Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) + __attribute__deprecated__ __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI \ assert(s) +PERL_CALLCONV bool Perl_validate_proto(pTHX_ SV *name, SV *proto, bool warn) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_VALIDATE_PROTO \ + assert(name) + PERL_CALLCONV int Perl_vcmp(pTHX_ SV *lhv, SV *rhv) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); @@ -4918,23 +5059,6 @@ STATIC int S_sv_2iuv_non_preserve(pTHX_ SV *const sv) # endif # endif #endif -#if !(defined(EBCDIC)) -/* PERL_CALLCONV UV Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) - __attribute__nonnull__(pTHX_1); */ -#define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR \ - assert(s) - -/* PERL_CALLCONV U8* Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv) - __attribute__nonnull__(pTHX_1); */ -#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8 \ - assert(d) - -/* PERL_CALLCONV UV Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) - __attribute__nonnull__(pTHX_1); */ -#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR \ - assert(s) - -#endif #if !(defined(HAS_SIGACTION) && defined(SA_SIGINFO)) PERL_CALLCONV Signal_t Perl_csighandler(int sig); PERL_CALLCONV Signal_t Perl_sighandler(int sig); @@ -4971,6 +5095,11 @@ PERL_CALLCONV void Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop assert(idop) #endif +#if !(defined(WIN32)) +/* PERL_CALLCONV char* my_setlocale(pTHX_ int category, const char* locale) + __attribute__pure__; */ + +#endif #if !(defined(_MSC_VER)) PERL_CALLCONV_NO_RET int Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg) __attribute__noreturn__ @@ -5191,8 +5320,20 @@ STATIC void S_put_byte(pTHX_ SV* sv, int c) #define PERL_ARGS_ASSERT_PUT_BYTE \ assert(sv) +STATIC bool S_put_latin1_charclass_innards(pTHX_ SV* sv, char* bitmap) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_PUT_LATIN1_CHARCLASS_INNARDS \ + assert(sv); assert(bitmap) + +STATIC void S_put_range(pTHX_ SV* sv, UV start, UV end) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_PUT_RANGE \ + assert(sv) + STATIC void S_regdump_extflags(pTHX_ const char *lead, const U32 flags); -STATIC U8 S_regtail_study(pTHX_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth) +STATIC void S_regdump_intflags(pTHX_ const char *lead, const U32 flags); +STATIC U8 S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); @@ -5228,6 +5369,7 @@ STATIC void S_del_sv(pTHX_ SV *p) # endif # if defined(PERL_IN_TOKE_C) STATIC void S_printbuf(pTHX_ const char *const fmt, const char *const s) + __attribute__format__(__printf__,pTHX_1,0) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_PRINTBUF \ @@ -5247,30 +5389,6 @@ PERL_CALLCONV void Perl_dump_sv_child(pTHX_ SV *sv) assert(sv) #endif -#if defined(DUMP_FDS) -PERL_CALLCONV void Perl_dump_fds(pTHX_ char* s) - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_DUMP_FDS \ - assert(s) - -#endif -#if defined(EBCDIC) -PERL_CALLCONV UV Perl_utf8n_to_uvchr(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR \ - assert(s) - -PERL_CALLCONV U8* Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv) - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_UVCHR_TO_UTF8 \ - assert(d) - -PERL_CALLCONV UV Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen) - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVCHR \ - assert(s) - -#endif #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM) PERL_CALLCONV I32 Perl_do_ipcctl(pTHX_ I32 optype, SV** mark, SV** sp) __attribute__nonnull__(pTHX_2) @@ -5346,20 +5464,6 @@ PERL_CALLCONV MEM_SIZE Perl_malloced_size(void *p) assert(p) #endif -#if defined(MYSWAP) -PERL_CALLCONV long Perl_my_htonl(pTHX_ long l) - __attribute__warn_unused_result__ - __attribute__pure__; - -PERL_CALLCONV long Perl_my_ntohl(pTHX_ long l) - __attribute__warn_unused_result__ - __attribute__pure__; - -PERL_CALLCONV short Perl_my_swap(pTHX_ short s) - __attribute__warn_unused_result__ - __attribute__pure__; - -#endif #if defined(NO_MATHOMS) /* PERL_CALLCONV void Perl_sv_nounlocking(pTHX_ SV *sv); */ #endif @@ -5405,6 +5509,14 @@ PERL_CALLCONV void Perl_Slab_to_rw(pTHX_ OPSLAB *const slab) # endif #endif +#if defined(PERL_CORE) || defined (PERL_EXT) +PERL_STATIC_INLINE STRLEN S_sv_or_pv_pos_u2b(pTHX_ SV *sv, const char *pv, STRLEN pos, STRLEN *lenp) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SV_OR_PV_POS_U2B \ + assert(sv); assert(pv) + +#endif #if defined(PERL_CR_FILTER) # if defined(PERL_IN_TOKE_C) STATIC I32 S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen); @@ -5415,6 +5527,20 @@ STATIC void S_strip_return(pTHX_ SV *sv) # endif #endif +#if defined(PERL_DEBUG_READONLY_COW) +PERL_CALLCONV void Perl_sv_buf_to_ro(pTHX_ SV *sv) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_BUF_TO_RO \ + assert(sv) + +# if defined(PERL_IN_SV_C) +STATIC void S_sv_buf_to_rw(pTHX_ SV *sv) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SV_BUF_TO_RW \ + assert(sv) + +# endif +#endif #if defined(PERL_DEBUG_READONLY_OPS) PERL_CALLCONV PADOFFSET Perl_op_refcnt_dec(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); @@ -5599,6 +5725,24 @@ STATIC void S_exec_failed(pTHX_ const char *cmd, int fd, int do_report) STATIC bool S_ingroup(pTHX_ Gid_t testgid, bool effective) __attribute__warn_unused_result__; +STATIC bool S_openn_cleanup(pTHX_ GV *gv, IO *io, PerlIO *fp, char *mode, const char *oname, PerlIO *saveifp, PerlIO *saveofp, int savefd, char savetype, int writing, bool was_fdopen, const char *type) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_4) + __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_OPENN_CLEANUP \ + assert(gv); assert(io); assert(mode); assert(oname) + +STATIC IO * S_openn_setup(pTHX_ GV *gv, char *mode, PerlIO **saveifp, PerlIO **saveofp, int *savefd, char *savetype) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3) + __attribute__nonnull__(pTHX_4) + __attribute__nonnull__(pTHX_5) + __attribute__nonnull__(pTHX_6); +#define PERL_ARGS_ASSERT_OPENN_SETUP \ + assert(gv); assert(mode); assert(saveifp); assert(saveofp); assert(savefd); assert(savetype) + #endif #if defined(PERL_IN_DOOP_C) STATIC I32 S_do_trans_complex(pTHX_ SV * const sv) @@ -5669,16 +5813,49 @@ PERL_CALLCONV void Perl_hv_kill_backrefs(pTHX_ HV *hv) #endif #if defined(PERL_IN_GV_C) +STATIC bool S_find_default_stash(pTHX_ HV **stash, const char *name, STRLEN len, const U32 is_utf8, const I32 add, svtype sv_type) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_FIND_DEFAULT_STASH \ + assert(stash); assert(name) + STATIC void S_gv_init_svtype(pTHX_ GV *gv, const svtype sv_type) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_GV_INIT_SVTYPE \ assert(gv) +STATIC bool S_gv_is_in_main(pTHX_ const char *name, STRLEN len, const U32 is_utf8) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GV_IS_IN_MAIN \ + assert(name) + +STATIC bool S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, bool addmg, svtype sv_type) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_GV_MAGICALIZE \ + assert(gv); assert(stash); assert(name) + STATIC void S_gv_magicalize_isa(pTHX_ GV *gv) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_GV_MAGICALIZE_ISA \ assert(gv) +STATIC void S_maybe_multimagic_gv(pTHX_ GV *gv, const char *name, const svtype sv_type) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAYBE_MULTIMAGIC_GV \ + assert(gv); assert(name) + +STATIC bool S_parse_gv_stash_name(pTHX_ HV **stash, GV **gv, const char **name, STRLEN *len, const char *nambeg, STRLEN full_len, const U32 is_utf8, const I32 add) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3) + __attribute__nonnull__(pTHX_4) + __attribute__nonnull__(pTHX_5); +#define PERL_ARGS_ASSERT_PARSE_GV_STASH_NAME \ + assert(stash); assert(gv); assert(name); assert(len); assert(nambeg) + STATIC HV* S_require_tie_mod(pTHX_ GV *gv, const char *varpv, SV* namesv, const char *methpv, const U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) @@ -5717,6 +5894,11 @@ STATIC struct xpvhv_aux* S_hv_auxinit(pTHX_ HV *hv) #define PERL_ARGS_ASSERT_HV_AUXINIT \ assert(hv) +STATIC struct xpvhv_aux* S_hv_auxinit_internal(struct xpvhv_aux *iter) + __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_HV_AUXINIT_INTERNAL \ + assert(iter) + STATIC SV* S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, int k_flags, I32 d_flags, U32 hash); STATIC SV* S_hv_free_ent_ret(pTHX_ HV *hv, HE *entry) __attribute__nonnull__(pTHX_1) @@ -5742,7 +5924,7 @@ STATIC HE* S_new_he(pTHX) __attribute__malloc__ __attribute__warn_unused_result__; -STATIC U32 S_ptr_hash(PTRV u); +PERL_STATIC_INLINE U32 S_ptr_hash(PTRV u); STATIC SV * S_refcounted_he_value(pTHX_ const struct refcounted_he *he) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_REFCOUNTED_HE_VALUE \ @@ -5778,24 +5960,35 @@ PERL_CALLCONV SV* Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp) assert(hv); assert(indexp) #endif -#if defined(PERL_IN_LOCALE_C) -# if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE) +#if defined(PERL_IN_LOCALE_C) && defined(USE_LOCALE) +STATIC bool S_is_cur_LC_category_utf8(pTHX_ int category); STATIC char* S_stdize_locale(pTHX_ char* locs) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_STDIZE_LOCALE \ assert(locs) -# endif +#endif +#if defined(PERL_IN_MALLOC_C) +STATIC int S_adjust_size_and_find_bucket(size_t *nbytes_p) + __attribute__nonnull__(1); +#define PERL_ARGS_ASSERT_ADJUST_SIZE_AND_FIND_BUCKET \ + assert(nbytes_p) + #endif #if defined(PERL_IN_MG_C) -STATIC SV* S_magic_methcall1(pTHX_ SV *sv, const MAGIC *mg, const char *meth, U32 flags, int n, SV *val) +STATIC void S_fixup_errno_string(pTHX_ SV* sv) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_FIXUP_ERRNO_STRING \ + assert(sv) + +STATIC SV* S_magic_methcall1(pTHX_ SV *sv, const MAGIC *mg, SV *meth, U32 flags, int n, SV *val) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_MAGIC_METHCALL1 \ assert(sv); assert(mg); assert(meth) -STATIC int S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, const char *meth) +STATIC int S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, SV *meth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); @@ -5803,9 +5996,9 @@ STATIC int S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, const char *meth) assert(sv); assert(mg); assert(meth) STATIC void S_restore_magic(pTHX_ const void *p); -STATIC void S_save_magic(pTHX_ I32 mgs_ix, SV *sv) +STATIC void S_save_magic_flags(pTHX_ I32 mgs_ix, SV *sv, U32 flags) __attribute__nonnull__(pTHX_2); -#define PERL_ARGS_ASSERT_SAVE_MAGIC \ +#define PERL_ARGS_ASSERT_SAVE_MAGIC_FLAGS \ assert(sv) STATIC void S_unwind_handler_stack(pTHX_ const void *p); @@ -5819,7 +6012,7 @@ PERL_CALLCONV bool Perl_translate_substr_offsets(pTHX_ STRLEN curlen, IV pos1_iv #endif #if defined(PERL_IN_MRO_C) -STATIC void S_mro_clean_isarev(pTHX_ HV * const isa, const char * const name, const STRLEN len, HV * const exceptions, U32 flags) +STATIC void S_mro_clean_isarev(pTHX_ HV * const isa, const char * const name, const STRLEN len, HV * const exceptions, U32 hash, U32 flags) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_MRO_CLEAN_ISAREV \ @@ -5856,19 +6049,19 @@ STATIC void S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp #define PERL_ARGS_ASSERT_APPLY_ATTRS_MY \ assert(stash); assert(target); assert(imopsp) -STATIC void S_bad_type_pv(pTHX_ I32 n, const char *t, const char *name, U32 flags, const OP *kid) +STATIC void S_bad_type_gv(pTHX_ I32 n, const char *t, GV *gv, U32 flags, const OP *kid) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_5); -#define PERL_ARGS_ASSERT_BAD_TYPE_PV \ - assert(t); assert(name); assert(kid) +#define PERL_ARGS_ASSERT_BAD_TYPE_GV \ + assert(t); assert(gv); assert(kid) -STATIC void S_bad_type_sv(pTHX_ I32 n, const char *t, SV *namesv, U32 flags, const OP *kid) +STATIC void S_bad_type_pv(pTHX_ I32 n, const char *t, const char *name, U32 flags, const OP *kid) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_5); -#define PERL_ARGS_ASSERT_BAD_TYPE_SV \ - assert(t); assert(namesv); assert(kid) +#define PERL_ARGS_ASSERT_BAD_TYPE_PV \ + assert(t); assert(name); assert(kid) STATIC void S_cop_free(pTHX_ COP *cop) __attribute__nonnull__(pTHX_1); @@ -5928,6 +6121,13 @@ STATIC bool S_looks_like_bool(pTHX_ const OP* o) assert(o) STATIC OP* S_modkids(pTHX_ OP *o, I32 type); +STATIC void S_move_proto_attr(pTHX_ OP **proto, OP **attrs, const GV *name) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_MOVE_PROTO_ATTR \ + assert(proto); assert(attrs); assert(name) + STATIC OP * S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_MY_KID \ @@ -5959,6 +6159,11 @@ STATIC OP* S_no_fh_allowed(pTHX_ OP *o) #define PERL_ARGS_ASSERT_NO_FH_ALLOWED \ assert(o) +STATIC void S_null_listop_in_list_context(pTHX_ OP* o) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_NULL_LISTOP_IN_LIST_CONTEXT \ + assert(o) + PERL_STATIC_INLINE OP* S_op_integerize(pTHX_ OP *o) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_OP_INTEGERIZE \ @@ -6143,7 +6348,7 @@ PERL_CALLCONV GV* Perl_softref2xv(pTHX_ SV *const sv, const char *const what, co #endif #if defined(PERL_IN_PP_CTL_C) -STATIC SV ** S_adjust_stack_on_leave(pTHX_ SV **newsp, SV **sp, SV **mark, I32 gimme, U32 flags) +STATIC SV ** S_adjust_stack_on_leave(pTHX_ SV **newsp, SV **sp, SV **mark, I32 gimme, U32 flags, bool lvalue) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); @@ -6220,10 +6425,10 @@ STATIC bool S_matcher_matches_sv(pTHX_ PMOP* matcher, SV* sv) STATIC bool S_num_overflow(NV value, I32 fldsize, I32 frcsize) __attribute__warn_unused_result__; -STATIC bool S_path_is_absolute(const char *name) +PERL_STATIC_INLINE bool S_path_is_searchable(const char *name) __attribute__warn_unused_result__ __attribute__nonnull__(1); -#define PERL_ARGS_ASSERT_PATH_IS_ABSOLUTE \ +#define PERL_ARGS_ASSERT_PATH_IS_SEARCHABLE \ assert(name) STATIC I32 S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) @@ -6264,7 +6469,7 @@ STATIC SV* S_method_common(pTHX_ SV* meth, U32* hashp) #endif #if defined(PERL_IN_PP_PACK_C) -STATIC char * S_bytes_to_uni(const U8 *start, STRLEN len, char *dest) +STATIC char * S_bytes_to_uni(const U8 *start, STRLEN len, char *dest, const bool needs_swap) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(3); @@ -6410,10 +6615,9 @@ STATIC I32 S_sv_ncmp(pTHX_ SV *const a, SV *const b) #if defined(PERL_IN_PP_SYS_C) STATIC OP* S_doform(pTHX_ CV *cv, GV *gv, OP *retop) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2) - __attribute__nonnull__(pTHX_3); + __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_DOFORM \ - assert(cv); assert(gv); assert(retop) + assert(cv); assert(gv) STATIC SV * S_space_join_names_mortal(pTHX_ char *const *array) __attribute__nonnull__(pTHX_1); @@ -6433,71 +6637,40 @@ PERL_STATIC_INLINE UV* S__invlist_array_init(pTHX_ SV* const invlist, const bool #define PERL_ARGS_ASSERT__INVLIST_ARRAY_INIT \ assert(invlist) -STATIC SV* S__new_invlist_C_array(pTHX_ UV* list) - __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT__NEW_INVLIST_C_ARRAY \ - assert(list) - PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp) __attribute__warn_unused_result__; -STATIC U32 S_add_data(struct RExC_state_t *pRExC_state, U32 n, const char *s) +STATIC U32 S_add_data(RExC_state_t* const pRExC_state, const char* const s, const U32 n) __attribute__warn_unused_result__ __attribute__nonnull__(1) - __attribute__nonnull__(3); + __attribute__nonnull__(2); #define PERL_ARGS_ASSERT_ADD_DATA \ assert(pRExC_state); assert(s) -PERL_STATIC_INLINE void S_alloc_maybe_populate_EXACT(pTHX_ struct RExC_state_t *pRExC_state, regnode *node, I32 *flagp, STRLEN len, UV code_point) +PERL_STATIC_INLINE void S_alloc_maybe_populate_EXACT(pTHX_ RExC_state_t *pRExC_state, regnode *node, I32 *flagp, STRLEN len, UV code_point, bool downgradable) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_ALLOC_MAYBE_POPULATE_EXACT \ assert(pRExC_state); assert(node); assert(flagp) -STATIC void S_cl_and(struct regnode_charclass_class *cl, const struct regnode_charclass_class *and_with) - __attribute__nonnull__(1) - __attribute__nonnull__(2); -#define PERL_ARGS_ASSERT_CL_AND \ - assert(cl); assert(and_with) - -STATIC void S_cl_anything(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) - __attribute__nonnull__(1) - __attribute__nonnull__(2); -#define PERL_ARGS_ASSERT_CL_ANYTHING \ - assert(pRExC_state); assert(cl) - -STATIC void S_cl_init(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl) - __attribute__nonnull__(1) - __attribute__nonnull__(2); -#define PERL_ARGS_ASSERT_CL_INIT \ - assert(pRExC_state); assert(cl) - -STATIC int S_cl_is_anything(const struct regnode_charclass_class *cl) - __attribute__warn_unused_result__ - __attribute__nonnull__(1); -#define PERL_ARGS_ASSERT_CL_IS_ANYTHING \ - assert(cl) - -STATIC void S_cl_or(const struct RExC_state_t *pRExC_state, struct regnode_charclass_class *cl, const struct regnode_charclass_class *or_with) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3); -#define PERL_ARGS_ASSERT_CL_OR \ - assert(pRExC_state); assert(cl); assert(or_with) - -PERL_STATIC_INLINE U8 S_compute_EXACTish(pTHX_ struct RExC_state_t *pRExC_state) +PERL_STATIC_INLINE U8 S_compute_EXACTish(pTHX_ RExC_state_t *pRExC_state) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_COMPUTE_EXACTISH \ assert(pRExC_state) -STATIC bool S_could_it_be_a_POSIX_class(pTHX_ struct RExC_state_t *pRExC_state) +STATIC bool S_could_it_be_a_POSIX_class(pTHX_ RExC_state_t *pRExC_state) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_COULD_IT_BE_A_POSIX_CLASS \ assert(pRExC_state) -PERL_STATIC_INLINE UV* S_get_invlist_iter_addr(pTHX_ SV* invlist) +STATIC SV* S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, const regnode_charclass* const node) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_GET_ANYOF_CP_LIST_FOR_SSC \ + assert(pRExC_state); assert(node) + +PERL_STATIC_INLINE STRLEN* S_get_invlist_iter_addr(pTHX_ SV* invlist) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR \ @@ -6509,25 +6682,13 @@ PERL_STATIC_INLINE IV* S_get_invlist_previous_index_addr(pTHX_ SV* invlist) #define PERL_ARGS_ASSERT_GET_INVLIST_PREVIOUS_INDEX_ADDR \ assert(invlist) -PERL_STATIC_INLINE UV* S_get_invlist_version_id_addr(pTHX_ SV* invlist) - __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_GET_INVLIST_VERSION_ID_ADDR \ - assert(invlist) - -PERL_STATIC_INLINE UV* S_get_invlist_zero_addr(pTHX_ SV* invlist) - __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_GET_INVLIST_ZERO_ADDR \ - assert(invlist) - -STATIC bool S_grok_bslash_N(pTHX_ struct RExC_state_t *pRExC_state, regnode** nodep, UV *valuep, I32 *flagp, U32 depth, bool in_char_class, const bool strict) +STATIC bool S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode** nodep, UV *valuep, I32 *flagp, U32 depth, bool in_char_class, const bool strict) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_4); #define PERL_ARGS_ASSERT_GROK_BSLASH_N \ assert(pRExC_state); assert(flagp) -STATIC regnode* S_handle_regex_sets(pTHX_ struct RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse) +STATIC regnode* S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_5); @@ -6593,7 +6754,7 @@ PERL_STATIC_INLINE IV S_invlist_previous_index(pTHX_ SV* const invlist) #define PERL_ARGS_ASSERT_INVLIST_PREVIOUS_INDEX \ assert(invlist) -PERL_STATIC_INLINE void S_invlist_set_len(pTHX_ SV* const invlist, const UV len) +PERL_STATIC_INLINE void S_invlist_set_len(pTHX_ SV* const invlist, const UV len, const bool offset) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_INVLIST_SET_LEN \ assert(invlist) @@ -6608,15 +6769,15 @@ PERL_STATIC_INLINE void S_invlist_trim(pTHX_ SV* const invlist) #define PERL_ARGS_ASSERT_INVLIST_TRIM \ assert(invlist) -STATIC U32 S_join_exact(pTHX_ struct RExC_state_t *pRExC_state, regnode *scan, UV *min_subtract, bool *has_exactf_sharp_s, U32 flags, regnode *val, U32 depth) +STATIC U32 S_join_exact(pTHX_ RExC_state_t *pRExC_state, regnode *scan, UV *min_subtract, bool *unfolded_multi_char, U32 flags, regnode *val, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) __attribute__nonnull__(pTHX_4); #define PERL_ARGS_ASSERT_JOIN_EXACT \ - assert(pRExC_state); assert(scan); assert(min_subtract); assert(has_exactf_sharp_s) + assert(pRExC_state); assert(scan); assert(min_subtract); assert(unfolded_multi_char) -STATIC I32 S_make_trie(pTHX_ struct RExC_state_t *pRExC_state, regnode *startbranch, regnode *first, regnode *last, regnode *tail, U32 word_count, U32 flags, U32 depth) +STATIC I32 S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *first, regnode *last, regnode *tail, U32 word_count, U32 flags, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) @@ -6625,37 +6786,43 @@ STATIC I32 S_make_trie(pTHX_ struct RExC_state_t *pRExC_state, regnode *startbra #define PERL_ARGS_ASSERT_MAKE_TRIE \ assert(pRExC_state); assert(startbranch); assert(first); assert(last); assert(tail) -STATIC void S_make_trie_failtable(pTHX_ struct RExC_state_t *pRExC_state, regnode *source, regnode *stclass, U32 depth) +STATIC void S_make_trie_failtable(pTHX_ RExC_state_t *pRExC_state, regnode *source, regnode *stclass, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_MAKE_TRIE_FAILTABLE \ assert(pRExC_state); assert(source); assert(stclass) -STATIC char * S_nextchar(pTHX_ struct RExC_state_t *pRExC_state) +STATIC char * S_nextchar(pTHX_ RExC_state_t *pRExC_state) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_NEXTCHAR \ assert(pRExC_state) -STATIC void S_parse_lparen_question_flags(pTHX_ struct RExC_state_t *pRExC_state) +STATIC void S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS \ assert(pRExC_state) -PERL_STATIC_NO_RET void S_re_croak2(pTHX_ const char* pat1, const char* pat2, ...) - __attribute__noreturn__ +STATIC void S_populate_ANYOF_from_invlist(pTHX_ regnode *node, SV** invlist_ptr) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_POPULATE_ANYOF_FROM_INVLIST \ + assert(node); assert(invlist_ptr) + +PERL_STATIC_NO_RET void S_re_croak2(pTHX_ bool utf8, const char* pat1, const char* pat2, ...) + __attribute__noreturn__ + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_RE_CROAK2 \ assert(pat1); assert(pat2) -STATIC regnode* S_reg(pTHX_ struct RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth) +STATIC regnode* S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_REG \ assert(pRExC_state); assert(flagp) -STATIC regnode* S_reg_node(pTHX_ struct RExC_state_t *pRExC_state, U8 op) +STATIC regnode* S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_REG_NODE \ assert(pRExC_state) @@ -6665,91 +6832,168 @@ STATIC UV S_reg_recode(pTHX_ const char value, SV **encp) #define PERL_ARGS_ASSERT_REG_RECODE \ assert(encp) -STATIC SV * S_reg_scan_name(pTHX_ struct RExC_state_t *pRExC_state, U32 flags) +STATIC SV * S_reg_scan_name(pTHX_ RExC_state_t *pRExC_state, U32 flags) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_REG_SCAN_NAME \ assert(pRExC_state) -STATIC bool S_reg_skipcomment(pTHX_ struct RExC_state_t *pRExC_state) +STATIC bool S_reg_skipcomment(pTHX_ RExC_state_t *pRExC_state) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_REG_SKIPCOMMENT \ assert(pRExC_state) -STATIC regnode* S_reganode(pTHX_ struct RExC_state_t *pRExC_state, U8 op, U32 arg) +STATIC regnode* S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_REGANODE \ assert(pRExC_state) -STATIC regnode* S_regatom(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth) +STATIC regnode* S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_REGATOM \ assert(pRExC_state); assert(flagp) -STATIC regnode* S_regbranch(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth) +STATIC regnode* S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_REGBRANCH \ assert(pRExC_state); assert(flagp) -STATIC regnode* S_regclass(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1, bool allow_multi_fold, const bool silence_non_portable, SV** ret_invlist) +STATIC regnode* S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth, const bool stop_at_1, bool allow_multi_fold, const bool silence_non_portable, SV** ret_invlist) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_REGCLASS \ assert(pRExC_state); assert(flagp) -STATIC void S_reginsert(pTHX_ struct RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth) +STATIC void S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_REGINSERT \ assert(pRExC_state); assert(opnd) -STATIC char * S_regpatws(struct RExC_state_t *pRExC_state, char *p, const bool recognize_comment) +STATIC char * S_regpatws(RExC_state_t *pRExC_state, char *p, const bool recognize_comment) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(2); #define PERL_ARGS_ASSERT_REGPATWS \ assert(pRExC_state); assert(p) -STATIC regnode* S_regpiece(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth) +STATIC regnode* S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_REGPIECE \ assert(pRExC_state); assert(flagp) -PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value, const bool strict) +PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ RExC_state_t *pRExC_state, I32 value, const bool strict) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_REGPPOSIXCC \ assert(pRExC_state) -STATIC void S_regtail(pTHX_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth) +STATIC void S_regtail(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_REGTAIL \ assert(pRExC_state); assert(p); assert(val) -STATIC STRLEN S_reguni(pTHX_ const struct RExC_state_t *pRExC_state, UV uv, char *s) +PERL_STATIC_INLINE STRLEN S_reguni(pTHX_ const RExC_state_t *pRExC_state, UV uv, char *s) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_REGUNI \ assert(pRExC_state); assert(s) -STATIC char * S_regwhite(struct RExC_state_t *pRExC_state, char *p) +STATIC char * S_regwhite(RExC_state_t *pRExC_state, char *p) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(2); #define PERL_ARGS_ASSERT_REGWHITE \ assert(pRExC_state); assert(p) -STATIC void S_scan_commit(pTHX_ const struct RExC_state_t *pRExC_state, struct scan_data_t *data, I32 *minlenp, int is_inf) +STATIC void S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, struct scan_data_t *data, SSize_t *minlenp, int is_inf) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT_SCAN_COMMIT \ assert(pRExC_state); assert(data); assert(minlenp) -STATIC I32 S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp, I32 *minlenp, I32 *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U8* recursed, struct regnode_charclass_class *and_withp, U32 flags, U32 depth) +STATIC void S_set_ANYOF_arg(pTHX_ RExC_state_t* const pRExC_state, regnode* const node, SV* const cp_list, SV* const runtime_defns, SV* const only_utf8_locale_list, SV* const swash, const bool has_user_defined_property) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SET_ANYOF_ARG \ + assert(pRExC_state); assert(node) + +PERL_STATIC_INLINE void S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SSC_ADD_RANGE \ + assert(ssc) + +STATIC void S_ssc_and(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *and_with) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SSC_AND \ + assert(pRExC_state); assert(ssc); assert(and_with) + +STATIC void S_ssc_anything(pTHX_ regnode_ssc *ssc) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SSC_ANYTHING \ + assert(ssc) + +PERL_STATIC_INLINE void S_ssc_clear_locale(pTHX_ regnode_ssc *ssc) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SSC_CLEAR_LOCALE \ + assert(ssc) + +PERL_STATIC_INLINE void S_ssc_cp_and(pTHX_ regnode_ssc *ssc, UV const cp) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SSC_CP_AND \ + assert(ssc) + +STATIC void S_ssc_finalize(pTHX_ RExC_state_t *pRExC_state, regnode_ssc *ssc) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SSC_FINALIZE \ + assert(pRExC_state); assert(ssc) + +STATIC void S_ssc_init(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SSC_INIT \ + assert(pRExC_state); assert(ssc) + +PERL_STATIC_INLINE void S_ssc_intersection(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SSC_INTERSECTION \ + assert(ssc); assert(invlist) + +STATIC int S_ssc_is_anything(pTHX_ const regnode_ssc *ssc) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_SSC_IS_ANYTHING \ + assert(ssc) + +STATIC int S_ssc_is_cp_posixl_init(pTHX_ const RExC_state_t *pRExC_state, const regnode_ssc *ssc) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SSC_IS_CP_POSIXL_INIT \ + assert(pRExC_state); assert(ssc) + +STATIC void S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *or_with) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_SSC_OR \ + assert(pRExC_state); assert(ssc); assert(or_with) + +PERL_STATIC_INLINE void S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_SSC_UNION \ + assert(ssc); assert(invlist) + +STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3) @@ -6759,13 +7003,31 @@ STATIC I32 S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last) #endif -#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) -PERL_STATIC_INLINE UV* S__get_invlist_len_addr(pTHX_ SV* invlist) +#if defined(PERL_IN_REGCOMP_C) || defined (PERL_IN_DUMP_C) +PERL_CALLCONV void Perl__invlist_dump(pTHX_ PerlIO *file, I32 level, const char* const indent, SV* const invlist) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_3) + __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT__INVLIST_DUMP \ + assert(file); assert(indent); assert(invlist) + +#endif +#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C) +PERL_CALLCONV SV* Perl__new_invlist_C_array(pTHX_ const UV* const list) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT__GET_INVLIST_LEN_ADDR \ - assert(invlist) +#define PERL_ARGS_ASSERT__NEW_INVLIST_C_ARRAY \ + assert(list) + +#endif +#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) +PERL_CALLCONV SV* Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **lonly_utf8_locale) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT__GET_REGCLASS_NONBITMAP_DATA \ + assert(node) +#endif +#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) PERL_CALLCONV SV* Perl__get_swash_invlist(pTHX_ SV* const swash) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -6802,6 +7064,12 @@ PERL_CALLCONV HV* Perl__swash_inversion_hash(pTHX_ SV* const swash) #define PERL_ARGS_ASSERT__SWASH_INVERSION_HASH \ assert(swash) +PERL_STATIC_INLINE bool* S_get_invlist_offset_addr(pTHX_ SV* invlist) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_GET_INVLIST_OFFSET_ADDR \ + assert(invlist) + #endif #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C) PERL_CALLCONV SV* Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none, SV* invlist, U8* const flags_p) @@ -6820,7 +7088,7 @@ STATIC char* S_form_short_octal_warning(pTHX_ const char * const s, const STRLEN #define PERL_ARGS_ASSERT_FORM_SHORT_OCTAL_WARNING \ assert(s) -STATIC char S_grok_bslash_c(pTHX_ const char source, const bool utf8, const bool output_warning) +STATIC char S_grok_bslash_c(pTHX_ const char source, const bool output_warning) __attribute__warn_unused_result__; STATIC bool S_grok_bslash_o(pTHX_ char** s, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8) @@ -6856,7 +7124,7 @@ PERL_CALLCONV SV* Perl__add_range_to_invlist(pTHX_ SV* invlist, const UV start, __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); */ -PERL_CALLCONV void Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, bool complement_b, SV** i) +PERL_CALLCONV void Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const bool complement_b, SV** i) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4); #define PERL_ARGS_ASSERT__INVLIST_INTERSECTION_MAYBE_COMPLEMENT_2ND \ @@ -6867,11 +7135,6 @@ PERL_CALLCONV void Perl__invlist_invert(pTHX_ SV* const invlist) #define PERL_ARGS_ASSERT__INVLIST_INVERT \ assert(invlist) -PERL_CALLCONV void Perl__invlist_invert_prop(pTHX_ SV* const invlist) - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT__INVLIST_INVERT_PROP \ - assert(invlist) - PERL_CALLCONV void Perl__invlist_populate_swatch(pTHX_ SV* const invlist, const UV start, const UV end, U8* swatch) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_4); @@ -6887,7 +7150,7 @@ PERL_CALLCONV void Perl__invlist_populate_swatch(pTHX_ SV* const invlist, const __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); */ -PERL_CALLCONV void Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, bool complement_b, SV** output) +PERL_CALLCONV void Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const bool complement_b, SV** output) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_4); #define PERL_ARGS_ASSERT__INVLIST_UNION_MAYBE_COMPLEMENT_2ND \ @@ -6896,6 +7159,12 @@ PERL_CALLCONV void Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, S PERL_CALLCONV SV* Perl__new_invlist(pTHX_ IV initial_size) __attribute__warn_unused_result__; +PERL_CALLCONV SV* Perl__setup_canned_invlist(pTHX_ const STRLEN size, const UV element0, UV** other_elements_ptr) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT__SETUP_CANNED_INVLIST \ + assert(other_elements_ptr) + PERL_CALLCONV SV* Perl__swash_to_invlist(pTHX_ SV* const swash) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -6904,13 +7173,7 @@ PERL_CALLCONV SV* Perl__swash_to_invlist(pTHX_ SV* const swash) #endif #if defined(PERL_IN_REGEXEC_C) -STATIC SV* S_core_regclass_swash(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp) - __attribute__warn_unused_result__ - __attribute__nonnull__(pTHX_2); -#define PERL_ARGS_ASSERT_CORE_REGCLASS_SWASH \ - assert(node) - -STATIC char* S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, const char *strend, regmatch_info *reginfo, bool is_utf_pat) +STATIC char* S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, const char *strend, regmatch_info *reginfo) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) @@ -6946,28 +7209,37 @@ STATIC CHECKPOINT S_regcppush(pTHX_ const regexp *rex, I32 parenfloor, U32 maxop #define PERL_ARGS_ASSERT_REGCPPUSH \ assert(rex) -STATIC U8* S_reghop3(U8 *s, I32 off, const U8 *lim) +STATIC U8* S_reghop3(U8 *s, SSize_t off, const U8 *lim) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(3); #define PERL_ARGS_ASSERT_REGHOP3 \ assert(s); assert(lim) -STATIC U8* S_reghopmaybe3(U8 *s, I32 off, const U8 *lim) +STATIC U8* S_reghop4(U8 *s, SSize_t off, const U8 *llim, const U8 *rlim) + __attribute__warn_unused_result__ + __attribute__nonnull__(1) + __attribute__nonnull__(3) + __attribute__nonnull__(4); +#define PERL_ARGS_ASSERT_REGHOP4 \ + assert(s); assert(llim); assert(rlim) + +STATIC U8* S_reghopmaybe3(U8 *s, SSize_t off, const U8 *lim) __attribute__warn_unused_result__ __attribute__nonnull__(1) __attribute__nonnull__(3); #define PERL_ARGS_ASSERT_REGHOPMAYBE3 \ assert(s); assert(lim) -STATIC bool S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8 * const p, bool const utf8_target) +STATIC bool S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8 * const p, const U8 * const p_end, bool const utf8_target) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2) - __attribute__nonnull__(pTHX_3); + __attribute__nonnull__(pTHX_3) + __attribute__nonnull__(pTHX_4); #define PERL_ARGS_ASSERT_REGINCLASS \ - assert(n); assert(p) + assert(n); assert(p); assert(p_end) -STATIC I32 S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) +STATIC SSize_t S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) @@ -6975,13 +7247,14 @@ STATIC I32 S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *pro #define PERL_ARGS_ASSERT_REGMATCH \ assert(reginfo); assert(startpos); assert(prog) -STATIC I32 S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, I32 max, int depth, bool is_utf8_pat) +STATIC I32 S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, regmatch_info *const reginfo, I32 max, int depth) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) - __attribute__nonnull__(pTHX_3); + __attribute__nonnull__(pTHX_3) + __attribute__nonnull__(pTHX_4); #define PERL_ARGS_ASSERT_REGREPEAT \ - assert(prog); assert(startposp); assert(p) + assert(prog); assert(startposp); assert(p); assert(reginfo) STATIC I32 S_regtry(pTHX_ regmatch_info *reginfo, char **startposp) __attribute__warn_unused_result__ @@ -7000,16 +7273,6 @@ STATIC void S_to_utf8_substr(pTHX_ regexp * prog) #define PERL_ARGS_ASSERT_TO_UTF8_SUBSTR \ assert(prog) -# if defined(XXX_dmq) -STATIC U8* S_reghop4(U8 *s, I32 off, const U8 *llim, const U8 *rlim) - __attribute__warn_unused_result__ - __attribute__nonnull__(1) - __attribute__nonnull__(3) - __attribute__nonnull__(4); -#define PERL_ARGS_ASSERT_REGHOP4 \ - assert(s); assert(llim); assert(rlim) - -# endif #endif #if defined(PERL_IN_SCOPE_C) STATIC void S_save_pushptri32ptr(pTHX_ void *const ptr1, const I32 i, void *const ptr2, const int type); @@ -7233,7 +7496,7 @@ STATIC char* S_force_version(pTHX_ char *s, int guessing) #define PERL_ARGS_ASSERT_FORCE_VERSION \ assert(s) -STATIC char* S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack, int allow_tick) +STATIC char* S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_FORCE_WORD \ assert(start) @@ -7287,7 +7550,6 @@ STATIC void S_parse_ident(pTHX_ char **s, char **d, char * const e, int allow_pa assert(s); assert(d); assert(e) STATIC int S_pending_ident(pTHX); -STATIC void S_readpipe_override(pTHX); STATIC char* S_scan_const(pTHX_ char *start) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -7306,12 +7568,11 @@ STATIC char* S_scan_heredoc(pTHX_ char *s) #define PERL_ARGS_ASSERT_SCAN_HEREDOC \ assert(s) -STATIC char* S_scan_ident(pTHX_ char *s, const char *send, char *dest, STRLEN destlen, I32 ck_uni) +STATIC char* S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2) - __attribute__nonnull__(pTHX_3); + __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT_SCAN_IDENT \ - assert(s); assert(send); assert(dest) + assert(s); assert(dest) STATIC char* S_scan_inputsymbol(pTHX_ char *start) __attribute__warn_unused_result__ @@ -7325,7 +7586,7 @@ STATIC char* S_scan_pat(pTHX_ char *start, I32 type) #define PERL_ARGS_ASSERT_SCAN_PAT \ assert(start) -STATIC char* S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims, int re_reparse, bool deprecate_escaped_matching) +STATIC char* S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims, int re_reparse, bool deprecate_escaped_matching, char **delimp) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SCAN_STR \ @@ -7350,10 +7611,10 @@ STATIC char* S_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow_pa #define PERL_ARGS_ASSERT_SCAN_WORD \ assert(s); assert(dest); assert(slp) -STATIC char* S_skipspace(pTHX_ char *s) +STATIC char* S_skipspace_flags(pTHX_ char *s, U32 flags) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_SKIPSPACE \ +#define PERL_ARGS_ASSERT_SKIPSPACE_FLAGS \ assert(s) STATIC I32 S_sublex_done(pTHX) @@ -7431,7 +7692,7 @@ PERL_STATIC_INLINE STRLEN S_is_utf8_char_slow(const U8 *s, const STRLEN len) #define PERL_ARGS_ASSERT_IS_UTF8_CHAR_SLOW \ assert(s) -PERL_STATIC_INLINE bool S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname) +PERL_STATIC_INLINE bool S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname, SV* const invlist) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) @@ -7458,7 +7719,7 @@ PERL_CALLCONV UV Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *le #endif #if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) -PERL_CALLCONV UV Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const bool flags) +PERL_CALLCONV UV Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const unsigned int flags) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT__TO_FOLD_LATIN1 \ @@ -7467,11 +7728,6 @@ PERL_CALLCONV UV Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, con #endif #if defined(PERL_IN_UTIL_C) STATIC bool S_ckwarn_common(pTHX_ U32 w); -STATIC const COP* S_closest_cop(pTHX_ const COP *cop, const OP *o) - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_CLOSEST_COP \ - assert(cop) - STATIC bool S_invoke_exception_hook(pTHX_ SV *ex, bool warn); STATIC SV* S_mess_alloc(pTHX); STATIC SV * S_with_queued_errors(pTHX_ SV *ex) @@ -7612,78 +7868,6 @@ PERL_CALLCONV void Perl_xmldump_vindent(pTHX_ I32 level, PerlIO *file, const cha assert(file); assert(pat) #endif -#if defined(PERL_NEED_MY_BETOH16) -PERL_CALLCONV U16 Perl_my_betoh16(U16 n); -#endif -#if defined(PERL_NEED_MY_BETOH32) -PERL_CALLCONV U32 Perl_my_betoh32(U32 n); -#endif -#if defined(PERL_NEED_MY_BETOH64) -PERL_CALLCONV U64 Perl_my_betoh64(U64 n); -#endif -#if defined(PERL_NEED_MY_BETOHI) -PERL_CALLCONV int Perl_my_betohi(int n); -#endif -#if defined(PERL_NEED_MY_BETOHL) -PERL_CALLCONV long Perl_my_betohl(long n); -#endif -#if defined(PERL_NEED_MY_BETOHS) -PERL_CALLCONV short Perl_my_betohs(short n); -#endif -#if defined(PERL_NEED_MY_HTOBE16) -PERL_CALLCONV U16 Perl_my_htobe16(U16 n); -#endif -#if defined(PERL_NEED_MY_HTOBE32) -PERL_CALLCONV U32 Perl_my_htobe32(U32 n); -#endif -#if defined(PERL_NEED_MY_HTOBE64) -PERL_CALLCONV U64 Perl_my_htobe64(U64 n); -#endif -#if defined(PERL_NEED_MY_HTOBEI) -PERL_CALLCONV int Perl_my_htobei(int n); -#endif -#if defined(PERL_NEED_MY_HTOBEL) -PERL_CALLCONV long Perl_my_htobel(long n); -#endif -#if defined(PERL_NEED_MY_HTOBES) -PERL_CALLCONV short Perl_my_htobes(short n); -#endif -#if defined(PERL_NEED_MY_HTOLE16) -PERL_CALLCONV U16 Perl_my_htole16(U16 n); -#endif -#if defined(PERL_NEED_MY_HTOLE32) -PERL_CALLCONV U32 Perl_my_htole32(U32 n); -#endif -#if defined(PERL_NEED_MY_HTOLE64) -PERL_CALLCONV U64 Perl_my_htole64(U64 n); -#endif -#if defined(PERL_NEED_MY_HTOLEI) -PERL_CALLCONV int Perl_my_htolei(int n); -#endif -#if defined(PERL_NEED_MY_HTOLEL) -PERL_CALLCONV long Perl_my_htolel(long n); -#endif -#if defined(PERL_NEED_MY_HTOLES) -PERL_CALLCONV short Perl_my_htoles(short n); -#endif -#if defined(PERL_NEED_MY_LETOH16) -PERL_CALLCONV U16 Perl_my_letoh16(U16 n); -#endif -#if defined(PERL_NEED_MY_LETOH32) -PERL_CALLCONV U32 Perl_my_letoh32(U32 n); -#endif -#if defined(PERL_NEED_MY_LETOH64) -PERL_CALLCONV U64 Perl_my_letoh64(U64 n); -#endif -#if defined(PERL_NEED_MY_LETOHI) -PERL_CALLCONV int Perl_my_letohi(int n); -#endif -#if defined(PERL_NEED_MY_LETOHL) -PERL_CALLCONV long Perl_my_letohl(long n); -#endif -#if defined(PERL_NEED_MY_LETOHS) -PERL_CALLCONV short Perl_my_letohs(short n); -#endif #if defined(PERL_USES_PL_PIDSTATUS) && defined(PERL_IN_UTIL_C) STATIC void S_pidgone(pTHX_ Pid_t pid, int status); #endif @@ -7860,7 +8044,7 @@ PERL_CALLCONV char* Perl_sv_collxfrm_flags(pTHX_ SV *const sv, STRLEN *const nxp assert(sv); assert(nxp) #endif -#if defined(USE_PERLIO) && !defined(USE_SFIO) +#if defined(USE_PERLIO) PERL_CALLCONV void Perl_PerlIO_clearerr(pTHX_ PerlIO *f); PERL_CALLCONV int Perl_PerlIO_close(pTHX_ PerlIO *f); PERL_CALLCONV int Perl_PerlIO_eof(pTHX_ PerlIO *f); @@ -7869,10 +8053,10 @@ PERL_CALLCONV int Perl_PerlIO_fileno(pTHX_ PerlIO *f); PERL_CALLCONV int Perl_PerlIO_fill(pTHX_ PerlIO *f); PERL_CALLCONV int Perl_PerlIO_flush(pTHX_ PerlIO *f); PERL_CALLCONV STDCHAR * Perl_PerlIO_get_base(pTHX_ PerlIO *f); -PERL_CALLCONV int Perl_PerlIO_get_bufsiz(pTHX_ PerlIO *f) +PERL_CALLCONV SSize_t Perl_PerlIO_get_bufsiz(pTHX_ PerlIO *f) __attribute__warn_unused_result__; -PERL_CALLCONV int Perl_PerlIO_get_cnt(pTHX_ PerlIO *f) +PERL_CALLCONV SSize_t Perl_PerlIO_get_cnt(pTHX_ PerlIO *f) __attribute__warn_unused_result__; PERL_CALLCONV STDCHAR * Perl_PerlIO_get_ptr(pTHX_ PerlIO *f); @@ -7882,8 +8066,8 @@ PERL_CALLCONV SSize_t Perl_PerlIO_read(pTHX_ PerlIO *f, void *vbuf, Size_t count assert(vbuf) PERL_CALLCONV int Perl_PerlIO_seek(pTHX_ PerlIO *f, Off_t offset, int whence); -PERL_CALLCONV void Perl_PerlIO_set_cnt(pTHX_ PerlIO *f, int cnt); -PERL_CALLCONV void Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR *ptr, int cnt); +PERL_CALLCONV void Perl_PerlIO_set_cnt(pTHX_ PerlIO *f, SSize_t cnt); +PERL_CALLCONV void Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR *ptr, SSize_t cnt); PERL_CALLCONV void Perl_PerlIO_setlinebuf(pTHX_ PerlIO *f); PERL_CALLCONV PerlIO * Perl_PerlIO_stderr(pTHX) __attribute__warn_unused_result__; @@ -7907,6 +8091,9 @@ PERL_CALLCONV SSize_t Perl_PerlIO_write(pTHX_ PerlIO *f, const void *vbuf, Size_ #endif #if defined(WIN32) +PERL_CALLCONV char* Perl_my_setlocale(pTHX_ int category, const char* locale) + __attribute__pure__; + PERL_CALLCONV_NO_RET void win32_croak_not_implemented(const char * fname) __attribute__noreturn__ __attribute__nonnull__(1); diff --git a/Master/tlpkg/tlperl/lib/CORE/reentr.h b/Master/tlpkg/tlperl/lib/CORE/reentr.h index 3510fc55457..c268851922c 100644 --- a/Master/tlpkg/tlperl/lib/CORE/reentr.h +++ b/Master/tlpkg/tlperl/lib/CORE/reentr.h @@ -41,13 +41,11 @@ #ifdef __hpux # undef HAS_CRYPT_R -# undef HAS_DRAND48_R # undef HAS_ENDGRENT_R # undef HAS_ENDPWENT_R # undef HAS_GETGRENT_R # undef HAS_GETPWENT_R # undef HAS_SETLOCALE_R -# undef HAS_SRAND48_R # undef HAS_STRERROR_R # define NETDB_R_OBSOLETE #endif @@ -101,9 +99,6 @@ #ifdef I_NETDB # include <netdb.h> #endif -#ifdef I_STDLIB -# include <stdlib.h> /* drand48_data */ -#endif #ifdef I_CRYPT # ifdef I_CRYPT # include <crypt.h> @@ -150,48 +145,43 @@ #define REENTRANT_PROTO_I_ISD 33 #define REENTRANT_PROTO_I_LISBI 34 #define REENTRANT_PROTO_I_LISD 35 -#define REENTRANT_PROTO_I_LS 36 -#define REENTRANT_PROTO_I_SB 37 -#define REENTRANT_PROTO_I_SBI 38 -#define REENTRANT_PROTO_I_SBIE 39 -#define REENTRANT_PROTO_I_SBIH 40 -#define REENTRANT_PROTO_I_SBIR 41 -#define REENTRANT_PROTO_I_SBWR 42 -#define REENTRANT_PROTO_I_SBWRE 43 -#define REENTRANT_PROTO_I_SD 44 -#define REENTRANT_PROTO_I_ST 45 -#define REENTRANT_PROTO_I_St 46 -#define REENTRANT_PROTO_I_TISD 47 -#define REENTRANT_PROTO_I_TS 48 -#define REENTRANT_PROTO_I_TSBI 49 -#define REENTRANT_PROTO_I_TSBIR 50 -#define REENTRANT_PROTO_I_TSBWR 51 -#define REENTRANT_PROTO_I_TSR 52 -#define REENTRANT_PROTO_I_TsISBWRE 53 -#define REENTRANT_PROTO_I_UISBWRE 54 -#define REENTRANT_PROTO_I_iS 55 -#define REENTRANT_PROTO_I_lS 56 -#define REENTRANT_PROTO_I_uISBWRE 57 -#define REENTRANT_PROTO_S_CBI 58 -#define REENTRANT_PROTO_S_CCSBI 59 -#define REENTRANT_PROTO_S_CIISBIE 60 -#define REENTRANT_PROTO_S_CSBI 61 -#define REENTRANT_PROTO_S_CSBIE 62 -#define REENTRANT_PROTO_S_CWISBIE 63 -#define REENTRANT_PROTO_S_CWISBWIE 64 -#define REENTRANT_PROTO_S_ICSBI 65 -#define REENTRANT_PROTO_S_ISBI 66 -#define REENTRANT_PROTO_S_LISBI 67 -#define REENTRANT_PROTO_S_SBI 68 -#define REENTRANT_PROTO_S_SBIE 69 -#define REENTRANT_PROTO_S_SBW 70 -#define REENTRANT_PROTO_S_TISBI 71 -#define REENTRANT_PROTO_S_TSBI 72 -#define REENTRANT_PROTO_S_TSBIE 73 -#define REENTRANT_PROTO_S_TWISBIE 74 -#define REENTRANT_PROTO_V_D 75 -#define REENTRANT_PROTO_V_H 76 -#define REENTRANT_PROTO_V_ID 77 +#define REENTRANT_PROTO_I_SB 36 +#define REENTRANT_PROTO_I_SBI 37 +#define REENTRANT_PROTO_I_SBIE 38 +#define REENTRANT_PROTO_I_SBIH 39 +#define REENTRANT_PROTO_I_SBIR 40 +#define REENTRANT_PROTO_I_SBWR 41 +#define REENTRANT_PROTO_I_SBWRE 42 +#define REENTRANT_PROTO_I_SD 43 +#define REENTRANT_PROTO_I_TISD 44 +#define REENTRANT_PROTO_I_TS 45 +#define REENTRANT_PROTO_I_TSBI 46 +#define REENTRANT_PROTO_I_TSBIR 47 +#define REENTRANT_PROTO_I_TSBWR 48 +#define REENTRANT_PROTO_I_TSR 49 +#define REENTRANT_PROTO_I_TsISBWRE 50 +#define REENTRANT_PROTO_I_UISBWRE 51 +#define REENTRANT_PROTO_I_uISBWRE 52 +#define REENTRANT_PROTO_S_CBI 53 +#define REENTRANT_PROTO_S_CCSBI 54 +#define REENTRANT_PROTO_S_CIISBIE 55 +#define REENTRANT_PROTO_S_CSBI 56 +#define REENTRANT_PROTO_S_CSBIE 57 +#define REENTRANT_PROTO_S_CWISBIE 58 +#define REENTRANT_PROTO_S_CWISBWIE 59 +#define REENTRANT_PROTO_S_ICSBI 60 +#define REENTRANT_PROTO_S_ISBI 61 +#define REENTRANT_PROTO_S_LISBI 62 +#define REENTRANT_PROTO_S_SBI 63 +#define REENTRANT_PROTO_S_SBIE 64 +#define REENTRANT_PROTO_S_SBW 65 +#define REENTRANT_PROTO_S_TISBI 66 +#define REENTRANT_PROTO_S_TSBI 67 +#define REENTRANT_PROTO_S_TSBIE 68 +#define REENTRANT_PROTO_S_TWISBIE 69 +#define REENTRANT_PROTO_V_D 70 +#define REENTRANT_PROTO_V_H 71 +#define REENTRANT_PROTO_V_ID 72 /* Defines for indicating which special features are supported. */ @@ -639,10 +629,6 @@ typedef struct { char* _ctime_buffer; size_t _ctime_size; #endif /* HAS_CTIME_R */ -#ifdef HAS_DRAND48_R - struct drand48_data _drand48_struct; - double _drand48_double; -#endif /* HAS_DRAND48_R */ #ifdef HAS_GETGRNAM_R struct group _grent_struct; char* _grent_buffer; @@ -740,18 +726,6 @@ typedef struct { FILE* _spent_fptr; # endif #endif /* HAS_GETSPNAM_R */ -#ifdef HAS_RANDOM_R - struct random_data _random_struct; -# if RANDOM_R_PROTO == REENTRANT_PROTO_I_iS - int _random_retval; -# endif -# if RANDOM_R_PROTO == REENTRANT_PROTO_I_lS - long _random_retval; -# endif -# if RANDOM_R_PROTO == REENTRANT_PROTO_I_St - int32_t _random_retval; -# endif -#endif /* HAS_RANDOM_R */ #ifdef HAS_READDIR_R struct dirent* _readdir_struct; size_t _readdir_size; @@ -770,9 +744,6 @@ typedef struct { char* _setlocale_buffer; size_t _setlocale_size; #endif /* HAS_SETLOCALE_R */ -#ifdef HAS_SRANDOM_R - struct random_data _srandom_struct; -#endif /* HAS_SRANDOM_R */ #ifdef HAS_STRERROR_R char* _strerror_buffer; size_t _strerror_size; @@ -844,15 +815,6 @@ typedef struct { # endif #endif /* HAS_CTIME_R */ -#ifdef HAS_DRAND48_R -# if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) -# undef drand48 -# if !defined(drand48) && DRAND48_R_PROTO == REENTRANT_PROTO_I_ST -# define drand48() (drand48_r(&PL_reentrant_buffer->_drand48_struct, &PL_reentrant_buffer->_drand48_double) == 0 ? PL_reentrant_buffer->_drand48_double : 0) -# endif -# endif -#endif /* HAS_DRAND48_R */ - #ifdef HAS_ENDGRENT_R # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) # undef endgrent @@ -1324,21 +1286,6 @@ typedef struct { # endif #endif /* HAS_GETSPNAM_R */ -#ifdef HAS_RANDOM_R -# if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) -# undef random -# if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_iS -# define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0) -# endif -# if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_lS -# define random() (random_r(&PL_reentrant_buffer->_random_retval, &PL_reentrant_buffer->_random_struct) == 0 ? PL_reentrant_buffer->_random_retval : 0) -# endif -# if !defined(random) && RANDOM_R_PROTO == REENTRANT_PROTO_I_St -# define random() (random_r(&PL_reentrant_buffer->_random_struct, &PL_reentrant_buffer->_random_retval) == 0 ? PL_reentrant_buffer->_random_retval : 0) -# endif -# endif -#endif /* HAS_RANDOM_R */ - #ifdef HAS_READDIR_R # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) # undef readdir @@ -1444,24 +1391,6 @@ typedef struct { # endif #endif /* HAS_SETSERVENT_R */ -#ifdef HAS_SRAND48_R -# if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) -# undef srand48 -# if !defined(srand48) && SRAND48_R_PROTO == REENTRANT_PROTO_I_LS -# define srand48(a) (srand48_r(a, &PL_reentrant_buffer->_drand48_struct) == 0 ? &PL_reentrant_buffer->_drand48_struct : 0) -# endif -# endif -#endif /* HAS_SRAND48_R */ - -#ifdef HAS_SRANDOM_R -# if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) -# undef srandom -# if !defined(srandom) && SRANDOM_R_PROTO == REENTRANT_PROTO_I_TS -# define srandom(a) (srandom_r(a, &PL_reentrant_buffer->_srandom_struct) == 0 ? &PL_reentrant_buffer->_srandom_struct : 0) -# endif -# endif -#endif /* HAS_SRANDOM_R */ - #ifdef HAS_STRERROR_R # if defined(PERL_REENTR_API) && (PERL_REENTR_API+0 == 1) # undef strerror diff --git a/Master/tlpkg/tlperl/lib/CORE/regcharclass.h b/Master/tlpkg/tlperl/lib/CORE/regcharclass.h index e51fe64af40..5e34ec0d916 100644 --- a/Master/tlpkg/tlperl/lib/CORE/regcharclass.h +++ b/Master/tlpkg/tlperl/lib/CORE/regcharclass.h @@ -10,6 +10,8 @@ * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! * This file is built by regen/regcharclass.pl. * Any changes made here will be lost! + * WARNING: These macros are for internal Perl core use only, and may be + * changed or removed without notice. */ @@ -23,84 +25,57 @@ \p{VertSpace} */ /*** GENERATED CODE ***/ -#define is_LNBREAK(s,is_utf8) \ -( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ -: ( 0x0D == ((U8*)s)[0] ) ? \ - ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ -: ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ -: ( 0x85 == ((U8*)s)[0] ) ) - -/*** GENERATED CODE ***/ #define is_LNBREAK_safe(s,e,is_utf8) \ ( ((e)-(s) > 2) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ - : ( 0x0D == ((U8*)s)[0] ) ? \ - ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) ? 1\ + : ( 0x0D == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x0A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 1 ) \ : ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ - : ( 0x85 == ((U8*)s)[0] ) ) \ + ( ( 0xC2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ + : ( ( ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ + : ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ) \ : ((e)-(s) > 1) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ - : ( 0x0D == ((U8*)s)[0] ) ? \ - ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) ? 1\ + : ( 0x0D == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x0A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 1 ) \ : ( is_utf8 ) ? \ - ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ - : ( 0x85 == ((U8*)s)[0] ) ) \ + ( ( ( 0xC2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) ? 2 : 0 )\ + : ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ) \ : ((e)-(s) > 0) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ + ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0D ) ? 1\ : ( !( is_utf8 ) ) ? \ - ( 0x85 == ((U8*)s)[0] ) \ + ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) \ : 0 ) \ : 0 ) /*** GENERATED CODE ***/ -#define is_LNBREAK_utf8(s) \ -( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ -: ( 0x0D == ((U8*)s)[0] ) ? \ - ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ -: ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ -: ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 ) - -/*** GENERATED CODE ***/ #define is_LNBREAK_utf8_safe(s,e) \ ( ((e)-(s) > 2) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ - : ( 0x0D == ((U8*)s)[0] ) ? \ - ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ - : ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ + ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) ? 1\ + : ( 0x0D == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x0A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 1 ) \ + : ( 0xC2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ + : ( ( ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ : ((e)-(s) > 1) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ - : ( 0x0D == ((U8*)s)[0] ) ? \ - ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ - : ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ + ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) ? 1\ + : ( 0x0D == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x0A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 1 ) \ + : ( ( 0xC2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) ? 2 : 0 )\ : ((e)-(s) > 0) ? \ - ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \ -: 0 ) - -/*** GENERATED CODE ***/ -#define is_LNBREAK_latin1(s) \ -( ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) || 0x85 == ((U8*)s)[0] ) ? 1\ -: ( 0x0D == ((U8*)s)[0] ) ? \ - ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0D )\ : 0 ) /*** GENERATED CODE ***/ #define is_LNBREAK_latin1_safe(s,e) \ ( ((e)-(s) > 1) ? \ - ( ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) || 0x85 == ((U8*)s)[0] ) ? 1\ - : ( 0x0D == ((U8*)s)[0] ) ? \ - ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + ( ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) || 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? 1\ + : ( 0x0D == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x0A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 1 ) \ : 0 ) \ : ((e)-(s) > 0) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\ + ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0D ) || 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) )\ : 0 ) /* @@ -109,142 +84,21 @@ \p{HorizSpace} */ /*** GENERATED CODE ***/ -#define is_HORIZWS(s,is_utf8) \ -( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ -: ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )\ -: ( 0xA0 == ((U8*)s)[0] ) ) - -/*** GENERATED CODE ***/ -#define is_HORIZWS_safe(s,e,is_utf8) \ -( ((e)-(s) > 2) ? \ - ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ - : ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 )\ - : ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 )\ - : ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )\ - : ( 0xA0 == ((U8*)s)[0] ) ) \ -: ((e)-(s) > 1) ? \ - ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ - : ( is_utf8 ) ? \ - ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0xA0 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ - : ( 0xA0 == ((U8*)s)[0] ) ) \ -: ((e)-(s) > 0) ? \ - ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ - : ( !( is_utf8 ) ) ? \ - ( 0xA0 == ((U8*)s)[0] ) \ - : 0 ) \ -: 0 ) - -/*** GENERATED CODE ***/ -#define is_HORIZWS_utf8(s) \ -( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ -: ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ -: ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) - -/*** GENERATED CODE ***/ -#define is_HORIZWS_utf8_safe(s,e) \ -( ((e)-(s) > 2) ? \ - ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ - : ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )\ -: ((e)-(s) > 1) ? \ - ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ - : ( ( 0xC2 == ((U8*)s)[0] ) && ( 0xA0 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ -: ((e)-(s) > 0) ? \ - ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) \ -: 0 ) - -/*** GENERATED CODE ***/ -#define is_HORIZWS_latin1(s) \ -( ((U8*)s)[0] == 0x09 || ( ( ((U8*)s)[0] & 0x7F ) == 0x20 ) ) - -/*** GENERATED CODE ***/ -#define is_HORIZWS_latin1_safe(s,e) \ -( ((e)-(s) > 0) ? \ - ( ((U8*)s)[0] == 0x09 || ( ( ((U8*)s)[0] & 0x7F ) == 0x20 ) ) \ -: 0 ) - -/*** GENERATED CODE ***/ #define is_HORIZWS_high(s) \ -( ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) - -/*** GENERATED CODE ***/ -#define is_HORIZWS_high_safe(s,e) \ -( ((e)-(s) > 2) ? \ - ( ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )\ -: 0 ) - -/*** GENERATED CODE ***/ -#define is_HORIZWS_cp(cp) \ -( 0x09 == cp || ( 0x09 < cp && \ -( 0x20 == cp || ( 0x20 < cp && \ -( 0xA0 == cp || ( 0xA0 < cp && \ -( 0x1680 == cp || ( 0x1680 < cp && \ -( 0x180E == cp || ( 0x180E < cp && \ -( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \ -( 0x202F == cp || ( 0x202F < cp && \ -( 0x205F == cp || 0x3000 == cp ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) +( ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0x9A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ +: ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x8A ) || 0xAF == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 )\ + : ( ( 0x81 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ +: ( ( ( 0xE3 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 ) /*** GENERATED CODE ***/ #define is_HORIZWS_cp_high(cp) \ -( 0x1680 == cp || ( 0x1680 < cp && \ -( 0x180E == cp || ( 0x180E < cp && \ -( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \ -( 0x202F == cp || ( 0x202F < cp && \ -( 0x205F == cp || 0x3000 == cp ) ) ) ) ) ) ) ) ) +( 0x1680 == NATIVE_TO_UNI(cp) || ( 0x1680 < NATIVE_TO_UNI(cp) && \ +( ( 0x2000 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0x200A ) || ( 0x200A < NATIVE_TO_UNI(cp) &&\ +( 0x202F == NATIVE_TO_UNI(cp) || ( 0x202F < NATIVE_TO_UNI(cp) && \ +( 0x205F == NATIVE_TO_UNI(cp) || 0x3000 == NATIVE_TO_UNI(cp) ) ) ) ) ) ) ) /* VERTWS: Vertical Whitespace: \v \V @@ -252,83 +106,12 @@ \p{VertSpace} */ /*** GENERATED CODE ***/ -#define is_VERTWS(s,is_utf8) \ -( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ -: ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ -: ( 0x85 == ((U8*)s)[0] ) ) - -/*** GENERATED CODE ***/ -#define is_VERTWS_safe(s,e,is_utf8) \ -( ((e)-(s) > 2) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ - : ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ - : ( 0x85 == ((U8*)s)[0] ) ) \ -: ((e)-(s) > 1) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ - : ( is_utf8 ) ? \ - ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ - : ( 0x85 == ((U8*)s)[0] ) ) \ -: ((e)-(s) > 0) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ - : ( !( is_utf8 ) ) ? \ - ( 0x85 == ((U8*)s)[0] ) \ - : 0 ) \ -: 0 ) - -/*** GENERATED CODE ***/ -#define is_VERTWS_utf8(s) \ -( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ -: ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ -: ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 ) - -/*** GENERATED CODE ***/ -#define is_VERTWS_utf8_safe(s,e) \ -( ((e)-(s) > 2) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ - : ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ -: ((e)-(s) > 1) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ - : ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ -: ((e)-(s) > 0) ? \ - ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \ -: 0 ) - -/*** GENERATED CODE ***/ #define is_VERTWS_high(s) \ -( ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 ) - -/*** GENERATED CODE ***/ -#define is_VERTWS_high_safe(s,e) \ -( ( ( ( ((e)-(s) > 2) && ( 0xE2 == ((U8*)s)[0] ) ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 ) - -/*** GENERATED CODE ***/ -#define is_VERTWS_latin1(s) \ -( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] ) - -/*** GENERATED CODE ***/ -#define is_VERTWS_latin1_safe(s,e) \ -( ((e)-(s) > 0) ? \ - ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\ -: 0 ) - -/*** GENERATED CODE ***/ -#define is_VERTWS_cp(cp) \ -( ( 0x0A <= cp && cp <= 0x0D ) || ( 0x0D < cp && \ -( 0x85 == cp || ( 0x85 < cp && \ -( 0x2028 == cp || 0x2029 == cp ) ) ) ) ) +( ( ( ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xA8 ) ) ? 3 : 0 ) /*** GENERATED CODE ***/ #define is_VERTWS_cp_high(cp) \ -( 0x2028 == cp || 0x2029 == cp ) +( 0x2028 == NATIVE_TO_UNI(cp) || 0x2029 == NATIVE_TO_UNI(cp) ) /* XDIGIT: Hexadecimal digits @@ -336,26 +119,17 @@ \p{XDigit} */ /*** GENERATED CODE ***/ -#define is_XDIGIT_utf8(s) \ -( ( ( 0x30 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x39 ) || ( 0x41 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x46 ) || ( 0x61 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x66 ) ) ? 1\ -: ( 0xEF == ((U8*)s)[0] ) ? \ - ( ( 0xBC == ((U8*)s)[1] ) ? \ - ( ( ( 0x90 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x99 ) || ( 0xA1 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xA6 ) ) ? 3 : 0 )\ - : ( ( 0xBD == ((U8*)s)[1] ) && ( 0x81 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 )\ -: 0 ) - -/*** GENERATED CODE ***/ #define is_XDIGIT_high(s) \ -( ( 0xEF == ((U8*)s)[0] ) ? \ - ( ( 0xBC == ((U8*)s)[1] ) ? \ - ( ( ( 0x90 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x99 ) || ( 0xA1 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xA6 ) ) ? 3 : 0 )\ - : ( ( 0xBD == ((U8*)s)[1] ) && ( 0x81 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 )\ +( ( 0xEF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xBC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0x90 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x99 ) || ( 0xA1 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xA6 ) ) ? 3 : 0 )\ + : ( ( 0xBD == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x81 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x86 ) ) ? 3 : 0 )\ : 0 ) /*** GENERATED CODE ***/ #define is_XDIGIT_cp_high(cp) \ -( ( 0xFF10 <= cp && cp <= 0xFF19 ) || ( 0xFF19 < cp && \ -( ( 0xFF21 <= cp && cp <= 0xFF26 ) || ( 0xFF41 <= cp && cp <= 0xFF46 ) ) ) ) +( ( 0xFF10 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0xFF19 ) || ( 0xFF19 < NATIVE_TO_UNI(cp) &&\ +( ( 0xFF21 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0xFF26 ) || ( 0xFF41 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0xFF46 ) ) ) ) /* XPERLSPACE: \p{XPerlSpace} @@ -363,58 +137,23 @@ \p{XPerlSpace} */ /*** GENERATED CODE ***/ -#define is_XPERLSPACE(s,is_utf8) \ -( ( ( 0x09 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x20 == ((U8*)s)[0] ) ? 1\ -: ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] || 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || ( ((U8*)s)[2] & 0xFE ) == 0xA8 || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )\ -: ( 0x85 == ((U8*)s)[0] || 0xA0 == ((U8*)s)[0] ) ) - -/*** GENERATED CODE ***/ -#define is_XPERLSPACE_utf8(s) \ -( ( ( 0x09 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x20 == ((U8*)s)[0] ) ? 1\ -: ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] || 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ -: ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( ((U8*)s)[2] <= 0x8A ) || ( ((U8*)s)[2] & 0xFE ) == 0xA8 || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) - -/*** GENERATED CODE ***/ #define is_XPERLSPACE_high(s) \ -( ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( ((U8*)s)[2] <= 0x8A ) || ( ((U8*)s)[2] & 0xFE ) == 0xA8 || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ - : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) +( ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0x9A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ +: ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x8A ) || ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xA8 || 0xAF == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 )\ + : ( ( 0x81 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ +: ( ( ( 0xE3 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 ) /*** GENERATED CODE ***/ #define is_XPERLSPACE_cp_high(cp) \ -( 0x1680 == cp || ( 0x1680 < cp && \ -( 0x180E == cp || ( 0x180E < cp && \ -( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \ -( 0x2028 == cp || ( 0x2028 < cp && \ -( 0x2029 == cp || ( 0x2029 < cp && \ -( 0x202F == cp || ( 0x202F < cp && \ -( 0x205F == cp || 0x3000 == cp ) ) ) ) ) ) ) ) ) ) ) ) ) +( 0x1680 == NATIVE_TO_UNI(cp) || ( 0x1680 < NATIVE_TO_UNI(cp) && \ +( ( 0x2000 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0x200A ) || ( 0x200A < NATIVE_TO_UNI(cp) &&\ +( 0x2028 == NATIVE_TO_UNI(cp) || ( 0x2028 < NATIVE_TO_UNI(cp) && \ +( 0x2029 == NATIVE_TO_UNI(cp) || ( 0x2029 < NATIVE_TO_UNI(cp) && \ +( 0x202F == NATIVE_TO_UNI(cp) || ( 0x202F < NATIVE_TO_UNI(cp) && \ +( 0x205F == NATIVE_TO_UNI(cp) || 0x3000 == NATIVE_TO_UNI(cp) ) ) ) ) ) ) ) ) ) ) ) /* REPLACEMENT: Unicode REPLACEMENT CHARACTER @@ -423,7 +162,7 @@ */ /*** GENERATED CODE ***/ #define is_REPLACEMENT_utf8_safe(s,e) \ -( ( ( ( ((e)-(s) > 2) && ( 0xEF == ((U8*)s)[0] ) ) && ( 0xBF == ((U8*)s)[1] ) ) && ( 0xBD == ((U8*)s)[2] ) ) ? 3 : 0 ) +( ( ( ( ( ((e) - (s)) >= 3 ) && ( 0xEF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ) && ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0xBD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 ) /* NONCHAR: Non character code points @@ -432,15 +171,15 @@ */ /*** GENERATED CODE ***/ #define is_NONCHAR_utf8(s) \ -( ( 0xEF == ((U8*)s)[0] ) ? \ - ( ( 0xB7 == ((U8*)s)[1] ) ? \ - ( ( 0x90 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xAF ) ? 3 : 0 ) \ - : ( ( 0xBF == ((U8*)s)[1] ) && ( ((U8*)s)[2] >= 0xBE ) ) ? 3 : 0 ) \ -: ( 0xF0 == ((U8*)s)[0] ) ? \ - ( ( ( ( ((U8*)s)[1] == 0x9F || ( ( ((U8*)s)[1] & 0xEF ) == 0xAF ) ) && ( 0xBF == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xBE ) ) ? 4 : 0 )\ -: ( 0xF1 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0xF3 ) ? \ - ( ( ( ( ( ((U8*)s)[1] & 0xCF ) == 0x8F ) && ( 0xBF == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xBE ) ) ? 4 : 0 )\ -: ( ( ( ( 0xF4 == ((U8*)s)[0] ) && ( 0x8F == ((U8*)s)[1] ) ) && ( 0xBF == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xBE ) ) ? 4 : 0 ) +( ( 0xEF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xB7 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0x90 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xAF ) ? 3 : 0 )\ + : ( ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0xBE ) ) ? 3 : 0 )\ +: ( 0xF0 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) == 0x9F || ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xEF ) == 0xAF ) ) && ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( NATIVE_TO_LATIN1(((U8*)s)[3]) >= 0xBE ) ) ? 4 : 0 )\ +: ( 0xF1 <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0xF3 ) ?\ + ( ( ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xCF ) == 0x8F ) && ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( NATIVE_TO_LATIN1(((U8*)s)[3]) >= 0xBE ) ) ? 4 : 0 )\ +: ( ( ( ( 0xF4 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x8F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( NATIVE_TO_LATIN1(((U8*)s)[3]) >= 0xBE ) ) ? 4 : 0 ) /* SURROGATE: Surrogate characters @@ -449,7 +188,7 @@ */ /*** GENERATED CODE ***/ #define is_SURROGATE_utf8(s) \ -( ( ( 0xED == ((U8*)s)[0] ) && ( ((U8*)s)[1] >= 0xA0 ) ) ? 3 : 0 ) +( ( ( 0xED == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( NATIVE_TO_LATIN1(((U8*)s)[1]) >= 0xA0 ) ) ? 3 : 0 ) /* GCB_L: Grapheme_Cluster_Break=L @@ -458,11 +197,11 @@ */ /*** GENERATED CODE ***/ #define is_GCB_L_utf8(s) \ -( ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x84 == ((U8*)s)[1] ) ? \ +( ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x84 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ 3 \ - : ( ( 0x85 == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0x9F ) ) ? 3 : 0 ) \ -: ( ( ( 0xEA == ((U8*)s)[0] ) && ( 0xA5 == ((U8*)s)[1] ) ) && ( 0xA0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBC ) ) ? 3 : 0 ) + : ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x9F ) ) ? 3 : 0 )\ +: ( ( ( 0xEA == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0xA5 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0xA0 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xBC ) ) ? 3 : 0 ) /* GCB_LV_LVT_V: Grapheme_Cluster_Break=(LV or LVT or V) @@ -471,22 +210,22 @@ */ /*** GENERATED CODE ***/ #define is_GCB_LV_LVT_V_utf8(s) \ -( ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] >= 0xA0 ) ? 3 : 0 ) \ - : ( ( 0x86 == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0xA7 ) ) ? 3 : 0 ) \ -: ( 0xEA == ((U8*)s)[0] ) ? \ - ( ( ((U8*)s)[1] >= 0xB0 ) ? \ +( ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0xA0 ) ? 3 : 0 ) \ + : ( ( 0x86 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xA7 ) ) ? 3 : 0 )\ +: ( 0xEA == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) >= 0xB0 ) ? \ 3 \ : 0 ) \ -: ( 0xEB == ((U8*)s)[0] || 0xEC == ((U8*)s)[0] ) ? \ +: ( 0xEB == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0xEC == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ 3 \ -: ( 0xED == ((U8*)s)[0] ) ? \ - ( ( ((U8*)s)[1] <= 0x9D ) ? \ +: ( 0xED == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) <= 0x9D ) ? \ 3 \ - : ( 0x9E == ((U8*)s)[1] ) ? \ - ( ( ( ((U8*)s)[2] <= 0xA3 ) || ( ((U8*)s)[2] >= 0xB0 ) ) ? 3 : 0 ) \ - : ( ( 0x9F == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 ) \ + : ( 0x9E == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xA3 ) || ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0xB0 ) ) ? 3 : 0 )\ + : ( ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x86 ) ) ? 3 : 0 )\ : 0 ) /* @@ -505,7 +244,7 @@ */ /*** GENERATED CODE ***/ #define is_GCB_RI_utf8(s) \ -( ( ( ( ( 0xF0 == ((U8*)s)[0] ) && ( 0x9F == ((U8*)s)[1] ) ) && ( 0x87 == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xA6 ) ) ? 4 : 0 ) +( ( ( ( ( 0xF0 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( NATIVE_TO_LATIN1(((U8*)s)[3]) >= 0xA6 ) ) ? 4 : 0 ) /* GCB_SPECIAL_BEGIN_START: Grapheme_Cluster_Break=special_begin_starts @@ -514,25 +253,25 @@ */ /*** GENERATED CODE ***/ #define is_GCB_SPECIAL_BEGIN_START_utf8(s) \ -( ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( ( ((U8*)s)[1] & 0xFC ) == 0x84 ) ? \ +( ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xFC ) == 0x84 ) ? \ 3 \ : 0 ) \ -: ( 0xEA == ((U8*)s)[0] ) ? \ - ( ( 0xA5 == ((U8*)s)[1] ) ? \ - ( ( 0xA0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBC ) ? 3 : 0 ) \ - : ( ((U8*)s)[1] >= 0xB0 ) ? \ +: ( 0xEA == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xA5 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xA0 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xBC ) ? 3 : 0 )\ + : ( NATIVE_TO_LATIN1(((U8*)s)[1]) >= 0xB0 ) ? \ 3 \ : 0 ) \ -: ( 0xEB == ((U8*)s)[0] || 0xEC == ((U8*)s)[0] ) ? \ +: ( 0xEB == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0xEC == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ 3 \ -: ( 0xED == ((U8*)s)[0] ) ? \ - ( ( ((U8*)s)[1] <= 0x9D ) ? \ +: ( 0xED == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) <= 0x9D ) ? \ 3 \ - : ( 0x9E == ((U8*)s)[1] ) ? \ - ( ( ( ((U8*)s)[2] <= 0xA3 ) || ( ((U8*)s)[2] >= 0xB0 ) ) ? 3 : 0 ) \ - : ( ( 0x9F == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] <= 0x86 ) || ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBB ) ) ) ? 3 : 0 )\ -: ( ( ( ( 0xF0 == ((U8*)s)[0] ) && ( 0x9F == ((U8*)s)[1] ) ) && ( 0x87 == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xA6 ) ) ? 4 : 0 ) + : ( 0x9E == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xA3 ) || ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0xB0 ) ) ? 3 : 0 )\ + : ( ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x86 ) || ( 0x8B <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xBB ) ) ) ? 3 : 0 )\ +: ( ( ( ( 0xF0 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( NATIVE_TO_LATIN1(((U8*)s)[3]) >= 0xA6 ) ) ? 4 : 0 ) /* GCB_T: Grapheme_Cluster_Break=T @@ -541,13 +280,13 @@ */ /*** GENERATED CODE ***/ #define is_GCB_T_utf8(s) \ -( ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x86 == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] >= 0xA8 ) ? 3 : 0 ) \ - : ( 0x87 == ((U8*)s)[1] ) ? \ +( ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x86 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0xA8 ) ? 3 : 0 ) \ + : ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ 3 \ : 0 ) \ -: ( ( ( 0xED == ((U8*)s)[0] ) && ( 0x9F == ((U8*)s)[1] ) ) && ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBB ) ) ? 3 : 0 ) +: ( ( ( 0xED == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0x8B <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xBB ) ) ? 3 : 0 ) /* GCB_V: Grapheme_Cluster_Break=V @@ -556,14 +295,14 @@ */ /*** GENERATED CODE ***/ #define is_GCB_V_utf8(s) \ -( ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] >= 0xA0 ) ? 3 : 0 ) \ - : ( ( 0x86 == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0xA7 ) ) ? 3 : 0 ) \ -: ( 0xED == ((U8*)s)[0] ) ? \ - ( ( 0x9E == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] >= 0xB0 ) ? 3 : 0 ) \ - : ( ( 0x9F == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 ) \ +( ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0xA0 ) ? 3 : 0 ) \ + : ( ( 0x86 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xA7 ) ) ? 3 : 0 )\ +: ( 0xED == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x9E == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0xB0 ) ? 3 : 0 ) \ + : ( ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x86 ) ) ? 3 : 0 )\ : 0 ) /* @@ -573,49 +312,51 @@ */ /*** GENERATED CODE ***/ #define is_QUOTEMETA_high(s) \ -( ( 0xCD == ((U8*)s)[0] ) ? \ - ( ( 0x8F == ((U8*)s)[1] ) ? 2 : 0 ) \ -: ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? \ - ( ( 0x9F == ((U8*)s)[2] || 0xA0 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( 0x9A == ((U8*)s)[1] ) ? \ - ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( 0x9E == ((U8*)s)[1] ) ? \ - ( ( ( ((U8*)s)[2] & 0xFE ) == 0xB4 ) ? 3 : 0 ) \ - : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8E ) ) ? 3 : 0 )\ -: ( 0xE2 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] <= 0xBE ) ? 3 : 0 ) \ - : ( 0x81 == ((U8*)s)[1] ) ? \ - ( ( ( 0x81 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x93 ) || ( 0x95 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xAF ) ) ? 3 : 0 )\ - : ( 0x86 == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] >= 0x90 ) ? 3 : 0 ) \ - : ( ( 0x87 <= ((U8*)s)[1] && ((U8*)s)[1] <= 0x90 ) || ( 0x94 <= ((U8*)s)[1] && ((U8*)s)[1] <= 0x9C ) || ( 0x9F <= ((U8*)s)[1] && ((U8*)s)[1] <= 0xAF ) || ( ((U8*)s)[1] & 0xFE ) == 0xB8 ) ?\ +( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x8F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xD8 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x9C == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[2]) || 0xA0 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 )\ + : ( 0x9A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 ) \ + : ( 0x9E == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xB4 ) ? 3 : 0 ) \ + : ( ( 0xA0 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8B <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x8E ) ) ? 3 : 0 )\ +: ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xBE ) ? 3 : 0 ) \ + : ( 0x81 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0x81 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x93 ) || ( 0x95 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xAF ) ) ? 3 : 0 )\ + : ( 0x86 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0x90 ) ? 3 : 0 ) \ + : ( ( 0x87 <= NATIVE_TO_LATIN1(((U8*)s)[1]) && NATIVE_TO_LATIN1(((U8*)s)[1]) <= 0x90 ) || ( 0x94 <= NATIVE_TO_LATIN1(((U8*)s)[1]) && NATIVE_TO_LATIN1(((U8*)s)[1]) <= 0x9C ) || ( 0x9F <= NATIVE_TO_LATIN1(((U8*)s)[1]) && NATIVE_TO_LATIN1(((U8*)s)[1]) <= 0xAF ) || ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xFE ) == 0xB8 ) ?\ 3 \ - : ( 0x91 == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] <= 0x9F ) ? 3 : 0 ) \ - : ( 0x9D == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] <= 0xB5 ) ? 3 : 0 ) \ - : ( ( 0x9E == ((U8*)s)[1] ) && ( ((U8*)s)[2] >= 0x94 ) ) ? 3 : 0 ) \ -: ( 0xE3 == ((U8*)s)[0] ) ? \ - ( ( 0x80 == ((U8*)s)[1] ) ? \ - ( ( ( ((U8*)s)[2] <= 0x83 ) || ( 0x88 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xA0 ) || 0xB0 == ((U8*)s)[2] ) ? 3 : 0 )\ - : ( ( 0x85 == ((U8*)s)[1] ) && ( 0xA4 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ -: ( 0xEF == ((U8*)s)[0] ) ? \ - ( ( 0xB4 == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] >= 0xBE ) ? 3 : 0 ) \ - : ( 0xB8 == ((U8*)s)[1] ) ? \ - ( ( ((U8*)s)[2] <= 0x8F ) ? 3 : 0 ) \ - : ( 0xB9 == ((U8*)s)[1] ) ? \ - ( ( 0x85 == ((U8*)s)[2] || 0x86 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( 0xBB == ((U8*)s)[1] ) ? \ - ( ( 0xBF == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( 0xBE == ((U8*)s)[1] ) ? \ - ( ( 0xA0 == ((U8*)s)[2] ) ? 3 : 0 ) \ - : ( ( 0xBF == ((U8*)s)[1] ) && ( 0xB0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xB8 ) ) ? 3 : 0 )\ -: ( 0xF0 == ((U8*)s)[0] ) ? \ - ( ( ( ( 0x9D == ((U8*)s)[1] ) && ( 0x85 == ((U8*)s)[2] ) ) && ( 0xB3 <= ((U8*)s)[3] && ((U8*)s)[3] <= 0xBA ) ) ? 4 : 0 )\ -: ( ( 0xF3 == ((U8*)s)[0] ) && ( 0xA0 == ((U8*)s)[1] ) ) ? 4 : 0 ) + : ( 0x91 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x9F ) ? 3 : 0 ) \ + : ( 0x9D == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xB5 ) ? 3 : 0 ) \ + : ( ( 0x9E == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0x94 ) ) ? 3 : 0 )\ +: ( 0xE3 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x83 ) || ( 0x88 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xA0 ) || 0xB0 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 )\ + : ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xA4 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ +: ( 0xEF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xB4 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) >= 0xBE ) ? 3 : 0 ) \ + : ( 0xB8 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x8F ) ? 3 : 0 ) \ + : ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[2]) || 0x86 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 )\ + : ( 0xBB == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 ) \ + : ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xA0 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 ) \ + : ( ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xB0 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0xB8 ) ) ? 3 : 0 )\ +: ( 0xF0 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( ( 0x9D == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xB3 <= NATIVE_TO_LATIN1(((U8*)s)[3]) && NATIVE_TO_LATIN1(((U8*)s)[3]) <= 0xBA ) ) ? 4 : 0 )\ +: ( ( 0xF3 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0xA0 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) ? 4 : 0 ) /* MULTI_CHAR_FOLD: multi-char strings that are folded to by a single character @@ -625,211 +366,233 @@ */ /*** GENERATED CODE ***/ #define is_MULTI_CHAR_FOLD_utf8_safe_part0(s,e) \ -( ( 0x61 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCA == ((U8*)s)[1] ) && ( 0xBE == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x66 == ((U8*)s)[0] ) ? \ - ( ( 0x66 == ((U8*)s)[1] ) ? \ - ( ( 0x69 == ((U8*)s)[2] || 0x6C == ((U8*)s)[2] ) ? 3 : 2 ) \ - : ( 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0x68 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0xB1 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x69 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x6A == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8C == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x73 == ((U8*)s)[0] ) ? \ - ( ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0x74 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x88 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x77 == ((U8*)s)[0] || 0x79 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8A == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xCA == ((U8*)s)[0] ) ? \ - ( ( ( 0xBC == ((U8*)s)[1] ) && ( 0x6E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xCE == ((U8*)s)[0] ) ? \ - ( ( ( ((U8*)s)[1] & 0xFD ) == 0xAC ) ? \ - ( ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xB1 == ((U8*)s)[1] || 0xB7 == ((U8*)s)[1] ) ? \ - ( ( 0xCD == ((U8*)s)[2] ) ? \ - ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \ - : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( ( ( 0xB9 == ((U8*)s)[1] ) && ( 0xCD == ((U8*)s)[2] ) ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xCF == ((U8*)s)[0] ) ? \ - ( ( 0x81 == ((U8*)s)[1] ) ? \ - ( ( ( 0xCC == ((U8*)s)[2] ) && ( 0x93 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0x85 == ((U8*)s)[1] ) ? \ - ( ( 0xCC == ((U8*)s)[2] ) ? \ - ( ( 0x93 == ((U8*)s)[3] ) ? 4 : 0 ) \ - : ( ( 0xCD == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0x89 == ((U8*)s)[1] ) ? \ - ( ( 0xCD == ((U8*)s)[2] ) ? \ - ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \ - : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( ( ( 0x8E == ((U8*)s)[1] ) && ( 0xCE == ((U8*)s)[2] ) ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xD5 == ((U8*)s)[0] ) ? \ - ( ( 0xA5 == ((U8*)s)[1] ) ? \ - ( ( ( 0xD6 == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xB4 == ((U8*)s)[1] ) ? \ - ( ( ( 0xD5 == ((U8*)s)[2] ) && ( ( ( ((U8*)s)[3] & 0xF7 ) == 0xA5 ) || ((U8*)s)[3] == 0xAB || ((U8*)s)[3] == 0xB6 ) ) ? 4 : 0 )\ - : ( ( ( 0xBE == ((U8*)s)[1] ) && ( 0xD5 == ((U8*)s)[2] ) ) && ( 0xB6 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0xBC == ((U8*)s)[1] ) ? \ - ( ( ( ( ( ((U8*)s)[2] & 0xD8 ) == 0x80 ) && ( 0xCE == ((U8*)s)[3] ) ) && ( 0xB9 == ((U8*)s)[4] ) ) ? 5 : 0 )\ - : ( ( ( ( 0xBD == ((U8*)s)[1] ) && ( ( ( ((U8*)s)[2] & 0xF8 ) == 0xA0 ) || ( ( ((U8*)s)[2] & 0xFB ) == 0xB0 ) || ((U8*)s)[2] == 0xBC ) ) && ( 0xCE == ((U8*)s)[3] ) ) && ( 0xB9 == ((U8*)s)[4] ) ) ? 5 : 0 )\ - : 0 ) +( ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x74 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) /*** GENERATED CODE ***/ #define is_MULTI_CHAR_FOLD_utf8_safe_part1(s,e) \ -( ((e)-(s) > 3) ? \ - ( ( 0x61 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCA == ((U8*)s)[1] ) && ( 0xBE == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x66 == ((U8*)s)[0] ) ? \ - ( ( 0x66 == ((U8*)s)[1] ) ? \ - ( ( 0x69 == ((U8*)s)[2] || 0x6C == ((U8*)s)[2] ) ? 3 : 2 ) \ - : ( 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0x68 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0xB1 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x69 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x6A == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8C == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x73 == ((U8*)s)[0] ) ? \ - ( ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0x74 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x88 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x77 == ((U8*)s)[0] || 0x79 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8A == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xCA == ((U8*)s)[0] ) ? \ - ( ( ( 0xBC == ((U8*)s)[1] ) && ( 0x6E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xCE == ((U8*)s)[0] ) ? \ - ( ( ( ((U8*)s)[1] & 0xFD ) == 0xAC ) ? \ - ( ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xB1 == ((U8*)s)[1] || 0xB7 == ((U8*)s)[1] ) ? \ - ( ( 0xCD == ((U8*)s)[2] ) ? \ - ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \ - : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( ( ( 0xB9 == ((U8*)s)[1] ) && ( 0xCD == ((U8*)s)[2] ) ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xCF == ((U8*)s)[0] ) ? \ - ( ( 0x81 == ((U8*)s)[1] ) ? \ - ( ( ( 0xCC == ((U8*)s)[2] ) && ( 0x93 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0x85 == ((U8*)s)[1] ) ? \ - ( ( 0xCC == ((U8*)s)[2] ) ? \ - ( ( 0x93 == ((U8*)s)[3] ) ? 4 : 0 ) \ - : ( ( 0xCD == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0x89 == ((U8*)s)[1] ) ? \ - ( ( 0xCD == ((U8*)s)[2] ) ? \ - ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \ - : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( ( ( 0x8E == ((U8*)s)[1] ) && ( 0xCE == ((U8*)s)[2] ) ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xD5 == ((U8*)s)[0] ) ? \ - ( ( 0xA5 == ((U8*)s)[1] ) ? \ - ( ( ( 0xD6 == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xB4 == ((U8*)s)[1] ) ? \ - ( ( ( 0xD5 == ((U8*)s)[2] ) && ( ( ( ((U8*)s)[3] & 0xF7 ) == 0xA5 ) || ((U8*)s)[3] == 0xAB || ((U8*)s)[3] == 0xB6 ) ) ? 4 : 0 )\ - : ( ( ( 0xBE == ((U8*)s)[1] ) && ( 0xD5 == ((U8*)s)[2] ) ) && ( 0xB6 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : 0 ) \ -: ((e)-(s) > 2) ? \ - ( ( 0x61 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCA == ((U8*)s)[1] ) && ( 0xBE == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x66 == ((U8*)s)[0] ) ? \ - ( ( 0x66 == ((U8*)s)[1] ) ? \ - ( ( 0x69 == ((U8*)s)[2] || 0x6C == ((U8*)s)[2] ) ? 3 : 2 ) \ - : ( 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0x68 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0xB1 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x69 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x6A == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8C == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x73 == ((U8*)s)[0] ) ? \ - ( ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0x74 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x88 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x77 == ((U8*)s)[0] || 0x79 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8A == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( ( ( 0xCA == ((U8*)s)[0] ) && ( 0xBC == ((U8*)s)[1] ) ) && ( 0x6E == ((U8*)s)[2] ) ) ? 3 : 0 )\ -: ((e)-(s) > 1) ? \ - ( ( 0x66 == ((U8*)s)[0] ) ? \ - ( ( 0x66 == ((U8*)s)[1] || 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 )\ - : ( ( 0x73 == ((U8*)s)[0] ) && ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ) ? 2 : 0 )\ -: 0 ) - - -/*** GENERATED CODE ***/ -#define is_MULTI_CHAR_FOLD_utf8_safe(s,e) \ -( ((e)-(s) > 5) ? \ - ( ( 0x61 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCA == ((U8*)s)[1] ) && ( 0xBE == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x66 == ((U8*)s)[0] ) ? \ - ( ( 0x66 == ((U8*)s)[1] ) ? \ - ( ( 0x69 == ((U8*)s)[2] || 0x6C == ((U8*)s)[2] ) ? 3 : 2 ) \ - : ( 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0x68 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0xB1 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x69 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x6A == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8C == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x73 == ((U8*)s)[0] ) ? \ - ( ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( 0x74 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x88 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0x77 == ((U8*)s)[0] || 0x79 == ((U8*)s)[0] ) ? \ - ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8A == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xCA == ((U8*)s)[0] ) ? \ - ( ( ( 0xBC == ((U8*)s)[1] ) && ( 0x6E == ((U8*)s)[2] ) ) ? 3 : 0 ) \ - : ( 0xCE == ((U8*)s)[0] ) ? \ - ( ( ( ((U8*)s)[1] & 0xFD ) == 0xAC ) ? \ - ( ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xB1 == ((U8*)s)[1] || 0xB7 == ((U8*)s)[1] ) ? \ - ( ( 0xCD == ((U8*)s)[2] ) ? \ - ( ( 0x82 == ((U8*)s)[3] ) ? \ - ( ( ( 0xCE == ((U8*)s)[4] ) && ( 0xB9 == ((U8*)s)[5] ) ) ? 6 : 4 )\ +( ( 0x74 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x88 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x77 == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0x79 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8A == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xBC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x6E == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xFD ) == 0xAC ) ? \ + ( ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xB1 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0xB7 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ?\ + ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? \ + ( ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[4]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[5]) ) ) ? 6 : 4 )\ : 0 ) \ - : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xB9 == ((U8*)s)[1] ) ? \ - ( ( 0xCC == ((U8*)s)[2] ) ? \ - ( ( 0x88 == ((U8*)s)[3] ) ? \ - ( ( 0xCC == ((U8*)s)[4] ) ? \ - ( ( ( ((U8*)s)[5] & 0xFE ) == 0x80 ) ? 6 : 0 ) \ - : ( ( 0xCD == ((U8*)s)[4] ) && ( 0x82 == ((U8*)s)[5] ) ) ? 6 : 0 )\ + : ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x88 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? \ + ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[4]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[5]) & 0xFE ) == 0x80 ) ? 6 : 0 )\ + : ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[4]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[5]) ) ) ? 6 : 0 )\ : 0 ) \ - : ( ( 0xCD == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ + : ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ : 0 ) \ - : ( 0xCF == ((U8*)s)[0] ) ? \ - ( ( 0x81 == ((U8*)s)[1] ) ? \ - ( ( ( 0xCC == ((U8*)s)[2] ) && ( 0x93 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0x85 == ((U8*)s)[1] ) ? \ - ( ( 0xCC == ((U8*)s)[2] ) ? \ - ( ( 0x88 == ((U8*)s)[3] ) ? \ - ( ( 0xCC == ((U8*)s)[4] ) ? \ - ( ( ( ((U8*)s)[5] & 0xFE ) == 0x80 ) ? 6 : 0 ) \ - : ( ( 0xCD == ((U8*)s)[4] ) && ( 0x82 == ((U8*)s)[5] ) ) ? 6 : 0 )\ - : ( 0x93 == ((U8*)s)[3] ) ? \ - ( ( 0xCC == ((U8*)s)[4] ) ? \ - ( ( ( ((U8*)s)[5] & 0xFE ) == 0x80 ) ? 6 : 4 ) \ - : ( ( 0xCD == ((U8*)s)[4] ) && ( 0x82 == ((U8*)s)[5] ) ) ? 6 : 4 )\ + : ( 0xCF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x81 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x93 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x88 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? \ + ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[4]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[5]) & 0xFE ) == 0x80 ) ? 6 : 0 )\ + : ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[4]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[5]) ) ) ? 6 : 0 )\ + : ( 0x93 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? \ + ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[4]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[5]) & 0xFE ) == 0x80 ) ? 6 : 4 )\ + : ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[4]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[5]) ) ) ? 6 : 4 )\ : 0 ) \ - : ( ( 0xCD == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0x89 == ((U8*)s)[1] ) ? \ - ( ( 0xCD == ((U8*)s)[2] ) ? \ - ( ( 0x82 == ((U8*)s)[3] ) ? \ - ( ( ( 0xCE == ((U8*)s)[4] ) && ( 0xB9 == ((U8*)s)[5] ) ) ? 6 : 4 )\ + : ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0x89 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? \ + ( ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[4]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[5]) ) ) ? 6 : 4 )\ : 0 ) \ - : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( ( ( 0x8E == ((U8*)s)[1] ) && ( 0xCE == ((U8*)s)[2] ) ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xD5 == ((U8*)s)[0] ) ? \ - ( ( 0xA5 == ((U8*)s)[1] ) ? \ - ( ( ( 0xD6 == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xB4 == ((U8*)s)[1] ) ? \ - ( ( ( 0xD5 == ((U8*)s)[2] ) && ( ( ( ((U8*)s)[3] & 0xF7 ) == 0xA5 ) || ((U8*)s)[3] == 0xAB || ((U8*)s)[3] == 0xB6 ) ) ? 4 : 0 )\ - : ( ( ( 0xBE == ((U8*)s)[1] ) && ( 0xD5 == ((U8*)s)[2] ) ) && ( 0xB6 == ((U8*)s)[3] ) ) ? 4 : 0 )\ - : ( 0xE1 == ((U8*)s)[0] ) ? \ - ( ( 0xBC == ((U8*)s)[1] ) ? \ - ( ( ( ( ( ((U8*)s)[2] & 0xD8 ) == 0x80 ) && ( 0xCE == ((U8*)s)[3] ) ) && ( 0xB9 == ((U8*)s)[4] ) ) ? 5 : 0 )\ - : ( ( ( ( 0xBD == ((U8*)s)[1] ) && ( ( ( ((U8*)s)[2] & 0xF8 ) == 0xA0 ) || ( ( ((U8*)s)[2] & 0xFB ) == 0xB0 ) || ((U8*)s)[2] == 0xBC ) ) && ( 0xCE == ((U8*)s)[3] ) ) && ( 0xB9 == ((U8*)s)[4] ) ) ? 5 : 0 )\ + : ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( ( ( 0x8E == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xA5 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xD6 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xB4 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[3]) & 0xF7 ) == 0xA5 ) || NATIVE_TO_LATIN1(((U8*)s)[3]) == 0xAB || NATIVE_TO_LATIN1(((U8*)s)[3]) == 0xB6 ) ) ? 4 : 0 )\ + : ( ( ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xB6 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xBC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xD8 ) == 0x80 ) && ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[4]) ) ) ? 5 : 0 )\ + : ( ( ( ( 0xBD == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF8 ) == 0xA0 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFB ) == 0xB0 ) || NATIVE_TO_LATIN1(((U8*)s)[2]) == 0xBC ) ) && ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[4]) ) ) ? 5 : 0 )\ + : 0 ) + + +/*** GENERATED CODE ***/ +#define is_MULTI_CHAR_FOLD_utf8_safe_part2(s,e) \ +( ( 0x61 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[2]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 2 )\ + : ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ + : ( 0x68 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xB1 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x6A == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8C == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x74 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ + : ( 0x74 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x88 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x77 == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0x79 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8A == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xBC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x6E == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xFD ) == 0xAC ) ? \ + ( ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xB1 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0xB7 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ?\ + ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? 4 : 0 ) \ + : ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( ( ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xCF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x81 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x93 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x93 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? 4 : 0 ) \ + : ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0x89 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? 4 : 0 ) \ + : ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( ( ( 0x8E == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xA5 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xD6 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xB4 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[3]) & 0xF7 ) == 0xA5 ) || NATIVE_TO_LATIN1(((U8*)s)[3]) == 0xAB || NATIVE_TO_LATIN1(((U8*)s)[3]) == 0xB6 ) ) ? 4 : 0 )\ + : ( ( ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xB6 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : 0 ) + + +/*** GENERATED CODE ***/ +#define is_MULTI_CHAR_FOLD_utf8_safe_part3(s,e) \ +( ((e)-(s) > 2) ? \ + ( ( 0x61 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[2]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 2 )\ + : ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ + : ( 0x68 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xB1 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x6A == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8C == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x74 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ + : ( 0x74 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x88 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x77 == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0x79 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8A == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( ( ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0xBC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( 0x6E == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ +: ((e)-(s) > 1) ? \ + ( ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x69 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ + : ( ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x74 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) ? 2 : 0 )\ +: 0 ) + + +/*** GENERATED CODE ***/ +#define is_MULTI_CHAR_FOLD_utf8_safe_part4(s,e) \ +( ( 0x61 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[2]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 2 )\ + : ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ + : ( 0x68 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xB1 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x6A == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8C == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? is_MULTI_CHAR_FOLD_utf8_safe_part0(s,e) : is_MULTI_CHAR_FOLD_utf8_safe_part1(s,e) ) + + +/*** GENERATED CODE ***/ +#define is_MULTI_CHAR_FOLD_utf8_safe_part5(s,e) \ +( ((e)-(s) > 4) ? \ + ( ( 0x61 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x66 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[2]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 2 )\ + : ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x6C == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ + : ( 0x68 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xB1 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x69 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x6A == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8C == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x73 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0x74 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ + : ( 0x74 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x88 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0x77 == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0x79 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x8A == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xBC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0x6E == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ + : ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xFD ) == 0xAC ) ? \ + ( ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xB1 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0xB7 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ?\ + ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? 4 : 0 ) \ + : ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( ( ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xCF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x81 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x93 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xCC == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x93 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? 4 : 0 ) \ + : ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0x89 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( 0xCD == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? \ + ( ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ? 4 : 0 ) \ + : ( ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( ( ( 0x8E == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xA5 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xD6 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( 0x82 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xB4 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[3]) & 0xF7 ) == 0xA5 ) || NATIVE_TO_LATIN1(((U8*)s)[3]) == 0xAB || NATIVE_TO_LATIN1(((U8*)s)[3]) == 0xB6 ) ) ? 4 : 0 )\ + : ( ( ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( 0xD5 == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) && ( 0xB6 == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) ? 4 : 0 )\ + : ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xBC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xD8 ) == 0x80 ) && ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[4]) ) ) ? 5 : 0 )\ + : ( ( ( ( 0xBD == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF8 ) == 0xA0 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFB ) == 0xB0 ) || NATIVE_TO_LATIN1(((U8*)s)[2]) == 0xBC ) ) && ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[3]) ) ) && ( 0xB9 == NATIVE_TO_LATIN1(((U8*)s)[4]) ) ) ? 5 : 0 )\ : 0 ) \ -: ((e)-(s) > 4) ? is_MULTI_CHAR_FOLD_utf8_safe_part0(s,e) : is_MULTI_CHAR_FOLD_utf8_safe_part1(s,e) ) +: ((e)-(s) > 3) ? is_MULTI_CHAR_FOLD_utf8_safe_part2(s,e) : is_MULTI_CHAR_FOLD_utf8_safe_part3(s,e) ) + + +/*** GENERATED CODE ***/ +#define is_MULTI_CHAR_FOLD_utf8_safe(s,e) \ +( ((e)-(s) > 5) ? is_MULTI_CHAR_FOLD_utf8_safe_part4(s,e) : is_MULTI_CHAR_FOLD_utf8_safe_part5(s,e) ) /* MULTI_CHAR_FOLD: multi-char strings that are folded to by a single character @@ -839,82 +602,159 @@ /*** GENERATED CODE ***/ #define is_MULTI_CHAR_FOLD_latin1_safe(s,e) \ ( ((e)-(s) > 2) ? \ - ( ( ( ((U8*)s)[0] & 0xDF ) == 0x46 ) ? \ - ( ( ( ((U8*)s)[1] & 0xDF ) == 0x46 ) ? \ - ( ( ( ( ((U8*)s)[2] & 0xDF ) == 0x49 ) || ( ( ((U8*)s)[2] & 0xDF ) == 0x4C ) ) ? 3 : 2 )\ - : ( ( ( ((U8*)s)[1] & 0xDF ) == 0x49 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x4C ) ) ? 2 : 0 )\ - : ( ( ( ((U8*)s)[0] & 0xDF ) == 0x53 ) && ( ( ( ((U8*)s)[1] & 0xDF ) == 0x53 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x54 ) ) ) ? 2 : 0 )\ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[0]) & 0xDF ) == 0x46 ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x46 ) ? \ + ( ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xDF ) == 0x49 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xDF ) == 0x4C ) ) ? 3 : 2 )\ + : ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x49 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x4C ) ) ? 2 : 0 )\ + : ( ( ( NATIVE_TO_LATIN1(((U8*)s)[0]) & 0xDF ) == 0x53 ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x53 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x54 ) ) ) ? 2 : 0 )\ : ((e)-(s) > 1) ? \ - ( ( ( ((U8*)s)[0] & 0xDF ) == 0x46 ) ? \ - ( ( ( ( ((U8*)s)[1] & 0xDF ) == 0x46 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x49 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x4C ) ) ? 2 : 0 )\ - : ( ( ( ((U8*)s)[0] & 0xDF ) == 0x53 ) && ( ( ( ((U8*)s)[1] & 0xDF ) == 0x53 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x54 ) ) ) ? 2 : 0 )\ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[0]) & 0xDF ) == 0x46 ) ? \ + ( ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x46 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x49 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x4C ) ) ? 2 : 0 )\ + : ( ( ( NATIVE_TO_LATIN1(((U8*)s)[0]) & 0xDF ) == 0x53 ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x53 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x54 ) ) ) ? 2 : 0 )\ : 0 ) /* - PATWS: pattern white space + FOLDS_TO_MULTI: characters that fold to multi-char strings - \p{PatWS} + \p{_Perl_Folds_To_Multi_Char} */ /*** GENERATED CODE ***/ -#define is_PATWS(s,is_utf8) \ -( ( ( 0x09 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x20 == ((U8*)s)[0] ) ? 1\ -: ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0x8E || ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ -: ( 0x85 == ((U8*)s)[0] ) ) +#define is_FOLDS_TO_MULTI_utf8(s) \ +( ( 0xC3 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xC4 == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0xC7 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ + ( ( 0xB0 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x89 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x90 ) ? 2 : 0 ) \ +: ( 0xD6 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xBA == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0x96 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x9A ) || 0x9E == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 )\ + : ( 0xBD == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF9 ) == 0x90 ) ? 3 : 0 ) \ + : ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xE0 ) == 0x80 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF0 ) == 0xA0 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFA ) == 0xB2 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF7 ) == 0xB4 ) ) ? 3 : 0 )\ + : ( ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xCA ) == 0x82 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF7 ) == 0x84 ) || NATIVE_TO_LATIN1(((U8*)s)[2]) == 0xA4 || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF7 ) == 0xB4 ) ) ) ? 3 : 0 )\ +: ( ( ( 0xEF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0xAC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x86 ) || ( 0x93 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x97 ) ) ) ? 3 : 0 ) + +/* + PROBLEMATIC_LOCALE_FOLD: characters whose fold is problematic under locale + \p{_Perl_Problematic_Locale_Folds} +*/ /*** GENERATED CODE ***/ -#define is_PATWS_safe(s,e,is_utf8) \ -( ((e)-(s) > 2) ? \ - ( ( ( 0x09 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x20 == ((U8*)s)[0] ) ? 1\ - : ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0x8E || ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ - : ( 0x85 == ((U8*)s)[0] ) ) \ -: ((e)-(s) > 1) ? \ - ( ( ( 0x09 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x20 == ((U8*)s)[0] ) ? 1\ - : ( is_utf8 ) ? \ - ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ - : ( 0x85 == ((U8*)s)[0] ) ) \ -: ((e)-(s) > 0) ? \ - ( ( ( 0x09 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x20 == ((U8*)s)[0] ) ? 1\ - : ( !( is_utf8 ) ) ? \ - ( 0x85 == ((U8*)s)[0] ) \ - : 0 ) \ -: 0 ) +#define is_PROBLEMATIC_LOCALE_FOLD_utf8(s) \ +( ( ( NATIVE_TO_LATIN1(((U8*)s)[0]) & 0x80 ) == 0x00 ) ? 1 \ +: ( ( NATIVE_TO_LATIN1(((U8*)s)[0]) & 0xFE ) == 0xC2 ) ? \ + 2 \ +: ( 0xC4 == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0xC7 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ + ( ( 0xB0 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x89 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0xB8 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ +: ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x9C ) ? 2 : 0 ) \ +: ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xBA == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( 0x96 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x9A ) || 0x9E == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ +: ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0x84 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xAA ) ) ? 3 : 0 )\ +: ( ( ( 0xEF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0xAC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x86 ) ) ? 3 : 0 ) + +/*** GENERATED CODE ***/ +#define is_PROBLEMATIC_LOCALE_FOLD_cp(cp) \ +( NATIVE_TO_UNI(cp) <= 0xFF || ( 0xFF < NATIVE_TO_UNI(cp) && \ +( 0x130 == NATIVE_TO_UNI(cp) || ( 0x130 < NATIVE_TO_UNI(cp) && \ +( 0x149 == NATIVE_TO_UNI(cp) || ( 0x149 < NATIVE_TO_UNI(cp) && \ +( 0x178 == NATIVE_TO_UNI(cp) || ( 0x178 < NATIVE_TO_UNI(cp) && \ +( 0x17F == NATIVE_TO_UNI(cp) || ( 0x17F < NATIVE_TO_UNI(cp) && \ +( 0x1F0 == NATIVE_TO_UNI(cp) || ( 0x1F0 < NATIVE_TO_UNI(cp) && \ +( 0x39C == NATIVE_TO_UNI(cp) || ( 0x39C < NATIVE_TO_UNI(cp) && \ +( 0x3BC == NATIVE_TO_UNI(cp) || ( 0x3BC < NATIVE_TO_UNI(cp) && \ +( ( 0x1E96 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0x1E9A ) || ( 0x1E9A < NATIVE_TO_UNI(cp) &&\ +( 0x1E9E == NATIVE_TO_UNI(cp) || ( 0x1E9E < NATIVE_TO_UNI(cp) && \ +( 0x212A == NATIVE_TO_UNI(cp) || ( 0x212A < NATIVE_TO_UNI(cp) && \ +( 0x212B == NATIVE_TO_UNI(cp) || ( 0xFB00 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0xFB06 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) + +/* + PROBLEMATIC_LOCALE_FOLDEDS_START: The first folded character of folds which are problematic under locale + \p{_Perl_Problematic_Locale_Foldeds_Start} +*/ /*** GENERATED CODE ***/ -#define is_PATWS_non_low(s,is_utf8) \ -( ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0x8E || ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ -: ( 0x85 == ((U8*)s)[0] ) ) +#define is_PROBLEMATIC_LOCALE_FOLDEDS_START_utf8(s) \ +( ( ( NATIVE_TO_LATIN1(((U8*)s)[0]) & 0x80 ) == 0x00 ) ? 1 \ +: ( ( NATIVE_TO_LATIN1(((U8*)s)[0]) & 0xFE ) == 0xC2 ) ? \ + 2 \ +: ( 0xC4 == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0xC7 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ + ( ( 0xB0 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x89 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0xB8 == NATIVE_TO_LATIN1(((U8*)s)[1]) || 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 )\ +: ( 0xCA == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xBC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x9C ) ? 2 : 0 ) \ +: ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0xBA == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( 0x96 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x9A ) || 0x9E == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ) ? 3 : 0 )\ +: ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( 0x84 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xAA ) ) ? 3 : 0 )\ +: ( ( ( 0xEF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0xAC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x86 ) ) ? 3 : 0 ) + +/*** GENERATED CODE ***/ +#define is_PROBLEMATIC_LOCALE_FOLDEDS_START_cp(cp) \ +( NATIVE_TO_UNI(cp) <= 0xFF || ( 0xFF < NATIVE_TO_UNI(cp) && \ +( 0x130 == NATIVE_TO_UNI(cp) || ( 0x130 < NATIVE_TO_UNI(cp) && \ +( 0x149 == NATIVE_TO_UNI(cp) || ( 0x149 < NATIVE_TO_UNI(cp) && \ +( 0x178 == NATIVE_TO_UNI(cp) || ( 0x178 < NATIVE_TO_UNI(cp) && \ +( 0x17F == NATIVE_TO_UNI(cp) || ( 0x17F < NATIVE_TO_UNI(cp) && \ +( 0x1F0 == NATIVE_TO_UNI(cp) || ( 0x1F0 < NATIVE_TO_UNI(cp) && \ +( 0x2BC == NATIVE_TO_UNI(cp) || ( 0x2BC < NATIVE_TO_UNI(cp) && \ +( 0x39C == NATIVE_TO_UNI(cp) || ( 0x39C < NATIVE_TO_UNI(cp) && \ +( 0x3BC == NATIVE_TO_UNI(cp) || ( 0x3BC < NATIVE_TO_UNI(cp) && \ +( ( 0x1E96 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0x1E9A ) || ( 0x1E9A < NATIVE_TO_UNI(cp) &&\ +( 0x1E9E == NATIVE_TO_UNI(cp) || ( 0x1E9E < NATIVE_TO_UNI(cp) && \ +( 0x212A == NATIVE_TO_UNI(cp) || ( 0x212A < NATIVE_TO_UNI(cp) && \ +( 0x212B == NATIVE_TO_UNI(cp) || ( 0xFB00 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0xFB06 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) + +/* + PATWS: pattern white space + + \p{PatWS} +*/ +/*** GENERATED CODE ***/ +#define is_PATWS_safe(s,e,is_utf8) \ +( ((e) > (s)) ? \ + ( ( ( 0x09 <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0D ) || 0x20 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? 1\ + : (! is_utf8 ) ? \ + ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) \ + : (((e) - (s)) >= UTF8SKIP(s)) ? \ + ( ( 0xC2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ + : ( ( ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0x8E || ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ + : 0 ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_PATWS_non_low_safe(s,e,is_utf8) \ -( ((e)-(s) > 2) ? \ - ( ( is_utf8 ) ? \ - ( ( 0xC2 == ((U8*)s)[0] ) ? \ - ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ - : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0x8E || ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ - : ( 0x85 == ((U8*)s)[0] ) ) \ -: ((e)-(s) > 1) ? \ - ( ( is_utf8 ) ? \ - ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ - : ( 0x85 == ((U8*)s)[0] ) ) \ -: ( ((e)-(s) > 0) && ( !( is_utf8 ) ) ) ? ( 0x85 == ((U8*)s)[0] ) : 0 ) +( ((e) > (s)) ? \ + ( (! is_utf8) ? \ + ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) \ + : (((e) - (s)) >= UTF8SKIP(s)) ? \ + ( ( 0xC2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ + : ( ( ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0x8E || ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\ + : 0 ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_PATWS_cp(cp) \ -( ( 0x09 <= cp && cp <= 0x0D ) || ( 0x0D < cp && \ -( 0x20 == cp || ( 0x20 < cp && \ -( 0x85 == cp || ( 0x85 < cp && \ -( 0x200E == cp || ( 0x200E < cp && \ -( 0x200F == cp || ( 0x200F < cp && \ -( 0x2028 == cp || 0x2029 == cp ) ) ) ) ) ) ) ) ) ) ) +( ( 0x09 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0x0D ) || ( 0x0D < NATIVE_TO_UNI(cp) &&\ +( 0x20 == NATIVE_TO_UNI(cp) || ( 0x20 < NATIVE_TO_UNI(cp) && \ +( 0x85 == NATIVE_TO_UNI(cp) || ( 0x85 < NATIVE_TO_UNI(cp) && \ +( 0x200E == NATIVE_TO_UNI(cp) || ( 0x200E < NATIVE_TO_UNI(cp) && \ +( 0x200F == NATIVE_TO_UNI(cp) || ( 0x200F < NATIVE_TO_UNI(cp) && \ +( 0x2028 == NATIVE_TO_UNI(cp) || 0x2029 == NATIVE_TO_UNI(cp) ) ) ) ) ) ) ) ) ) ) ) #endif /* H_REGCHARCLASS */ diff --git a/Master/tlpkg/tlperl/lib/CORE/regcomp.h b/Master/tlpkg/tlperl/lib/CORE/regcomp.h index 21d2e1e3519..3bb1a533f69 100644 --- a/Master/tlpkg/tlperl/lib/CORE/regcomp.h +++ b/Master/tlpkg/tlperl/lib/CORE/regcomp.h @@ -26,13 +26,6 @@ #define RE_TRACK_PATTERN_OFFSETS #endif -/* Unless the next line is uncommented it is illegal to combine lazy - matching with possessive matching. Frankly it doesn't make much sense - to allow it as X*?+ matches nothing, X+?+ matches a single char only, - and X{min,max}?+ matches min times only. - */ -/* #define REG_ALLOW_MINMOD_SUSPEND */ - /* * The "internal use only" fields in regexp.h are present to pass info from * compile to execute that permits the execute phase to run lots faster on @@ -132,13 +125,28 @@ * * See regexp.h for flags used externally to the regexp engine */ +#define RXp_INTFLAGS(rx) ((rx)->intflags) +#define RX_INTFLAGS(prog) RXp_INTFLAGS(ReANY(prog)) + #define PREGf_SKIP 0x00000001 #define PREGf_IMPLICIT 0x00000002 /* Converted .* to ^.* */ #define PREGf_NAUGHTY 0x00000004 /* how exponential is this pattern? */ #define PREGf_VERBARG_SEEN 0x00000008 #define PREGf_CUTGROUP_SEEN 0x00000010 #define PREGf_USE_RE_EVAL 0x00000020 /* compiled with "use re 'eval'" */ +/* these used to be extflags, but are now intflags */ +#define PREGf_NOSCAN 0x00000040 +#define PREGf_CANY_SEEN 0x00000080 +#define PREGf_GPOS_SEEN 0x00000100 +#define PREGf_GPOS_FLOAT 0x00000200 + +#define PREGf_ANCH_BOL 0x00000400 +#define PREGf_ANCH_MBOL 0x00000800 +#define PREGf_ANCH_SBOL 0x00001000 +#define PREGf_ANCH_GPOS 0x00002000 +#define PREGf_ANCH (PREGf_ANCH_SBOL | PREGf_ANCH_GPOS | \ + PREGf_ANCH_MBOL | PREGf_ANCH_BOL ) /* this is where the old regcomp.h started */ @@ -177,27 +185,73 @@ struct regnode_2 { }; -#define ANYOF_BITMAP_SIZE 32 /* 256 b/(8 b/B) */ +#define ANYOF_BITMAP_SIZE (256 / 8) /* 8 bits/Byte */ + +/* Note that these form structs which are supersets of the next smaller one, by + * appending fields. Alignment problems can occur if one of those optional + * fields requires stricter alignment than the base struct. And formal + * parameters that can really be two or more of the structs should be + * declared as the smallest one it could be. See commit message for + * 7dcac5f6a5195002b55c935ee1d67f67e1df280b. Regnode allocation is done + * without regard to alignment, and changing it to would also require changing + * the code that inserts and deletes regnodes. The basic single-argument + * regnode has a U32, which is what reganode() allocates as a unit. Therefore + * no field can require stricter alignment than U32. */ /* also used by trie */ struct regnode_charclass { U8 flags; U8 type; U16 next_off; - U32 arg1; /* used as ptr in S_regclass */ + U32 arg1; char bitmap[ANYOF_BITMAP_SIZE]; /* only compile-time */ }; /* has runtime (locale) \d, \w, ..., [:posix:] classes */ struct regnode_charclass_class { - U8 flags; /* ANYOF_CLASS bit must go here */ + U8 flags; /* ANYOF_POSIXL bit must go here */ U8 type; U16 next_off; - U32 arg1; /* used as ptr in S_regclass */ + U32 arg1; char bitmap[ANYOF_BITMAP_SIZE]; /* both compile-time */ U32 classflags; /* and run-time */ }; +/* A synthetic start class (SSC); is a regnode_charclass_posixl_fold, plus an + * extra SV*, used only during its construction and which is not used by + * regexec.c. Note that the 'next_off' field is unused, as the SSC stands + * alone, so there is never a next node. Also, there is no alignment issue, + * becase these are declared or allocated as a complete unit so the compiler + * takes care of alignment. This is unlike the other regnodes which are + * allocated in terms of multiples of a single-argument regnode. SSC nodes can + * have a pointer field because there is no alignment issue, and because it is + * set to NULL after construction, before any cloning of the pattern */ +struct regnode_ssc { + U8 flags; /* ANYOF_POSIXL bit must go here */ + U8 type; + U16 next_off; + U32 arg1; + char bitmap[ANYOF_BITMAP_SIZE]; /* both compile-time */ + U32 classflags; /* and run-time */ + + /* Auxiliary, only used during construction; NULL afterwards: list of code + * points matched */ + SV* invlist; +}; + +/* We take advantage of 'next_off' not otherwise being used in the SSC by + * actually using it: by setting it to 1. This allows us to test and + * distinguish between an SSC and other ANYOF node types, as 'next_off' cannot + * otherwise be 1, because it is the offset to the next regnode expressed in + * units of regnodes. Since an ANYOF node contains extra fields, it adds up + * to 12 regnode units on 32-bit systems, (hence the minimum this can be (if + * not 0) is 11 there. Even if things get tightly packed on a 64-bit system, + * it still would be more than 1. */ +#define set_ANYOF_SYNTHETIC(n) STMT_START{ OP(n) = ANYOF; \ + NEXT_OFF(n) = 1; \ + } STMT_END +#define is_ANYOF_SYNTHETIC(n) (OP(n) == ANYOF && NEXT_OFF(n) == 1) + /* XXX fix this description. Impose a limit of REG_INFTY on various pattern matching operations to limit stack growth and to avoid "infinite" recursions. @@ -288,75 +342,79 @@ struct regnode_charclass_class { #define REG_MAGIC 0234 -#define SIZE_ONLY (RExC_emit == &PL_regdummy) +#define SIZE_ONLY (RExC_emit == (regnode *) & RExC_emit_dummy) +#define PASS1 SIZE_ONLY +#define PASS2 (! SIZE_ONLY) /* If the bitmap doesn't fully represent what this ANYOF node can match, the * ARG is set to this special value (since 0, 1, ... are legal, but will never * reach this high). */ #define ANYOF_NONBITMAP_EMPTY ((U32) -1) -/* The information used to be stored as as combination of the ANYOF_UTF8 and - * ANYOF_NONBITMAP_NON_UTF8 bits in the flags field, but was moved out of there - * to free up a bit for other uses. This tries to hide the change from - * existing code as much as possible. Now, the data structure that goes in ARG - * is not allocated unless it is needed, and that is what is used to determine - * if there is something outside the bitmap. The code now assumes that if - * that structure exists, that any UTF-8 encoded string should be tried against - * it, but a non-UTF8-encoded string will be tried only if the - * ANYOF_NONBITMAP_NON_UTF8 bit is also set. */ -#define ANYOF_NONBITMAP(node) (ARG(node) != ANYOF_NONBITMAP_EMPTY) - -/* Flags for node->flags of ANYOF. These are in short supply, but there is one - * currently available. If more than this are needed, the ANYOF_LOCALE and - * ANYOF_CLASS bits could be shared, making a space penalty for all locale nodes. - * Also, the UNICODE_ALL bit could be freed up by resorting to creating a swash - * containing everything above 255. This introduces a performance penalty. - * Better would be to split it off into a separate node, which actually would - * improve performance a bit by allowing regexec.c to test for a UTF-8 - * character being above 255 without having to call a function nor calculate - * its code point value. However, this solution might need to have a second - * node type, ANYOF_SYNTHETIC_ABOVE_LATIN1_ALL */ - -#define ANYOF_LOCALE 0x01 /* /l modifier */ +/* Flags for node->flags of ANYOF. These are in short supply, with none + * currently available. The ABOVE_LATIN1_ALL bit could be freed up + * by resorting to creating a swash containing everything above 255. This + * introduces a performance penalty. An option that wouldn't slow things down + * would be to split one of the two LOC flags out into a separate + * node, like what was done with ANYOF_NON_UTF8_NON_ASCII_ALL in commit + * 34fdef848b1687b91892ba55e9e0c3430e0770f6 (but which was reverted because it + * wasn't the best option available at the time), and using a LOC flag is + * probably better than that commit anyway. But it could be reinstated if we + * need a bit. The LOC flags are only for /l nodes; the reverted commit was + * only for /d, so there are no combinatorial issues. The LOC flag to use is + * probably the POSIXL one. + * Several flags are not used in synthetic start class (SSC) nodes, so could be + * shared should new flags be needed for SSCs, like ANYOF_EMPTY_STRING now. */ + +/* regexec.c is expecting this to be in the low bit */ +#define ANYOF_INVERT 0x01 + +/* For the SSC node only, which cannot be inverted, so is shared with that bit. + * This means "Does this SSC match an empty string?" This is used only during + * regex compilation. */ +#define ANYOF_EMPTY_STRING ANYOF_INVERT + +/* Are there things that will match only if the target string is encoded in + * UTF-8? (This is not set if ANYOF_AOVE_LATIN1_ALL is set) */ +#define ANYOF_UTF8 0x02 /* The fold is calculated and stored in the bitmap where possible at compile * time. However under locale, the actual folding varies depending on * what the locale is at the time of execution, so it has to be deferred until * then */ -#define ANYOF_LOC_FOLD 0x02 +#define ANYOF_LOC_FOLD 0x04 -#define ANYOF_INVERT 0x04 - -/* Set if this is a struct regnode_charclass_class vs a regnode_charclass. This +/* Set if this is a regnode_charclass_posixl vs a regnode_charclass. This * is used for runtime \d, \w, [:posix:], ..., which are used only in locale * and the optimizer's synthetic start class. Non-locale \d, etc are resolved - * at compile-time. Could be shared with ANYOF_LOCALE, forcing all locale - * nodes to be large */ -#define ANYOF_CLASS 0x08 -#define ANYOF_LARGE ANYOF_CLASS /* Same; name retained for back compat */ + * at compile-time */ +#define ANYOF_POSIXL 0x08 +#define ANYOF_CLASS ANYOF_POSIXL +#define ANYOF_LARGE ANYOF_POSIXL -/* Unused: 0x10. When using, be sure to change ANYOF_FLAGS_ALL below */ +/* Should we raise a warning if matching against an above-Unicode code point? + * */ +#define ANYOF_WARN_SUPER 0x10 /* Can match something outside the bitmap that isn't in utf8 */ #define ANYOF_NONBITMAP_NON_UTF8 0x20 /* Matches every code point 0x100 and above*/ -#define ANYOF_UNICODE_ALL 0x40 +#define ANYOF_ABOVE_LATIN1_ALL 0x40 +#define ANYOF_UNICODE_ALL ANYOF_ABOVE_LATIN1_ALL /* Match all Latin1 characters that aren't ASCII when the target string is not * in utf8. */ -#define ANYOF_NON_UTF8_LATIN1_ALL 0x80 +#define ANYOF_NON_UTF8_NON_ASCII_ALL 0x80 -#define ANYOF_FLAGS_ALL (0xff & ~0x10) +#define ANYOF_FLAGS_ALL (0xff) -/* These are the flags that ANYOF_INVERT being set or not doesn't affect - * whether they are operative or not. e.g., the node still has LOCALE - * regardless of being inverted; whereas ANYOF_UNICODE_ALL means something - * different if inverted */ -#define INVERSION_UNAFFECTED_FLAGS (ANYOF_LOCALE \ - |ANYOF_LOC_FOLD \ - |ANYOF_CLASS \ - |ANYOF_NONBITMAP_NON_UTF8) +#define ANYOF_LOCALE_FLAGS (ANYOF_LOC_FOLD | ANYOF_POSIXL) + +/* These are the flags that apply to both regular ANYOF nodes and synthetic + * start class nodes during construction of the SSC. During finalization of + * the SSC, other of the flags could be added to it */ +#define ANYOF_COMMON_FLAGS (ANYOF_WARN_SUPER|ANYOF_UTF8) /* Character classes for node->classflags of ANYOF */ /* Should be synchronized with a table in regprop() */ @@ -408,19 +466,21 @@ struct regnode_charclass_class { # error Problem with handy.h _HIGHEST_REGCOMP_DOT_H_SYNC #define #endif -#define ANYOF_MAX (ANYOF_VERTWS) /* So upper loop limit is written: - * '< ANYOF_MAX' - * Hence doesn't include VERTWS, as that - * is a pseudo class */ -#if (ANYOF_MAX > 32) /* Must fit in 32-bit word */ +#define ANYOF_POSIXL_MAX (ANYOF_VERTWS) /* So upper loop limit is written: + * '< ANYOF_MAX' + * Hence doesn't include VERTWS, as that + * is a pseudo class */ +#define ANYOF_MAX ANYOF_POSIXL_MAX + +#if (ANYOF_POSIXL_MAX > 32) /* Must fit in 32-bit word */ # error Problem with handy.h _CC_foo #defines #endif -#define ANYOF_HORIZWS ((ANYOF_MAX)+2) /* = (ANYOF_NVERTWS + 1) */ -#define ANYOF_NHORIZWS ((ANYOF_MAX)+3) +#define ANYOF_HORIZWS ((ANYOF_POSIXL_MAX)+2) /* = (ANYOF_NVERTWS + 1) */ +#define ANYOF_NHORIZWS ((ANYOF_POSIXL_MAX)+3) -#define ANYOF_UNIPROP ((ANYOF_MAX)+4) /* Used to indicate a Unicode - property: \p{} or \P{} */ +#define ANYOF_UNIPROP ((ANYOF_POSIXL_MAX)+4) /* Used to indicate a Unicode + property: \p{} or \P{} */ /* Backward source code compatibility. */ @@ -434,22 +494,51 @@ struct regnode_charclass_class { /* Utility macros for the bitmap and classes of ANYOF */ #define ANYOF_SIZE (sizeof(struct regnode_charclass)) -#define ANYOF_CLASS_SIZE (sizeof(struct regnode_charclass_class)) +#define ANYOF_POSIXL_SIZE (sizeof(regnode_charclass_posixl)) +#define ANYOF_CLASS_SIZE ANYOF_POSIXL_SIZE #define ANYOF_FLAGS(p) ((p)->flags) #define ANYOF_BIT(c) (1 << ((c) & 7)) -#define ANYOF_CLASS_SET(p, c) (((struct regnode_charclass_class*) (p))->classflags |= (1U << (c))) -#define ANYOF_CLASS_CLEAR(p, c) (((struct regnode_charclass_class*) (p))->classflags &= ~ (1U <<(c))) -#define ANYOF_CLASS_TEST(p, c) (((struct regnode_charclass_class*) (p))->classflags & (1U << (c))) +#define ANYOF_POSIXL_SET(p, c) (((regnode_charclass_posixl*) (p))->classflags |= (1U << (c))) +#define ANYOF_CLASS_SET(p, c) ANYOF_POSIXL_SET((p), (c)) -#define ANYOF_CLASS_ZERO(ret) STMT_START { ((struct regnode_charclass_class*) (ret))->classflags = 0; } STMT_END +#define ANYOF_POSIXL_CLEAR(p, c) (((regnode_charclass_posixl*) (p))->classflags &= ~ (1U <<(c))) +#define ANYOF_CLASS_CLEAR(p, c) ANYOF_POSIXL_CLEAR((p), (c)) + +#define ANYOF_POSIXL_TEST(p, c) (((regnode_charclass_posixl*) (p))->classflags & (1U << (c))) +#define ANYOF_CLASS_TEST(p, c) ANYOF_POSIXL_TEST((p), (c)) + +#define ANYOF_POSIXL_ZERO(ret) STMT_START { ((regnode_charclass_posixl*) (ret))->classflags = 0; } STMT_END +#define ANYOF_CLASS_ZERO(ret) ANYOF_POSIXL_ZERO(ret) /* Shifts a bit to get, eg. 0x4000_0000, then subtracts 1 to get 0x3FFF_FFFF */ -#define ANYOF_CLASS_SETALL(ret) STMT_START { ((struct regnode_charclass_class*) (ret))->classflags = ((1U << ((ANYOF_MAX) - 1))) - 1; } STMT_END +#define ANYOF_POSIXL_SETALL(ret) STMT_START { ((regnode_charclass_posixl*) (ret))->classflags = ((1U << ((ANYOF_POSIXL_MAX) - 1))) - 1; } STMT_END +#define ANYOF_CLASS_SETALL(ret) ANYOF_POSIXL_SETALL(ret) + +#define ANYOF_POSIXL_TEST_ANY_SET(p) \ + ((ANYOF_FLAGS(p) & ANYOF_POSIXL) \ + && (((regnode_charclass_posixl*)(p))->classflags)) +#define ANYOF_CLASS_TEST_ANY_SET(p) ANYOF_POSIXL_TEST_ANY_SET(p) -#define ANYOF_CLASS_OR(source, dest) STMT_START { (dest)->classflags |= source->classflags ; } STMT_END +/* Since an SSC always has this field, we don't have to test for that; nor do + * we want to because the bit isn't set for SSC during its construction */ +#define ANYOF_POSIXL_SSC_TEST_ANY_SET(p) \ + cBOOL(((regnode_ssc*)(p))->classflags) +#define ANYOF_POSIXL_SSC_TEST_ALL_SET(p) /* Are all bits set? */ \ + (((regnode_ssc*) (p))->classflags \ + == ((1U << ((ANYOF_POSIXL_MAX) - 1))) - 1) + +#define ANYOF_POSIXL_TEST_ALL_SET(p) \ + ((ANYOF_FLAGS(p) & ANYOF_POSIXL) \ + && ((regnode_charclass_posixl*) (p))->classflags \ + == ((1U << ((ANYOF_POSIXL_MAX) - 1))) - 1) + +#define ANYOF_POSIXL_OR(source, dest) STMT_START { (dest)->classflags |= (source)->classflags ; } STMT_END +#define ANYOF_CLASS_OR(source, dest) ANYOF_POSIXL_OR((source), (dest)) + +#define ANYOF_POSIXL_AND(source, dest) STMT_START { (dest)->classflags &= (source)->classflags ; } STMT_END #define ANYOF_BITMAP_ZERO(ret) Zero(((struct regnode_charclass*)(ret))->bitmap, ANYOF_BITMAP_SIZE, char) #define ANYOF_BITMAP(p) (((struct regnode_charclass*)(p))->bitmap) @@ -467,14 +556,8 @@ struct regnode_charclass_class { memEQ (ANYOF_BITMAP(p), "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377", ANYOF_BITMAP_SIZE) #define ANYOF_SKIP ((ANYOF_SIZE - 1)/sizeof(regnode)) -#define ANYOF_CLASS_SKIP ((ANYOF_CLASS_SIZE - 1)/sizeof(regnode)) - -#define ANYOF_CLASS_TEST_ANY_SET(p) \ - ((ANYOF_FLAGS(p) & ANYOF_CLASS) \ - && (((struct regnode_charclass_class*)(p))->classflags)) -/*#define ANYOF_CLASS_ADD_SKIP (ANYOF_CLASS_SKIP - ANYOF_SKIP) - * */ - +#define ANYOF_POSIXL_SKIP ((ANYOF_POSIXL_SIZE - 1)/sizeof(regnode)) +#define ANYOF_CLASS_SKIP ANYOF_POSIXL_SKIP /* * Utility definitions. @@ -487,18 +570,20 @@ struct regnode_charclass_class { #define EXTRA_SIZE(guy) ((sizeof(guy)-1)/sizeof(struct regnode)) -#define REG_SEEN_ZERO_LEN 0x00000001 -#define REG_SEEN_LOOKBEHIND 0x00000002 -#define REG_SEEN_GPOS 0x00000004 +#define REG_ZERO_LEN_SEEN 0x00000001 +#define REG_LOOKBEHIND_SEEN 0x00000002 +#define REG_GPOS_SEEN 0x00000004 /* spare */ -#define REG_SEEN_CANY 0x00000010 -#define REG_SEEN_SANY REG_SEEN_CANY /* src bckwrd cmpt */ -#define REG_SEEN_RECURSE 0x00000020 -#define REG_TOP_LEVEL_BRANCHES 0x00000040 -#define REG_SEEN_VERBARG 0x00000080 -#define REG_SEEN_CUTGROUP 0x00000100 -#define REG_SEEN_RUN_ON_COMMENT 0x00000200 -#define REG_SEEN_EXACTF_SHARP_S 0x00000400 +#define REG_CANY_SEEN 0x00000010 +#define REG_RECURSE_SEEN 0x00000020 +#define REG_TOP_LEVEL_BRANCHES_SEEN 0x00000040 +#define REG_VERBARG_SEEN 0x00000080 +#define REG_CUTGROUP_SEEN 0x00000100 +#define REG_RUN_ON_COMMENT_SEEN 0x00000200 +#define REG_UNFOLDED_MULTI_SEEN 0x00000400 +#define REG_GOSTART_SEEN 0x00000800 +#define REG_UNBOUNDED_QUANTIFIER_SEEN 0x00001000 + START_EXTERN_C diff --git a/Master/tlpkg/tlperl/lib/CORE/regexp.h b/Master/tlpkg/tlperl/lib/CORE/regexp.h index 31fb879c66a..db7ae8be016 100644 --- a/Master/tlpkg/tlperl/lib/CORE/regexp.h +++ b/Master/tlpkg/tlperl/lib/CORE/regexp.h @@ -36,13 +36,14 @@ struct regexp_engine; struct regexp; struct reg_substr_datum { - I32 min_offset; - I32 max_offset; + SSize_t min_offset; /* min pos (in chars) that substr must appear */ + SSize_t max_offset /* max pos (in chars) that substr must appear */; SV *substr; /* non-utf8 variant */ SV *utf8_substr; /* utf8 variant */ - I32 end_shift; + SSize_t end_shift; /* how many fixed chars must end the string */ }; struct reg_substr_data { + U8 check_ix; /* index into data[] of check substr */ struct reg_substr_datum data[3]; /* Actual array */ }; @@ -55,15 +56,15 @@ struct reg_substr_data { /* offsets within a string of a particular /(.)/ capture */ typedef struct regexp_paren_pair { - I32 start; - I32 end; + SSize_t start; + SSize_t end; /* 'start_tmp' records a new opening position before the matching end * has been found, so that the old start and end values are still * valid, e.g. * "abc" =~ /(.(?{print "[$1]"}))+/ *outputs [][a][b] * This field is not part of the API. */ - I32 start_tmp; + SSize_t start_tmp; } regexp_paren_pair; #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C) @@ -104,9 +105,9 @@ struct reg_code_block { /* Information about the match that the perl core uses to */ \ /* manage things */ \ U32 extflags; /* Flags used both externally and internally */ \ - I32 minlen; /* mininum possible number of chars in string to match */\ - I32 minlenret; /* mininum possible number of chars in $& */ \ - U32 gofs; /* chars left of pos that we search from */ \ + SSize_t minlen; /* mininum possible number of chars in string to match */\ + SSize_t minlenret; /* mininum possible number of chars in $& */ \ + STRLEN gofs; /* chars left of pos that we search from */ \ /* substring data about strings that must appear in the */ \ /* final match, used for optimisations */ \ struct reg_substr_data *substrs; \ @@ -124,10 +125,11 @@ struct reg_code_block { /* saved or original string so \digit works forever. */ \ char *subbeg; \ SV_SAVED_COPY /* If non-NULL, SV which is COW from original */\ - I32 sublen; /* Length of string pointed by subbeg */ \ - I32 suboffset; /* byte offset of subbeg from logical start of str */ \ - I32 subcoffset; /* suboffset equiv, but in chars (for @-/@+) */ \ + SSize_t sublen; /* Length of string pointed by subbeg */ \ + SSize_t suboffset; /* byte offset of subbeg from logical start of str */ \ + SSize_t subcoffset; /* suboffset equiv, but in chars (for @-/@+) */ \ /* Information about the match that isn't often used */ \ + SSize_t maxlen; /* mininum possible number of chars in string to match */\ /* offset from wrapped to the start of precomp */ \ PERL_BITFIELD32 pre_prefix:4; \ /* original flags used to compile the pattern, may differ */ \ @@ -146,7 +148,7 @@ typedef struct regexp { typedef struct re_scream_pos_data_s { char **scream_olds; /* match pos */ - I32 *scream_pos; /* Internal iterator of scream. */ + SSize_t *scream_pos; /* Internal iterator of scream. */ } re_scream_pos_data; /* regexp_engine structure. This is the dispatch table for regexes. @@ -155,10 +157,15 @@ typedef struct re_scream_pos_data_s typedef struct regexp_engine { REGEXP* (*comp) (pTHX_ SV * const pattern, U32 flags); I32 (*exec) (pTHX_ REGEXP * const rx, char* stringarg, char* strend, - char* strbeg, I32 minend, SV* screamer, + char* strbeg, SSize_t minend, SV* sv, void* data, U32 flags); - char* (*intuit) (pTHX_ REGEXP * const rx, SV *sv, char *strpos, - char *strend, const U32 flags, + char* (*intuit) (pTHX_ + REGEXP * const rx, + SV *sv, + const char * const strbeg, + char *strpos, + char *strend, + const U32 flags, re_scream_pos_data *data); SV* (*checkstr) (pTHX_ REGEXP * const rx); void (*free) (pTHX_ REGEXP * const rx); @@ -225,7 +232,7 @@ typedef struct regexp_engine { =for apidoc Am|REGEXP *|SvRX|SV *sv -Convenience macro to get the REGEXP from a SV. This is approximately +Convenience macro to get the REGEXP from a SV. This is approximately equivalent to the following snippet: if (SvMAGICAL(sv)) @@ -379,29 +386,25 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp) } } -/* Anchor and GPOS related stuff */ -#define RXf_ANCH_BOL (1<<(RXf_BASE_SHIFT+0)) -#define RXf_ANCH_MBOL (1<<(RXf_BASE_SHIFT+1)) -#define RXf_ANCH_SBOL (1<<(RXf_BASE_SHIFT+2)) -#define RXf_ANCH_GPOS (1<<(RXf_BASE_SHIFT+3)) -#define RXf_GPOS_SEEN (1<<(RXf_BASE_SHIFT+4)) -#define RXf_GPOS_FLOAT (1<<(RXf_BASE_SHIFT+5)) -/* two bits here */ -#define RXf_ANCH (RXf_ANCH_BOL|RXf_ANCH_MBOL|RXf_ANCH_GPOS|RXf_ANCH_SBOL) -#define RXf_GPOS_CHECK (RXf_GPOS_SEEN|RXf_ANCH_GPOS) -#define RXf_ANCH_SINGLE (RXf_ANCH_SBOL|RXf_ANCH_GPOS) +/* Do we have some sort of anchor? */ +#define RXf_IS_ANCHORED (1<<(RXf_BASE_SHIFT+0)) +#define RXf_UNUSED1 (1<<(RXf_BASE_SHIFT+1)) +#define RXf_UNUSED2 (1<<(RXf_BASE_SHIFT+2)) +#define RXf_UNUSED3 (1<<(RXf_BASE_SHIFT+3)) +#define RXf_UNUSED4 (1<<(RXf_BASE_SHIFT+4)) +#define RXf_UNUSED5 (1<<(RXf_BASE_SHIFT+5)) /* What we have seen */ #define RXf_NO_INPLACE_SUBST (1<<(RXf_BASE_SHIFT+6)) #define RXf_EVAL_SEEN (1<<(RXf_BASE_SHIFT+7)) -#define RXf_CANY_SEEN (1<<(RXf_BASE_SHIFT+8)) +#define RXf_UNUSED8 (1<<(RXf_BASE_SHIFT+8)) /* Special */ -#define RXf_NOSCAN (1<<(RXf_BASE_SHIFT+9)) +#define RXf_UNBOUNDED_QUANTIFIER_SEEN (1<<(RXf_BASE_SHIFT+9)) #define RXf_CHECK_ALL (1<<(RXf_BASE_SHIFT+10)) /* UTF8 related */ -#define RXf_MATCH_UTF8 (1<<(RXf_BASE_SHIFT+11)) +#define RXf_MATCH_UTF8 (1<<(RXf_BASE_SHIFT+11)) /* $1 etc are utf8 */ /* Intuit related */ #define RXf_USE_INTUIT_NOML (1<<(RXf_BASE_SHIFT+12)) @@ -412,8 +415,7 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp) /* Copy and tainted info */ #define RXf_COPY_DONE (1<<(RXf_BASE_SHIFT+16)) -/* during execution: pattern temporarily tainted by executing locale ops; - * post-execution: $1 et al are tainted */ +/* post-execution: $1 et al are tainted */ #define RXf_TAINTED_SEEN (1<<(RXf_BASE_SHIFT+17)) /* this pattern was tainted during compilation */ #define RXf_TAINTED (1<<(RXf_BASE_SHIFT+18)) @@ -433,7 +435,7 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp) * */ -#if NO_TAINT_SUPPORT +#ifdef NO_TAINT_SUPPORT # define RX_ISTAINTED(prog) 0 # define RX_TAINT_on(prog) NOOP # define RXp_MATCH_TAINTED(prog) 0 @@ -496,6 +498,10 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp) #define RX_LASTPAREN(prog) (ReANY(prog)->lastparen) #define RX_LASTCLOSEPAREN(prog) (ReANY(prog)->lastcloseparen) #define RX_SAVED_COPY(prog) (ReANY(prog)->saved_copy) +/* last match was zero-length */ +#define RX_ZERO_LEN(prog) \ + (RX_OFFS(prog)[0].start + (SSize_t)RX_GOFS(prog) \ + == RX_OFFS(prog)[0].end) #endif /* PLUGGABLE_RE_EXTENSION */ @@ -523,22 +529,30 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp) #define RX_MATCH_UTF8_on(prog) (RX_EXTFLAGS(prog) |= RXf_MATCH_UTF8) #define RX_MATCH_UTF8_off(prog) (RX_EXTFLAGS(prog) &= ~RXf_MATCH_UTF8) #define RX_MATCH_UTF8_set(prog, t) ((t) \ - ? (RX_MATCH_UTF8_on(prog), (PL_reg_match_utf8 = 1)) \ - : (RX_MATCH_UTF8_off(prog), (PL_reg_match_utf8 = 0))) + ? RX_MATCH_UTF8_on(prog) \ + : RX_MATCH_UTF8_off(prog)) /* Whether the pattern stored at RX_WRAPPED is in UTF-8 */ #define RX_UTF8(prog) SvUTF8(prog) -#define REXEC_COPY_STR 0x01 /* Need to copy the string. */ -#define REXEC_CHECKED 0x02 /* check_substr already checked. */ -#define REXEC_SCREAM 0x04 /* use scream table. */ -#define REXEC_IGNOREPOS 0x08 /* \G matches at start. */ -#define REXEC_NOT_FIRST 0x10 /* This is another iteration of //g. */ - /* under REXEC_COPY_STR, it's ok for the - * engine (modulo PL_sawamperand etc) - * to skip copying ... */ -#define REXEC_COPY_SKIP_PRE 0x20 /* ...the $` part of the string, or */ -#define REXEC_COPY_SKIP_POST 0x40 /* ...the $' part of the string */ + +/* bits in flags arg of Perl_regexec_flags() */ + +#define REXEC_COPY_STR 0x01 /* Need to copy the string for captures. */ +#define REXEC_CHECKED 0x02 /* re_intuit_start() already called. */ +#define REXEC_SCREAM 0x04 /* currently unused. */ +#define REXEC_IGNOREPOS 0x08 /* use stringarg, not pos(), for \G match */ +#define REXEC_NOT_FIRST 0x10 /* This is another iteration of //g: + no need to copy string again */ + + /* under REXEC_COPY_STR, it's ok for the + engine (modulo PL_sawamperand etc) + to skip copying: ... */ +#define REXEC_COPY_SKIP_PRE 0x20 /* ...the $` part of the string, or */ +#define REXEC_COPY_SKIP_POST 0x40 /* ...the $' part of the string */ +#define REXEC_FAIL_ON_UNDERFLOW 0x80 /* fail the match if $& would start before + the start pos (so s/.\G// would fail + on second iteration */ #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) # define ReREFCNT_inc(re) \ @@ -571,17 +585,64 @@ get_regex_charset_name(const U32 flags, STRLEN* const lenp) #define FBMrf_MULTILINE 1 +struct regmatch_state; +struct regmatch_slab; + +/* like regmatch_info_aux, but contains extra fields only needed if the + * pattern contains (?{}). If used, is snuck into the second slot in the + * regmatch_state stack at the start of execution */ + +typedef struct { + regexp *rex; + PMOP *curpm; /* saved PL_curpm */ +#ifdef PERL_ANY_COW + SV *saved_copy; /* saved saved_copy field from rex */ +#endif + char *subbeg; /* saved subbeg field from rex */ + STRLEN sublen; /* saved sublen field from rex */ + STRLEN suboffset; /* saved suboffset field from rex */ + STRLEN subcoffset; /* saved subcoffset field from rex */ + MAGIC *pos_magic; /* pos() magic attached to $_ */ + SSize_t pos; /* the original value of pos() in pos_magic */ + U8 pos_flags; /* flags to be restored; currently only MGf_BYTES*/ +} regmatch_info_aux_eval; + + +/* fields that logically live in regmatch_info, but which need cleaning + * up on croak(), and so are instead are snuck into the first slot in + * the regmatch_state stack at the start of execution */ + +typedef struct { + regmatch_info_aux_eval *info_aux_eval; + struct regmatch_state *old_regmatch_state; /* saved PL_regmatch_state */ + struct regmatch_slab *old_regmatch_slab; /* saved PL_regmatch_slab */ + char *poscache; /* S-L cache of fail positions of WHILEMs */ +} regmatch_info_aux; + + /* some basic information about the current match that is created by - * Perl_regexec_flags and then passed to regtry(), regmatch() etc */ + * Perl_regexec_flags and then passed to regtry(), regmatch() etc. + * It is allocated as a local var on the stack, so nothing should be + * stored in it that needs preserving or clearing up on croak(). + * For that, see the aux_info and aux_info_eval members of the + * regmatch_state union. */ typedef struct { - REGEXP *prog; - char *bol; - char *till; - SV *sv; - char *ganch; - char *cutpoint; - bool is_utf8_pat; + REGEXP *prog; /* the regex being executed */ + const char * strbeg; /* real start of string */ + char *strend; /* one byte beyond last char of match string */ + char *till; /* matches shorter than this fail (see minlen arg) */ + SV *sv; /* the SV string currently being matched */ + char *ganch; /* position of \G anchor */ + char *cutpoint; /* (*COMMIT) position (if any) */ + regmatch_info_aux *info_aux; /* extra fields that need cleanup */ + regmatch_info_aux_eval *info_aux_eval; /* extra saved state for (?{}) */ + I32 poscache_maxiter; /* how many whilems todo before S-L cache kicks in */ + I32 poscache_iter; /* current countdown from _maxiter to zero */ + STRLEN poscache_size; /* size of regmatch_info_aux.poscache */ + bool intuit; /* re_intuit_start() is the top-level caller */ + bool is_utf8_pat; /* regex is utf8 */ + bool is_utf8_target; /* string being matched is utf8 */ bool warned; /* we have issued a recursion warning; no need for more */ } regmatch_info; @@ -600,6 +661,29 @@ typedef struct regmatch_state { union { + /* the 'info_aux' and 'info_aux_eval' union members are cuckoos in + * the nest. They aren't saved backtrack state; rather they + * represent one or two extra chunks of data that need allocating + * at the start of a match. These fields would logically live in + * the regmatch_info struct, except that is allocated on the + * C stack, and these fields are all things that require cleanup + * after a croak(), when the stack is lost. + * As a convenience, we just use the first 1 or 2 regmatch_state + * slots to store this info, as we will be allocating a slab of + * these anyway. Otherwise we'd have to malloc and then free them, + * or allocate them on the save stack (where they will get + * realloced if the save stack grows). + * info_aux contains the extra fields that are always needed; + * info_aux_eval contains extra fields that only needed if + * the pattern contains code blocks + * We split them into two separate structs to avoid increasing + * the size of the union. + */ + + regmatch_info_aux info_aux; + + regmatch_info_aux_eval info_aux_eval; + /* this is a fake union member that matches the first element * of each member that needs to store positive backtrack * information */ @@ -654,7 +738,6 @@ typedef struct regmatch_state { struct regmatch_state *prev_eval; struct regmatch_state *prev_curlyx; REGEXP *prev_rex; - bool saved_utf8_pat; /* saved copy of is_utf8_pat */ CHECKPOINT cp; /* remember current savestack indexes */ CHECKPOINT lastcp; U32 close_paren; /* which close bracket is our end */ @@ -755,50 +838,7 @@ typedef struct regmatch_slab { struct regmatch_slab *prev, *next; } regmatch_slab; -#define PL_bostr PL_reg_state.re_state_bostr -#define PL_regeol PL_reg_state.re_state_regeol -#define PL_reg_match_utf8 PL_reg_state.re_state_reg_match_utf8 -#define PL_reg_magic PL_reg_state.re_state_reg_magic -#define PL_reg_oldpos PL_reg_state.re_state_reg_oldpos -#define PL_reg_oldcurpm PL_reg_state.re_state_reg_oldcurpm -#define PL_reg_curpm PL_reg_state.re_state_reg_curpm -#define PL_reg_oldsaved PL_reg_state.re_state_reg_oldsaved -#define PL_reg_oldsavedlen PL_reg_state.re_state_reg_oldsavedlen -#define PL_reg_oldsavedoffset PL_reg_state.re_state_reg_oldsavedoffset -#define PL_reg_oldsavedcoffset PL_reg_state.re_state_reg_oldsavedcoffset -#define PL_reg_maxiter PL_reg_state.re_state_reg_maxiter -#define PL_reg_leftiter PL_reg_state.re_state_reg_leftiter -#define PL_reg_poscache PL_reg_state.re_state_reg_poscache -#define PL_reg_poscache_size PL_reg_state.re_state_reg_poscache_size -#define PL_reg_starttry PL_reg_state.re_state_reg_starttry -#define PL_nrs PL_reg_state.re_state_nrs - -struct re_save_state { - bool re_state_eval_setup_done; /* from regexec.c */ - bool re_state_reg_match_utf8; /* from regexec.c */ - /* Space for U8 */ - I32 re_state_reg_oldpos; /* from regexec.c */ - I32 re_state_reg_maxiter; /* max wait until caching pos */ - I32 re_state_reg_leftiter; /* wait until caching pos */ - char *re_state_bostr; - char *re_state_regeol; /* End of input, for $ check. */ - MAGIC *re_state_reg_magic; /* from regexec.c */ - PMOP *re_state_reg_oldcurpm; /* from regexec.c */ - PMOP *re_state_reg_curpm; /* from regexec.c */ - char *re_state_reg_oldsaved; /* old saved substr during match */ - STRLEN re_state_reg_oldsavedlen; /* old length of saved substr during match */ - STRLEN re_state_reg_oldsavedoffset; /* old offset of saved substr during match */ - STRLEN re_state_reg_oldsavedcoffset;/* old coffset of saved substr during match */ - STRLEN re_state_reg_poscache_size; /* size of pos cache of WHILEM */ - char *re_state_reg_poscache; /* cache of pos of WHILEM */ - char *re_state_reg_starttry; /* from regexec.c */ -#ifdef PERL_ANY_COW - SV *re_state_nrs; /* was placeholder: unused since 5.8.0 (5.7.2 patch #12027 for bug ID 20010815.012). Used to save rx->saved_copy */ -#endif -}; -#define SAVESTACK_ALLOC_FOR_RE_SAVE_STATE \ - (1 + ((sizeof(struct re_save_state) - 1) / sizeof(*PL_savestack))) /* * Local variables: diff --git a/Master/tlpkg/tlperl/lib/CORE/regnodes.h b/Master/tlpkg/tlperl/lib/CORE/regnodes.h index 0caf86dd556..43ec681967c 100644 --- a/Master/tlpkg/tlperl/lib/CORE/regnodes.h +++ b/Master/tlpkg/tlperl/lib/CORE/regnodes.h @@ -6,8 +6,8 @@ /* Regops and State definitions */ -#define REGNODE_MAX 95 -#define REGMATCH_STATE_MAX 135 +#define REGNODE_MAX 93 +#define REGMATCH_STATE_MAX 133 #define END 0 /* 0000 End of program. */ #define SUCCEED 1 /* 0x01 Return from a subroutine, basically. */ @@ -18,93 +18,91 @@ #define EOL 6 /* 0x06 Match "" at end of line. */ #define MEOL 7 /* 0x07 Same, assuming multiline. */ #define SEOL 8 /* 0x08 Same, assuming singleline. */ -#define BOUND 9 /* 0x09 Match "" at any word boundary using native charset semantics for non-utf8 */ +#define BOUND 9 /* 0x09 Match "" at any word boundary using native charset rules for non-utf8 */ #define BOUNDL 10 /* 0x0a Match "" at any locale word boundary */ -#define BOUNDU 11 /* 0x0b Match "" at any word boundary using Unicode semantics */ -#define BOUNDA 12 /* 0x0c Match "" at any word boundary using ASCII semantics */ -#define NBOUND 13 /* 0x0d Match "" at any word non-boundary using native charset semantics for non-utf8 */ +#define BOUNDU 11 /* 0x0b Match "" at any word boundary using Unicode rules */ +#define BOUNDA 12 /* 0x0c Match "" at any word boundary using ASCII rules */ +#define NBOUND 13 /* 0x0d Match "" at any word non-boundary using native charset rules for non-utf8 */ #define NBOUNDL 14 /* 0x0e Match "" at any locale word non-boundary */ -#define NBOUNDU 15 /* 0x0f Match "" at any word non-boundary using Unicode semantics */ -#define NBOUNDA 16 /* 0x10 Match "" at any word non-boundary using ASCII semantics */ +#define NBOUNDU 15 /* 0x0f Match "" at any word non-boundary using Unicode rules */ +#define NBOUNDA 16 /* 0x10 Match "" at any word non-boundary using ASCII rules */ #define GPOS 17 /* 0x11 Matches where last m//g left off. */ #define REG_ANY 18 /* 0x12 Match any one character (except newline). */ #define SANY 19 /* 0x13 Match any one character. */ #define CANY 20 /* 0x14 Match any one byte. */ #define ANYOF 21 /* 0x15 Match character in (or not in) this class, single char match only */ -#define ANYOF_WARN_SUPER 22 /* 0x16 Match character in (or not in) this class, warn (if enabled) upon matching a char above Unicode max; */ -#define ANYOF_SYNTHETIC 23 /* 0x17 Synthetic start class */ -#define POSIXD 24 /* 0x18 Some [[:class:]] under /d; the FLAGS field gives which one */ -#define POSIXL 25 /* 0x19 Some [[:class:]] under /l; the FLAGS field gives which one */ -#define POSIXU 26 /* 0x1a Some [[:class:]] under /u; the FLAGS field gives which one */ -#define POSIXA 27 /* 0x1b Some [[:class:]] under /a; the FLAGS field gives which one */ -#define NPOSIXD 28 /* 0x1c complement of POSIXD, [[:^class:]] */ -#define NPOSIXL 29 /* 0x1d complement of POSIXL, [[:^class:]] */ -#define NPOSIXU 30 /* 0x1e complement of POSIXU, [[:^class:]] */ -#define NPOSIXA 31 /* 0x1f complement of POSIXA, [[:^class:]] */ -#define CLUMP 32 /* 0x20 Match any extended grapheme cluster sequence */ -#define BRANCH 33 /* 0x21 Match this alternative, or the next... */ -#define BACK 34 /* 0x22 Match "", "next" ptr points backward. */ -#define EXACT 35 /* 0x23 Match this string (preceded by length). */ -#define EXACTF 36 /* 0x24 Match this non-UTF-8 string (not guaranteed to be folded) using /id rules (w/len). */ -#define EXACTFL 37 /* 0x25 Match this string (not guaranteed to be folded) using /il rules (w/len). */ -#define EXACTFU 38 /* 0x26 Match this string (folded iff in UTF-8, length in folding doesn't change if not in UTF-8) using /iu rules (w/len). */ -#define EXACTFA 39 /* 0x27 Match this string (not guaranteed to be folded) using /iaa rules (w/len). */ -#define EXACTFU_SS 40 /* 0x28 Match this string (folded iff in UTF-8, length in folding may change even if not in UTF-8) using /iu rules (w/len). */ -#define EXACTFU_TRICKYFOLD 41 /* 0x29 Match this folded UTF-8 string using /iu rules */ -#define NOTHING 42 /* 0x2a Match empty string. */ -#define TAIL 43 /* 0x2b Match empty string. Can jump here from outside. */ -#define STAR 44 /* 0x2c Match this (simple) thing 0 or more times. */ -#define PLUS 45 /* 0x2d Match this (simple) thing 1 or more times. */ -#define CURLY 46 /* 0x2e Match this simple thing {n,m} times. */ -#define CURLYN 47 /* 0x2f Capture next-after-this simple thing */ -#define CURLYM 48 /* 0x30 Capture this medium-complex thing {n,m} times. */ -#define CURLYX 49 /* 0x31 Match this complex thing {n,m} times. */ -#define WHILEM 50 /* 0x32 Do curly processing and see if rest matches. */ -#define OPEN 51 /* 0x33 Mark this point in input as start of #n. */ -#define CLOSE 52 /* 0x34 Analogous to OPEN. */ -#define REF 53 /* 0x35 Match some already matched string */ -#define REFF 54 /* 0x36 Match already matched string, folded using native charset semantics for non-utf8 */ -#define REFFL 55 /* 0x37 Match already matched string, folded in loc. */ -#define REFFU 56 /* 0x38 Match already matched string, folded using unicode semantics for non-utf8 */ -#define REFFA 57 /* 0x39 Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */ -#define NREF 58 /* 0x3a Match some already matched string */ -#define NREFF 59 /* 0x3b Match already matched string, folded using native charset semantics for non-utf8 */ -#define NREFFL 60 /* 0x3c Match already matched string, folded in loc. */ -#define NREFFU 61 /* 0x3d Match already matched string, folded using unicode semantics for non-utf8 */ -#define NREFFA 62 /* 0x3e Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */ -#define IFMATCH 63 /* 0x3f Succeeds if the following matches. */ -#define UNLESSM 64 /* 0x40 Fails if the following matches. */ -#define SUSPEND 65 /* 0x41 "Independent" sub-RE. */ -#define IFTHEN 66 /* 0x42 Switch, should be preceded by switcher. */ -#define GROUPP 67 /* 0x43 Whether the group matched. */ -#define LONGJMP 68 /* 0x44 Jump far away. */ -#define BRANCHJ 69 /* 0x45 BRANCH with long offset. */ -#define EVAL 70 /* 0x46 Execute some Perl code. */ -#define MINMOD 71 /* 0x47 Next operator is not greedy. */ -#define LOGICAL 72 /* 0x48 Next opcode should set the flag only. */ -#define RENUM 73 /* 0x49 Group with independently numbered parens. */ -#define TRIE 74 /* 0x4a Match many EXACT(F[ALU]?)? at once. flags==type */ -#define TRIEC 75 /* 0x4b Same as TRIE, but with embedded charclass data */ -#define AHOCORASICK 76 /* 0x4c Aho Corasick stclass. flags==type */ -#define AHOCORASICKC 77 /* 0x4d Same as AHOCORASICK, but with embedded charclass data */ -#define GOSUB 78 /* 0x4e recurse to paren arg1 at (signed) ofs arg2 */ -#define GOSTART 79 /* 0x4f recurse to start of pattern */ -#define NGROUPP 80 /* 0x50 Whether the group matched. */ -#define INSUBP 81 /* 0x51 Whether we are in a specific recurse. */ -#define DEFINEP 82 /* 0x52 Never execute directly. */ -#define ENDLIKE 83 /* 0x53 Used only for the type field of verbs */ -#define OPFAIL 84 /* 0x54 Same as (?!) */ -#define ACCEPT 85 /* 0x55 Accepts the current matched string. */ -#define VERB 86 /* 0x56 Used only for the type field of verbs */ -#define PRUNE 87 /* 0x57 Pattern fails at this startpoint if no-backtracking through this */ -#define MARKPOINT 88 /* 0x58 Push the current location for rollback by cut. */ -#define SKIP 89 /* 0x59 On failure skip forward (to the mark) before retrying */ -#define COMMIT 90 /* 0x5a Pattern fails outright if backtracking through this */ -#define CUTGROUP 91 /* 0x5b On failure go to the next alternation in the group */ -#define KEEPS 92 /* 0x5c $& begins here. */ -#define LNBREAK 93 /* 0x5d generic newline pattern */ -#define OPTIMIZED 94 /* 0x5e Placeholder for dump. */ -#define PSEUDO 95 /* 0x5f Pseudo opcode for internal use. */ +#define POSIXD 22 /* 0x16 Some [[:class:]] under /d; the FLAGS field gives which one */ +#define POSIXL 23 /* 0x17 Some [[:class:]] under /l; the FLAGS field gives which one */ +#define POSIXU 24 /* 0x18 Some [[:class:]] under /u; the FLAGS field gives which one */ +#define POSIXA 25 /* 0x19 Some [[:class:]] under /a; the FLAGS field gives which one */ +#define NPOSIXD 26 /* 0x1a complement of POSIXD, [[:^class:]] */ +#define NPOSIXL 27 /* 0x1b complement of POSIXL, [[:^class:]] */ +#define NPOSIXU 28 /* 0x1c complement of POSIXU, [[:^class:]] */ +#define NPOSIXA 29 /* 0x1d complement of POSIXA, [[:^class:]] */ +#define CLUMP 30 /* 0x1e Match any extended grapheme cluster sequence */ +#define BRANCH 31 /* 0x1f Match this alternative, or the next... */ +#define BACK 32 /* 0x20 Match "", "next" ptr points backward. */ +#define EXACT 33 /* 0x21 Match this string (preceded by length). */ +#define EXACTF 34 /* 0x22 Match this non-UTF-8 string (not guaranteed to be folded) using /id rules (w/len). */ +#define EXACTFL 35 /* 0x23 Match this string (not guaranteed to be folded) using /il rules (w/len). */ +#define EXACTFU 36 /* 0x24 Match this string (folded iff in UTF-8, length in folding doesn't change if not in UTF-8) using /iu rules (w/len). */ +#define EXACTFA 37 /* 0x25 Match this string (not guaranteed to be folded) using /iaa rules (w/len). */ +#define EXACTFU_SS 38 /* 0x26 Match this string (folded iff in UTF-8, length in folding may change even if not in UTF-8) using /iu rules (w/len). */ +#define EXACTFA_NO_TRIE 39 /* 0x27 Match this string (which is not trie-able; not guaranteed to be folded) using /iaa rules (w/len). */ +#define NOTHING 40 /* 0x28 Match empty string. */ +#define TAIL 41 /* 0x29 Match empty string. Can jump here from outside. */ +#define STAR 42 /* 0x2a Match this (simple) thing 0 or more times. */ +#define PLUS 43 /* 0x2b Match this (simple) thing 1 or more times. */ +#define CURLY 44 /* 0x2c Match this simple thing {n,m} times. */ +#define CURLYN 45 /* 0x2d Capture next-after-this simple thing */ +#define CURLYM 46 /* 0x2e Capture this medium-complex thing {n,m} times. */ +#define CURLYX 47 /* 0x2f Match this complex thing {n,m} times. */ +#define WHILEM 48 /* 0x30 Do curly processing and see if rest matches. */ +#define OPEN 49 /* 0x31 Mark this point in input as start of #n. */ +#define CLOSE 50 /* 0x32 Analogous to OPEN. */ +#define REF 51 /* 0x33 Match some already matched string */ +#define REFF 52 /* 0x34 Match already matched string, folded using native charset rules for non-utf8 */ +#define REFFL 53 /* 0x35 Match already matched string, folded in loc. */ +#define REFFU 54 /* 0x36 Match already matched string, folded using unicode rules for non-utf8 */ +#define REFFA 55 /* 0x37 Match already matched string, folded using unicode rules for non-utf8, no mixing ASCII, non-ASCII */ +#define NREF 56 /* 0x38 Match some already matched string */ +#define NREFF 57 /* 0x39 Match already matched string, folded using native charset rules for non-utf8 */ +#define NREFFL 58 /* 0x3a Match already matched string, folded in loc. */ +#define NREFFU 59 /* 0x3b Match already matched string, folded using unicode rules for non-utf8 */ +#define NREFFA 60 /* 0x3c Match already matched string, folded using unicode rules for non-utf8, no mixing ASCII, non-ASCII */ +#define IFMATCH 61 /* 0x3d Succeeds if the following matches. */ +#define UNLESSM 62 /* 0x3e Fails if the following matches. */ +#define SUSPEND 63 /* 0x3f "Independent" sub-RE. */ +#define IFTHEN 64 /* 0x40 Switch, should be preceded by switcher. */ +#define GROUPP 65 /* 0x41 Whether the group matched. */ +#define LONGJMP 66 /* 0x42 Jump far away. */ +#define BRANCHJ 67 /* 0x43 BRANCH with long offset. */ +#define EVAL 68 /* 0x44 Execute some Perl code. */ +#define MINMOD 69 /* 0x45 Next operator is not greedy. */ +#define LOGICAL 70 /* 0x46 Next opcode should set the flag only. */ +#define RENUM 71 /* 0x47 Group with independently numbered parens. */ +#define TRIE 72 /* 0x48 Match many EXACT(F[ALU]?)? at once. flags==type */ +#define TRIEC 73 /* 0x49 Same as TRIE, but with embedded charclass data */ +#define AHOCORASICK 74 /* 0x4a Aho Corasick stclass. flags==type */ +#define AHOCORASICKC 75 /* 0x4b Same as AHOCORASICK, but with embedded charclass data */ +#define GOSUB 76 /* 0x4c recurse to paren arg1 at (signed) ofs arg2 */ +#define GOSTART 77 /* 0x4d recurse to start of pattern */ +#define NGROUPP 78 /* 0x4e Whether the group matched. */ +#define INSUBP 79 /* 0x4f Whether we are in a specific recurse. */ +#define DEFINEP 80 /* 0x50 Never execute directly. */ +#define ENDLIKE 81 /* 0x51 Used only for the type field of verbs */ +#define OPFAIL 82 /* 0x52 Same as (?!) */ +#define ACCEPT 83 /* 0x53 Accepts the current matched string. */ +#define VERB 84 /* 0x54 Used only for the type field of verbs */ +#define PRUNE 85 /* 0x55 Pattern fails at this startpoint if no-backtracking through this */ +#define MARKPOINT 86 /* 0x56 Push the current location for rollback by cut. */ +#define SKIP 87 /* 0x57 On failure skip forward (to the mark) before retrying */ +#define COMMIT 88 /* 0x58 Pattern fails outright if backtracking through this */ +#define CUTGROUP 89 /* 0x59 On failure go to the next alternation in the group */ +#define KEEPS 90 /* 0x5a $& begins here. */ +#define LNBREAK 91 /* 0x5b generic newline pattern */ +#define OPTIMIZED 92 /* 0x5c Placeholder for dump. */ +#define PSEUDO 93 /* 0x5d Pseudo opcode for internal use. */ /* ------------ States ------------- */ #define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */ #define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */ @@ -175,8 +173,6 @@ EXTCONST U8 PL_regkind[] = { REG_ANY, /* SANY */ REG_ANY, /* CANY */ ANYOF, /* ANYOF */ - ANYOF, /* ANYOF_WARN_SUPER */ - ANYOF, /* ANYOF_SYNTHETIC */ POSIXD, /* POSIXD */ POSIXD, /* POSIXL */ POSIXD, /* POSIXU */ @@ -194,7 +190,7 @@ EXTCONST U8 PL_regkind[] = { EXACT, /* EXACTFU */ EXACT, /* EXACTFA */ EXACT, /* EXACTFU_SS */ - EXACT, /* EXACTFU_TRICKYFOLD */ + EXACT, /* EXACTFA_NO_TRIE */ NOTHING, /* NOTHING */ NOTHING, /* TAIL */ STAR, /* STAR */ @@ -319,8 +315,6 @@ static const U8 regarglen[] = { 0, /* SANY */ 0, /* CANY */ 0, /* ANYOF */ - 0, /* ANYOF_WARN_SUPER */ - 0, /* ANYOF_SYNTHETIC */ 0, /* POSIXD */ 0, /* POSIXL */ 0, /* POSIXU */ @@ -338,7 +332,7 @@ static const U8 regarglen[] = { 0, /* EXACTFU */ 0, /* EXACTFA */ 0, /* EXACTFU_SS */ - 0, /* EXACTFU_TRICKYFOLD */ + 0, /* EXACTFA_NO_TRIE */ 0, /* NOTHING */ 0, /* TAIL */ 0, /* STAR */ @@ -420,8 +414,6 @@ static const char reg_off_by_arg[] = { 0, /* SANY */ 0, /* CANY */ 0, /* ANYOF */ - 0, /* ANYOF_WARN_SUPER */ - 0, /* ANYOF_SYNTHETIC */ 0, /* POSIXD */ 0, /* POSIXL */ 0, /* POSIXU */ @@ -439,7 +431,7 @@ static const char reg_off_by_arg[] = { 0, /* EXACTFU */ 0, /* EXACTFA */ 0, /* EXACTFU_SS */ - 0, /* EXACTFU_TRICKYFOLD */ + 0, /* EXACTFA_NO_TRIE */ 0, /* NOTHING */ 0, /* TAIL */ 0, /* STAR */ @@ -526,80 +518,78 @@ EXTCONST char * const PL_reg_name[] = { "SANY", /* 0x13 */ "CANY", /* 0x14 */ "ANYOF", /* 0x15 */ - "ANYOF_WARN_SUPER", /* 0x16 */ - "ANYOF_SYNTHETIC", /* 0x17 */ - "POSIXD", /* 0x18 */ - "POSIXL", /* 0x19 */ - "POSIXU", /* 0x1a */ - "POSIXA", /* 0x1b */ - "NPOSIXD", /* 0x1c */ - "NPOSIXL", /* 0x1d */ - "NPOSIXU", /* 0x1e */ - "NPOSIXA", /* 0x1f */ - "CLUMP", /* 0x20 */ - "BRANCH", /* 0x21 */ - "BACK", /* 0x22 */ - "EXACT", /* 0x23 */ - "EXACTF", /* 0x24 */ - "EXACTFL", /* 0x25 */ - "EXACTFU", /* 0x26 */ - "EXACTFA", /* 0x27 */ - "EXACTFU_SS", /* 0x28 */ - "EXACTFU_TRICKYFOLD", /* 0x29 */ - "NOTHING", /* 0x2a */ - "TAIL", /* 0x2b */ - "STAR", /* 0x2c */ - "PLUS", /* 0x2d */ - "CURLY", /* 0x2e */ - "CURLYN", /* 0x2f */ - "CURLYM", /* 0x30 */ - "CURLYX", /* 0x31 */ - "WHILEM", /* 0x32 */ - "OPEN", /* 0x33 */ - "CLOSE", /* 0x34 */ - "REF", /* 0x35 */ - "REFF", /* 0x36 */ - "REFFL", /* 0x37 */ - "REFFU", /* 0x38 */ - "REFFA", /* 0x39 */ - "NREF", /* 0x3a */ - "NREFF", /* 0x3b */ - "NREFFL", /* 0x3c */ - "NREFFU", /* 0x3d */ - "NREFFA", /* 0x3e */ - "IFMATCH", /* 0x3f */ - "UNLESSM", /* 0x40 */ - "SUSPEND", /* 0x41 */ - "IFTHEN", /* 0x42 */ - "GROUPP", /* 0x43 */ - "LONGJMP", /* 0x44 */ - "BRANCHJ", /* 0x45 */ - "EVAL", /* 0x46 */ - "MINMOD", /* 0x47 */ - "LOGICAL", /* 0x48 */ - "RENUM", /* 0x49 */ - "TRIE", /* 0x4a */ - "TRIEC", /* 0x4b */ - "AHOCORASICK", /* 0x4c */ - "AHOCORASICKC", /* 0x4d */ - "GOSUB", /* 0x4e */ - "GOSTART", /* 0x4f */ - "NGROUPP", /* 0x50 */ - "INSUBP", /* 0x51 */ - "DEFINEP", /* 0x52 */ - "ENDLIKE", /* 0x53 */ - "OPFAIL", /* 0x54 */ - "ACCEPT", /* 0x55 */ - "VERB", /* 0x56 */ - "PRUNE", /* 0x57 */ - "MARKPOINT", /* 0x58 */ - "SKIP", /* 0x59 */ - "COMMIT", /* 0x5a */ - "CUTGROUP", /* 0x5b */ - "KEEPS", /* 0x5c */ - "LNBREAK", /* 0x5d */ - "OPTIMIZED", /* 0x5e */ - "PSEUDO", /* 0x5f */ + "POSIXD", /* 0x16 */ + "POSIXL", /* 0x17 */ + "POSIXU", /* 0x18 */ + "POSIXA", /* 0x19 */ + "NPOSIXD", /* 0x1a */ + "NPOSIXL", /* 0x1b */ + "NPOSIXU", /* 0x1c */ + "NPOSIXA", /* 0x1d */ + "CLUMP", /* 0x1e */ + "BRANCH", /* 0x1f */ + "BACK", /* 0x20 */ + "EXACT", /* 0x21 */ + "EXACTF", /* 0x22 */ + "EXACTFL", /* 0x23 */ + "EXACTFU", /* 0x24 */ + "EXACTFA", /* 0x25 */ + "EXACTFU_SS", /* 0x26 */ + "EXACTFA_NO_TRIE", /* 0x27 */ + "NOTHING", /* 0x28 */ + "TAIL", /* 0x29 */ + "STAR", /* 0x2a */ + "PLUS", /* 0x2b */ + "CURLY", /* 0x2c */ + "CURLYN", /* 0x2d */ + "CURLYM", /* 0x2e */ + "CURLYX", /* 0x2f */ + "WHILEM", /* 0x30 */ + "OPEN", /* 0x31 */ + "CLOSE", /* 0x32 */ + "REF", /* 0x33 */ + "REFF", /* 0x34 */ + "REFFL", /* 0x35 */ + "REFFU", /* 0x36 */ + "REFFA", /* 0x37 */ + "NREF", /* 0x38 */ + "NREFF", /* 0x39 */ + "NREFFL", /* 0x3a */ + "NREFFU", /* 0x3b */ + "NREFFA", /* 0x3c */ + "IFMATCH", /* 0x3d */ + "UNLESSM", /* 0x3e */ + "SUSPEND", /* 0x3f */ + "IFTHEN", /* 0x40 */ + "GROUPP", /* 0x41 */ + "LONGJMP", /* 0x42 */ + "BRANCHJ", /* 0x43 */ + "EVAL", /* 0x44 */ + "MINMOD", /* 0x45 */ + "LOGICAL", /* 0x46 */ + "RENUM", /* 0x47 */ + "TRIE", /* 0x48 */ + "TRIEC", /* 0x49 */ + "AHOCORASICK", /* 0x4a */ + "AHOCORASICKC", /* 0x4b */ + "GOSUB", /* 0x4c */ + "GOSTART", /* 0x4d */ + "NGROUPP", /* 0x4e */ + "INSUBP", /* 0x4f */ + "DEFINEP", /* 0x50 */ + "ENDLIKE", /* 0x51 */ + "OPFAIL", /* 0x52 */ + "ACCEPT", /* 0x53 */ + "VERB", /* 0x54 */ + "PRUNE", /* 0x55 */ + "MARKPOINT", /* 0x56 */ + "SKIP", /* 0x57 */ + "COMMIT", /* 0x58 */ + "CUTGROUP", /* 0x59 */ + "KEEPS", /* 0x5a */ + "LNBREAK", /* 0x5b */ + "OPTIMIZED", /* 0x5c */ + "PSEUDO", /* 0x5d */ /* ------------ States ------------- */ "TRIE_next", /* REGNODE_MAX +0x01 */ "TRIE_next_fail", /* REGNODE_MAX +0x02 */ @@ -660,16 +650,16 @@ EXTCONST char * const PL_reg_extflags_name[] = { "CHARSET1", /* 0x00000040 : "CHARSET" - 0x000000e0 */ "CHARSET2", /* 0x00000080 : "CHARSET" - 0x000000e0 */ "SPLIT", /* 0x00000100 */ - "ANCH_BOL", /* 0x00000200 */ - "ANCH_MBOL", /* 0x00000400 */ - "ANCH_SBOL", /* 0x00000800 */ - "ANCH_GPOS", /* 0x00001000 */ - "GPOS_SEEN", /* 0x00002000 */ - "GPOS_FLOAT", /* 0x00004000 */ + "IS_ANCHORED", /* 0x00000200 */ + "UNUSED1", /* 0x00000400 */ + "UNUSED2", /* 0x00000800 */ + "UNUSED3", /* 0x00001000 */ + "UNUSED4", /* 0x00002000 */ + "UNUSED5", /* 0x00004000 */ "NO_INPLACE_SUBST", /* 0x00008000 */ "EVAL_SEEN", /* 0x00010000 */ - "CANY_SEEN", /* 0x00020000 */ - "NOSCAN", /* 0x00040000 */ + "UNUSED8", /* 0x00020000 */ + "UNBOUNDED_QUANTIFIER_SEEN",/* 0x00040000 */ "CHECK_ALL", /* 0x00080000 */ "MATCH_UTF8", /* 0x00100000 */ "USE_INTUIT_NOML", /* 0x00200000 */ @@ -686,6 +676,37 @@ EXTCONST char * const PL_reg_extflags_name[] = { }; #endif /* DOINIT */ +#ifdef DEBUGGING +# define REG_EXTFLAGS_NAME_SIZE 32 +#endif + +/* PL_reg_intflags_name[] - Opcode/state names in string form, for debugging */ + +#ifndef DOINIT +EXTCONST char * PL_reg_intflags_name[]; +#else +EXTCONST char * const PL_reg_intflags_name[] = { + "SKIP", /* 0x00000001 - PREGf_SKIP */ + "IMPLICIT", /* 0x00000002 - PREGf_IMPLICIT - Converted .* to ^.* */ + "NAUGHTY", /* 0x00000004 - PREGf_NAUGHTY - how exponential is this pattern? */ + "VERBARG_SEEN", /* 0x00000008 - PREGf_VERBARG_SEEN */ + "CUTGROUP_SEEN", /* 0x00000010 - PREGf_CUTGROUP_SEEN */ + "USE_RE_EVAL", /* 0x00000020 - PREGf_USE_RE_EVAL - compiled with "use re 'eval'" */ + "NOSCAN", /* 0x00000040 - PREGf_NOSCAN */ + "CANY_SEEN", /* 0x00000080 - PREGf_CANY_SEEN */ + "GPOS_SEEN", /* 0x00000100 - PREGf_GPOS_SEEN */ + "GPOS_FLOAT", /* 0x00000200 - PREGf_GPOS_FLOAT */ + "ANCH_BOL", /* 0x00000400 - PREGf_ANCH_BOL */ + "ANCH_MBOL", /* 0x00000800 - PREGf_ANCH_MBOL */ + "ANCH_SBOL", /* 0x00001000 - PREGf_ANCH_SBOL */ + "ANCH_GPOS", /* 0x00002000 - PREGf_ANCH_GPOS */ +}; +#endif /* DOINIT */ + +#ifdef DEBUGGING +# define REG_INTFLAGS_NAME_SIZE 14 +#endif + /* The following have no fixed length. U8 so we can do strchr() on it. */ #define REGNODE_VARIES(node) (PL_varies_bitmask[(node) >> 3] & (1 << ((node) & 7))) @@ -704,7 +725,7 @@ EXTCONST U8 PL_varies[] __attribute__deprecated__ = { EXTCONST U8 PL_varies_bitmask[]; #else EXTCONST U8 PL_varies_bitmask[] = { - 0x00, 0x00, 0x00, 0x00, 0x07, 0xF0, 0xE7, 0x7F, 0x26, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0xC0, 0x01, 0xFC, 0xF9, 0x9F, 0x09, 0x00, 0x00, 0x00 }; #endif /* DOINIT */ @@ -716,8 +737,8 @@ EXTCONST U8 PL_varies_bitmask[] = { EXTCONST U8 PL_simple[] __attribute__deprecated__; #else EXTCONST U8 PL_simple[] __attribute__deprecated__ = { - REG_ANY, SANY, CANY, ANYOF, ANYOF_WARN_SUPER, ANYOF_SYNTHETIC, POSIXD, - POSIXL, POSIXU, POSIXA, NPOSIXD, NPOSIXL, NPOSIXU, NPOSIXA, + REG_ANY, SANY, CANY, ANYOF, POSIXD, POSIXL, POSIXU, POSIXA, NPOSIXD, + NPOSIXL, NPOSIXU, NPOSIXA, 0 }; #endif /* DOINIT */ @@ -726,7 +747,7 @@ EXTCONST U8 PL_simple[] __attribute__deprecated__ = { EXTCONST U8 PL_simple_bitmask[]; #else EXTCONST U8 PL_simple_bitmask[] = { - 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #endif /* DOINIT */ diff --git a/Master/tlpkg/tlperl/lib/CORE/scope.h b/Master/tlpkg/tlperl/lib/CORE/scope.h index 22c728d1be2..0dce9d64530 100644 --- a/Master/tlpkg/tlperl/lib/CORE/scope.h +++ b/Master/tlpkg/tlperl/lib/CORE/scope.h @@ -16,7 +16,7 @@ #define SAVEt_CLEARPADRANGE 1 #define SAVEt_CLEARSV 2 #define SAVEt_REGCONTEXT 3 -#define SAVEt_RE_STATE 4 +/*** SPARE 4 ***/ #define SAVEt_ARG0_MAX 4 @@ -38,12 +38,12 @@ #define SAVEt_OP 18 #define SAVEt_PARSER 19 #define SAVEt_STACK_POS 20 +#define SAVEt_READONLY_OFF 21 -#define SAVEt_ARG1_MAX 20 +#define SAVEt_ARG1_MAX 21 /* two args */ -#define SAVEt_ADELETE 21 #define SAVEt_APTR 22 #define SAVEt_AV 23 #define SAVEt_DESTRUCTOR 24 @@ -64,21 +64,22 @@ #define SAVEt_SAVESWITCHSTACK 39 #define SAVEt_SHARED_PVREF 40 #define SAVEt_SPTR 41 -#define SAVEt_STACK_CXPOS 42 +#define SAVEt_STRLEN 42 #define SAVEt_SV 43 #define SAVEt_SVREF 44 #define SAVEt_VPTR 45 +#define SAVEt_ADELETE 46 -#define SAVEt_ARG2_MAX 45 +#define SAVEt_ARG2_MAX 46 /* three args */ -#define SAVEt_AELEM 46 #define SAVEt_DELETE 47 #define SAVEt_HELEM 48 #define SAVEt_PADSV_AND_MORTALIZE 49 #define SAVEt_SET_SVFLAGS 50 #define SAVEt_GVSLOT 51 +#define SAVEt_AELEM 52 #define SAVEf_SETMAGIC 1 #define SAVEf_KEEPOLDELEM 2 @@ -97,8 +98,8 @@ * macros */ #define SS_MAXPUSH 4 -#define SSCHECK(need) if (PL_savestack_ix + (I32)(need) + SS_MAXPUSH > PL_savestack_max) savestack_grow() -#define SSGROW(need) if (PL_savestack_ix + (I32)(need) + SS_MAXPUSH > PL_savestack_max) savestack_grow_cnt(need + SS_MAXPUSH) +#define SSCHECK(need) if (UNLIKELY(PL_savestack_ix + (I32)(need) + SS_MAXPUSH > PL_savestack_max)) savestack_grow() +#define SSGROW(need) if (UNLIKELY(PL_savestack_ix + (I32)(need) + SS_MAXPUSH > PL_savestack_max)) savestack_grow_cnt(need + SS_MAXPUSH) #define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i)) #define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i)) #define SSPUSHBOOL(p) (PL_savestack[PL_savestack_ix++].any_bool = (p)) @@ -122,14 +123,14 @@ #define dSS_ADD \ I32 ix = PL_savestack_ix; \ - ANY *ssp = &PL_savestack[ix]; + ANY *ssp = &PL_savestack[ix] #define SS_ADD_END(need) \ assert((need) <= SS_MAXPUSH); \ ix += (need); \ PL_savestack_ix = ix; \ assert(ix <= PL_savestack_max); \ - if ((ix + SS_MAXPUSH) > PL_savestack_max) savestack_grow(); \ + if (UNLIKELY((ix + SS_MAXPUSH) > PL_savestack_max)) savestack_grow(); \ assert(PL_savestack_ix + SS_MAXPUSH <= PL_savestack_max); #define SS_ADD_INT(i) ((ssp++)->any_i32 = (I32)(i)) @@ -185,7 +186,8 @@ scope has the given name. Name must be a literal string. =cut */ -#define SAVETMPS save_int((int*)&PL_tmps_floor), PL_tmps_floor = PL_tmps_ix +#define SAVETMPS Perl_save_strlen(aTHX_ (STRLEN *)&PL_tmps_floor), \ + PL_tmps_floor = PL_tmps_ix #define FREETMPS if (PL_tmps_ix > PL_tmps_floor) free_tmps() #ifdef DEBUGGING @@ -252,7 +254,7 @@ scope has the given name. Name must be a literal string. #define SAVEHDELETE(h,s) \ save_hdelete(MUTABLE_HV(h), (s)) #define SAVEADELETE(a,k) \ - save_adelete(MUTABLE_AV(a), (I32)(k)) + save_adelete(MUTABLE_AV(a), (SSize_t)(k)) #define SAVEDESTRUCTOR(f,p) \ save_destructor((DESTRUCTORFUNC_NOCONTEXT_t)(f), (void*)(p)) @@ -287,15 +289,6 @@ scope has the given name. Name must be a literal string. save stack. */ #define SAVECOMPILEWARNINGS() save_pushptr(PL_compiling.cop_warnings, SAVEt_COMPILE_WARNINGS) -#define SAVESTACK_CXPOS() \ - STMT_START { \ - dSS_ADD; \ - SS_ADD_INT(cxstack[cxstack_ix].blk_oldsp); \ - SS_ADD_INT(cxstack_ix); \ - SS_ADD_UV(SAVEt_STACK_CXPOS); \ - SS_ADD_END(3); \ - } STMT_END - #define SAVEPARSER(p) save_pushptr((p), SAVEt_PARSER) #ifdef USE_ITHREADS diff --git a/Master/tlpkg/tlperl/lib/CORE/sv.h b/Master/tlpkg/tlperl/lib/CORE/sv.h index 984121fa83d..b129225bd3c 100644 --- a/Master/tlpkg/tlperl/lib/CORE/sv.h +++ b/Master/tlpkg/tlperl/lib/CORE/sv.h @@ -22,7 +22,6 @@ in the C<svtype> enum. Test these flags with the C<SvTYPE> macro. The types are: SVt_NULL - SVt_BIND (unused) SVt_IV SVt_NV SVt_RV @@ -30,6 +29,7 @@ The types are: SVt_PVIV SVt_PVNV SVt_PVMG + SVt_INVLIST SVt_REGEXP SVt_PVGV SVt_PVLV @@ -57,7 +57,9 @@ typeglob has been assigned. Assigning to it again will stop it from being a typeglob. SVt_PVLV represents a scalar that delegates to another scalar behind the scenes. It is used, e.g., for the return value of C<substr> and for tied hash and array elements. It can hold any scalar value, including -a typeglob. SVt_REGEXP is for regular expressions. +a typeglob. SVt_REGEXP is for regular +expressions. SVt_INVLIST is for Perl +core internal use only. SVt_PVMG represents a "normal" scalar (not a typeglob, regular expression, or delegate). Since most scalars do not need all the internal fields of a @@ -91,6 +93,9 @@ Type flag for scalars. See L</svtype>. =for apidoc AmU||SVt_PVMG Type flag for scalars. See L</svtype>. +=for apidoc AmU||SVt_INVLIST +Type flag for scalars. See L</svtype>. + =for apidoc AmU||SVt_REGEXP Type flag for regular expressions. See L</svtype>. @@ -116,15 +121,22 @@ Type flag for formats. See L</svtype>. Type flag for I/O objects. See L</svtype>. =cut + + These are ordered so that the simpler types have a lower value; SvUPGRADE + doesn't allow you to upgrade from a higher numbered type to a lower numbered + one; also there is code that assumes that anything that has as a PV component + has a type numbered >= SVt_PV. */ + typedef enum { SVt_NULL, /* 0 */ - SVt_BIND, /* 1 */ - SVt_IV, /* 2 */ - SVt_NV, /* 3 */ + /* BIND was here, before INVLIST replaced it. */ + SVt_IV, /* 1 */ + SVt_NV, /* 2 */ /* RV was here, before it was merged with IV. */ - SVt_PV, /* 4 */ + SVt_PV, /* 3 */ + SVt_INVLIST, /* 4, implemented as a PV */ SVt_PVIV, /* 5 */ SVt_PVNV, /* 6 */ SVt_PVMG, /* 7 */ @@ -141,13 +153,15 @@ typedef enum { } svtype; /* *** any alterations to the SV types above need to be reflected in - * SVt_MASK and the various PL_valid_types_* tables */ + * SVt_MASK and the various PL_valid_types_* tables. As of this writing those + * tables are in perl.h. There are also two affected names tables in dump.c, + * one in B.xs, and 'bodies_by_type[]' in sv.c */ #define SVt_MASK 0xf /* smallest bitmask that covers all types */ #ifndef PERL_CORE /* Although Fast Boyer Moore tables are now being stored in PVGVs, for most - purposes eternal code wanting to consider PVBM probably needs to think of + purposes external code wanting to consider PVBM probably needs to think of PVMG instead. */ # define SVt_PVBM SVt_PVMG /* Anything wanting to create a reference from clean should ensure that it has @@ -284,7 +298,7 @@ to return a meaningful value, or check for NULLness, so it's smaller and faster. =for apidoc Am|void|SvREFCNT_dec|SV* sv -Decrements the reference count of the given SV. I<sv> may be NULL. +Decrements the reference count of the given SV. I<sv> may be NULL. =for apidoc Am|void|SvREFCNT_dec_NN|SV* sv Same as SvREFCNT_dec, but can only be used if you know I<sv> @@ -347,6 +361,7 @@ perform the upgrade if necessary. See C<svtype>. subroutine in another package. Set the GvIMPORTED_CV_on() if it needs to be expanded to a real GV */ +#define SVpad_NAMELIST SVp_SCREAM /* AV is a padnamelist */ #define SVf_IsCOW 0x00010000 /* copy on write (shared hash key if SvLEN == 0) */ #define SVs_PADTMP 0x00020000 /* in use as tmp; only if ! SVs_PADMY */ @@ -390,21 +405,24 @@ perform the upgrade if necessary. See C<svtype>. #define SVf_AMAGIC 0x10000000 /* has magical overloaded methods */ +/* note that SVf_AMAGIC is now only set on stashes, so this bit is free + * for non-HV SVs */ + /* Ensure this value does not clash with the GV_ADD* flags in gv.h: */ #define SVf_UTF8 0x20000000 /* SvPV is UTF-8 encoded This is also set on RVs whose overloaded stringification is UTF-8. This might only happen as a side effect of SvPV() */ - - -/* Some private flags. */ +/* PVHV */ +#define SVphv_SHAREKEYS 0x20000000 /* PVHV keys live on shared string table */ /* PVAV could probably use 0x2000000 without conflict. I assume that PVFM can be UTF-8 encoded, and PVCVs could well have UTF-8 prototypes. PVIOs haven't been restructured, so sometimes get used as string buffers. */ -/* PVHV */ -#define SVphv_SHAREKEYS 0x20000000 /* PVHV keys live on shared string table */ + +/* Some private flags. */ + /* PVNV, PVMG only, and only used in pads. Should be safe to test on any scalar SV, as the core is careful to avoid setting both. @@ -463,10 +481,6 @@ union _xnvu { U32 xlow; U32 xhigh; } xpad_cop_seq; /* used by pad.c for cop_sequence */ - struct { - I32 xbm_useful; - U8 xbm_rare; /* rarest character in string */ - } xbm_s; /* fields from PVBM */ }; union _xivu { @@ -479,7 +493,7 @@ union _xmgu { MAGIC* xmg_magic; /* linked list of magicalness */ HV* xmg_ourstash; /* Stash for our (when SvPAD_OUR is true) */ STRLEN xmg_hash_index; /* used while freeing hash entries */ -}; +}; /* also used by PadnamelistMAXNAMED */ struct xpv { _XPV_HEAD; @@ -516,7 +530,10 @@ struct xpvlv { _XPV_HEAD; union _xivu xiv_u; union _xnvu xnv_u; - STRLEN xlv_targoff; + union { + STRLEN xlvu_targoff; + SSize_t xlvu_stargoff; + } xlv_targoff_u; STRLEN xlv_targlen; SV* xlv_targ; char xlv_type; /* k=keys .=pos x=substr v=vec /=join/re @@ -524,6 +541,15 @@ struct xpvlv { char xlv_flags; /* 1 = negative offset 2 = negative len */ }; +#define xlv_targoff xlv_targoff_u.xlvu_targoff + +struct xpvinvlist { + _XPV_HEAD; + IV prev_index; + STRLEN iterator; + bool is_offset; /* */ +}; + /* This structure works in 3 ways - regular scalar, GV with GP, or fast Boyer-Moore. */ struct xpvgv { @@ -532,7 +558,7 @@ struct xpvgv { union _xnvu xnv_u; }; -typedef U16 cv_flags_t; +typedef U32 cv_flags_t; #define _XPVCV_COMMON \ HV * xcv_stash; \ @@ -624,7 +650,7 @@ double. Checks the B<private> setting. Use C<SvNIOK> instead. Unsets the NV/IV status of an SV. =for apidoc Am|U32|SvOK|SV* sv -Returns a U32 value indicating whether the value is defined. This is +Returns a U32 value indicating whether the value is defined. This is only meaningful for scalars. =for apidoc Am|U32|SvIOKp|SV* sv @@ -730,7 +756,8 @@ Only use when you are sure SvNOK is true. See also C<SvNV()>. =for apidoc Am|char*|SvPVX|SV* sv Returns a pointer to the physical string in the SV. The SV must contain a -string. Prior to 5.9.3 it is not safe to execute this macro unless the SV's +string. Prior to 5.9.3 it is not safe +to execute this macro unless the SV's type >= SVt_PV. This is also used to store the name of an autoloaded subroutine in an XS @@ -746,7 +773,7 @@ attributable to C<SvOOK>. See C<SvCUR>. =for apidoc Am|char*|SvEND|SV* sv Returns a pointer to the spot just after the last character in the string which is in the SV, where there is usually a trailing -null (even though Perl scalars do not strictly require it). +C<NUL> character (even though Perl scalars do not strictly require it). See C<SvCUR>. Access the character as *(SvEND(sv)). Warning: If C<SvCUR> is equal to C<SvLEN>, then C<SvEND> points to @@ -765,7 +792,8 @@ C<SvIV_set> instead of the lvalue assignment to C<SvIVX>. Set the value of the NV pointer in sv to val. See C<SvIV_set>. =for apidoc Am|void|SvPV_set|SV* sv|char* val -Set the value of the PV pointer in sv to val. See also C<SvIV_set>. +Set the value of the PV pointer in C<sv> to the C<NUL>-terminated string +C<val>. See also C<SvIV_set>. Beware that the existing pointer may be involved in copy-on-write or other mischief, so do C<SvOOK_off(sv)> and use C<sv_force_normal> or @@ -932,6 +960,7 @@ in gv.h: */ #define HvAMAGIC_off(hv) (SvFLAGS(hv) &=~ SVf_AMAGIC) +/* "nog" means "doesn't have get magic" */ #define SvPOK_nog(sv) ((SvFLAGS(sv) & (SVf_POK|SVs_GMG)) == SVf_POK) #define SvIOK_nog(sv) ((SvFLAGS(sv) & (SVf_IOK|SVs_GMG)) == SVf_IOK) #define SvUOK_nog(sv) ((SvFLAGS(sv) & (SVf_IOK|SVf_IVisUV|SVs_GMG)) == (SVf_IOK|SVf_IVisUV)) @@ -1056,27 +1085,30 @@ sv_force_normal does nothing. #if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) # define SvVALID(sv) ({ const SV *const _svvalid = (const SV*)(sv); \ - if (SvFLAGS(_svvalid) & SVpbm_VALID) \ + if (SvFLAGS(_svvalid) & SVpbm_VALID && !SvSCREAM(_svvalid)) \ assert(!isGV_with_GP(_svvalid)); \ (SvFLAGS(_svvalid) & SVpbm_VALID); \ }) # define SvVALID_on(sv) ({ SV *const _svvalid = MUTABLE_SV(sv); \ assert(!isGV_with_GP(_svvalid)); \ + assert(!SvSCREAM(_svvalid)); \ (SvFLAGS(_svvalid) |= SVpbm_VALID); \ }) # define SvVALID_off(sv) ({ SV *const _svvalid = MUTABLE_SV(sv); \ assert(!isGV_with_GP(_svvalid)); \ + assert(!SvSCREAM(_svvalid)); \ (SvFLAGS(_svvalid) &= ~SVpbm_VALID); \ }) # define SvTAIL(sv) ({ const SV *const _svtail = (const SV *)(sv); \ - assert(SvTYPE(_svtail) != SVt_PVAV); \ - assert(SvTYPE(_svtail) != SVt_PVHV); \ + assert(SvTYPE(_svtail) != SVt_PVAV); \ + assert(SvTYPE(_svtail) != SVt_PVHV); \ + assert(!SvSCREAM(_svtail)); \ (SvFLAGS(sv) & (SVpbm_TAIL|SVpbm_VALID)) \ == (SVpbm_TAIL|SVpbm_VALID); \ }) #else -# define SvVALID(sv) (SvFLAGS(sv) & SVpbm_VALID) +# define SvVALID(sv) ((SvFLAGS(sv) & SVpbm_VALID) && !SvSCREAM(sv)) # define SvVALID_on(sv) (SvFLAGS(sv) |= SVpbm_VALID) # define SvVALID_off(sv) (SvFLAGS(sv) &= ~SVpbm_VALID) # define SvTAIL(sv) ((SvFLAGS(sv) & (SVpbm_TAIL|SVpbm_VALID)) \ @@ -1331,7 +1363,7 @@ sv_force_normal does nothing. assert(SvTYPE(sv) >= SVt_PV); \ if (SvLEN(sv)) { \ assert(!SvROK(sv)); \ - if(SvOOK(sv)) { \ + if(UNLIKELY(SvOOK(sv))) { \ STRLEN zok; \ SvOOK_offset(sv, zok); \ SvPV_set(sv, SvPVX_mutable(sv) - zok); \ @@ -1361,37 +1393,29 @@ sv_force_normal does nothing. #endif #if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) -# define BmRARE(sv) \ - (*({ SV *const _bmrare = MUTABLE_SV(sv); \ - assert(SvTYPE(_bmrare) == SVt_PVMG); \ - assert(SvVALID(_bmrare)); \ - &(((XPVMG*) SvANY(_bmrare))->xnv_u.xbm_s.xbm_rare); \ - })) # define BmUSEFUL(sv) \ (*({ SV *const _bmuseful = MUTABLE_SV(sv); \ - assert(SvTYPE(_bmuseful) == SVt_PVMG); \ + assert(SvTYPE(_bmuseful) >= SVt_PVIV); \ assert(SvVALID(_bmuseful)); \ assert(!SvIOK(_bmuseful)); \ - &(((XPVMG*) SvANY(_bmuseful))->xnv_u.xbm_s.xbm_useful); \ - })) -# define BmPREVIOUS(sv) \ - (*({ SV *const _bmprevious = MUTABLE_SV(sv); \ - assert(SvTYPE(_bmprevious) == SVt_PVMG); \ - assert(SvVALID(_bmprevious)); \ - &(((XPVMG*) SvANY(_bmprevious))->xiv_u.xivu_uv); \ + &(((XPVIV*) SvANY(_bmuseful))->xiv_u.xivu_iv); \ })) #else -# define BmRARE(sv) ((XPVMG*) SvANY(sv))->xnv_u.xbm_s.xbm_rare -# define BmUSEFUL(sv) ((XPVMG*) SvANY(sv))->xnv_u.xbm_s.xbm_useful -# define BmPREVIOUS(sv) ((XPVMG*) SvANY(sv))->xiv_u.xivu_uv +# define BmUSEFUL(sv) ((XPVIV*) SvANY(sv))->xiv_u.xivu_iv #endif +#ifndef PERL_CORE +# define BmRARE(sv) 0 +# define BmPREVIOUS(sv) 0 +#endif + #define FmLINES(sv) ((XPVIV*) SvANY(sv))->xiv_iv #define LvTYPE(sv) ((XPVLV*) SvANY(sv))->xlv_type #define LvTARG(sv) ((XPVLV*) SvANY(sv))->xlv_targ #define LvTARGOFF(sv) ((XPVLV*) SvANY(sv))->xlv_targoff +#define LvSTARGOFF(sv) ((XPVLV*) SvANY(sv))->xlv_targoff_u.xlvu_stargoff #define LvTARGLEN(sv) ((XPVLV*) SvANY(sv))->xlv_targlen #define LvFLAGS(sv) ((XPVLV*) SvANY(sv))->xlv_flags @@ -1436,7 +1460,7 @@ Marks an SV as tainted if tainting is enabled. Untaints an SV. Be I<very> careful with this routine, as it short-circuits some of Perl's fundamental security features. XS module authors should not use this function unless they fully understand all the implications of -unconditionally untainting the value. Untainting should be done in the +unconditionally untainting the value. Untainting should be done in the standard perl fashion, via a carefully crafted regexp, rather than directly untainting variables. @@ -1452,18 +1476,18 @@ attention to precisely which outputs are influenced by which inputs. #define sv_taint(sv) sv_magic((sv), NULL, PERL_MAGIC_taint, NULL, 0) -#if NO_TAINT_SUPPORT +#ifdef NO_TAINT_SUPPORT # define SvTAINTED(sv) 0 #else # define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(sv)) #endif -#define SvTAINTED_on(sv) STMT_START{ if(TAINTING_get){sv_taint(sv);} }STMT_END -#define SvTAINTED_off(sv) STMT_START{ if(TAINTING_get){sv_untaint(sv);} }STMT_END +#define SvTAINTED_on(sv) STMT_START{ if(UNLIKELY(TAINTING_get)){sv_taint(sv);} }STMT_END +#define SvTAINTED_off(sv) STMT_START{ if(UNLIKELY(TAINTING_get)){sv_untaint(sv);} }STMT_END #define SvTAINT(sv) \ STMT_START { \ - if (TAINTING_get) { \ - if (TAINT_get) \ + if (UNLIKELY(TAINTING_get)) { \ + if (UNLIKELY(TAINT_get)) \ SvTAINTED_on(sv); \ } \ } STMT_END @@ -1475,7 +1499,7 @@ only a string (C<SvPOK_only>), by hook or by crook. You need force if you are going to update the C<SvPVX> directly. Processes get magic. Note that coercing an arbitrary scalar into a plain PV will potentially -strip useful data from it. For example if the SV was C<SvROK>, then the +strip useful data from it. For example if the SV was C<SvROK>, then the referent will have its reference count decremented, and the SV itself may be converted to an C<SvPOK> scalar with a string buffer containing a value such as C<"ARRAY(0x1234)">. @@ -1486,13 +1510,15 @@ Like C<SvPV_force>, but doesn't process get magic. =for apidoc Am|char*|SvPV|SV* sv|STRLEN len Returns a pointer to the string in the SV, or a stringified form of the SV if the SV does not contain a string. The SV may cache the -stringified version becoming C<SvPOK>. Handles 'get' magic. See also -C<SvPVx> for a version which guarantees to evaluate sv only once. +stringified version becoming C<SvPOK>. Handles 'get' magic. The +C<len> variable will be set to the length of the string (this is a macro, so +don't use C<&len>). See also C<SvPVx> for a version which guarantees to +evaluate sv only once. Note that there is no guarantee that the return value of C<SvPV()> is equal to C<SvPVX(sv)>, or that C<SvPVX(sv)> contains valid data, or that -successive calls to C<SvPV(sv)) will return the same pointer value each -time. This is due to the way that things like overloading and +successive calls to C<SvPV(sv)> will return the same pointer value each +time. This is due to the way that things like overloading and Copy-On-Write are handled. In these cases, the return value may point to a temporary buffer or similar. If you absolutely need the SvPVX field to be valid (for example, if you intend to write to it), then see @@ -1599,8 +1625,8 @@ Like C<SvPV>, but converts sv to byte representation first if necessary. Guarantees to evaluate sv only once; use the more efficient C<SvPVbyte> otherwise. -=for apidoc Am|bool|SvIsCOW|SV* sv -Returns a boolean indicating whether the SV is Copy-On-Write (either shared +=for apidoc Am|U32|SvIsCOW|SV* sv +Returns a U32 value indicating whether the SV is Copy-On-Write (either shared hash key scalars, or full Copy On Write scalars if 5.9.0 is configured for COW). @@ -1682,6 +1708,7 @@ Like sv_utf8_upgrade, but doesn't do magic on C<sv>. (SvPOK_nog(sv) \ ? SvPVX(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC)) +/* "_nomg" in these defines means no mg_get() */ #define SvPV_nomg_nolen(sv) \ (SvPOK_nog(sv) \ ? SvPVX(sv) : sv_2pv_flags(sv, 0, 0)) @@ -1732,9 +1759,9 @@ Like sv_utf8_upgrade, but doesn't do magic on C<sv>. #define SvPVutf8x_force(sv, lp) sv_pvutf8n_force(sv, &lp) #define SvPVbytex_force(sv, lp) sv_pvbyten_force(sv, &lp) -#define SvTRUE(sv) ((sv) && (SvGMAGICAL(sv) ? sv_2bool(sv) : SvTRUE_common(sv, sv_2bool_nomg(sv)))) -#define SvTRUE_nomg(sv) ((sv) && ( SvTRUE_common(sv, sv_2bool_nomg(sv)))) -#define SvTRUE_NN(sv) (SvGMAGICAL(sv) ? sv_2bool(sv) : SvTRUE_common(sv, sv_2bool_nomg(sv))) +#define SvTRUE(sv) (LIKELY(sv) && (UNLIKELY(SvGMAGICAL(sv)) ? sv_2bool(sv) : SvTRUE_common(sv, sv_2bool_nomg(sv)))) +#define SvTRUE_nomg(sv) (LIKELY(sv) && ( SvTRUE_common(sv, sv_2bool_nomg(sv)))) +#define SvTRUE_NN(sv) (UNLIKELY(SvGMAGICAL(sv)) ? sv_2bool(sv) : SvTRUE_common(sv, sv_2bool_nomg(sv))) #define SvTRUE_nomg_NN(sv) ( SvTRUE_common(sv, sv_2bool_nomg(sv))) #define SvTRUE_common(sv,fallback) ( \ !SvOK(sv) \ @@ -1885,12 +1912,6 @@ mg.c:1024: warning: left-hand operand of comma expression has no effect /* Note: To allow 256 COW "copies", a refcnt of 0 means 1. */ # define CowREFCNT(sv) (*(U8 *)(SvPVX(sv)+SvLEN(sv)-1)) # define SV_COW_REFCNT_MAX ((1 << sizeof(U8)*8) - 1) -# ifndef SV_COW_THRESHOLD -# define SV_COW_THRESHOLD 0 /* min string length for cow */ -# endif -# ifndef SV_COWBUF_THRESHOLD -# define SV_COWBUF_THRESHOLD 1250 /* min string length for cow */ -# endif /* over existing buffer */ # define CAN_COW_MASK (SVf_POK|SVf_ROK|SVp_POK|SVf_FAKE| \ SVf_OOK|SVf_BREAK|SVf_READONLY) # endif @@ -1959,12 +1980,11 @@ mg.c:1024: warning: left-hand operand of comma expression has no effect #define sv_catpvn_nomg_maybeutf8(dsv, sstr, slen, is_utf8) \ sv_catpvn_flags(dsv, sstr, slen, (is_utf8)?SV_CATUTF8:SV_CATBYTES) -#ifdef PERL_CORE +#if defined(PERL_CORE) || defined(PERL_EXT) # define sv_or_pv_len_utf8(sv, pv, bytelen) \ (SvGAMAGIC(sv) \ ? utf8_length((U8 *)(pv), (U8 *)(pv)+(bytelen)) \ : sv_len_utf8(sv)) -# define sv_or_pv_pos_u2b(sv,s,p,lp) S_sv_or_pv_pos_u2b(aTHX_ sv,s,p,lp) #endif /* @@ -1994,15 +2014,15 @@ after modifying a scalar, in case it is a magical variable like C<$|> or a tied variable (it calls C<STORE>). This macro evaluates its argument more than once. -=for apidoc Am|void|SvSetSV|SV* dsb|SV* ssv +=for apidoc Am|void|SvSetSV|SV* dsv|SV* ssv Calls C<sv_setsv> if dsv is not the same as ssv. May evaluate arguments -more than once. +more than once. Does not handle 'set' magic on the destination SV. =for apidoc Am|void|SvSetSV_nosteal|SV* dsv|SV* ssv Calls a non-destructive version of C<sv_setsv> if dsv is not the same as ssv. May evaluate arguments more than once. -=for apidoc Am|void|SvSetMagicSV|SV* dsb|SV* ssv +=for apidoc Am|void|SvSetMagicSV|SV* dsv|SV* ssv Like C<SvSetSV>, but does any set magic required afterwards. =for apidoc Am|void|SvSetMagicSV_nosteal|SV* dsv|SV* ssv @@ -2025,8 +2045,9 @@ has been loaded. =for apidoc Am|char *|SvGROW|SV* sv|STRLEN len Expands the character buffer in the SV so that it has room for the indicated number of bytes (remember to reserve space for an extra trailing -NUL character). Calls C<sv_grow> to perform the expansion if necessary. -Returns a pointer to the character buffer. SV must be of type >= SVt_PV. One +C<NUL> character). Calls C<sv_grow> to perform the expansion if necessary. +Returns a pointer to the character +buffer. SV must be of type >= SVt_PV. One alternative is to call C<sv_grow> if you are not sure of the type of SV. =cut @@ -2037,19 +2058,19 @@ alternative is to call C<sv_grow> if you are not sure of the type of SV. #define SvUNLOCK(sv) PL_unlockhook(aTHX_ sv) #define SvDESTROYABLE(sv) PL_destroyhook(aTHX_ sv) -#define SvGETMAGIC(x) ((void)(SvGMAGICAL(x) && mg_get(x))) -#define SvSETMAGIC(x) STMT_START { if (SvSMAGICAL(x)) mg_set(x); } STMT_END +#define SvGETMAGIC(x) ((void)(UNLIKELY(SvGMAGICAL(x)) && mg_get(x))) +#define SvSETMAGIC(x) STMT_START { if (UNLIKELY(SvSMAGICAL(x))) mg_set(x); } STMT_END #define SvSetSV_and(dst,src,finally) \ STMT_START { \ - if ((dst) != (src)) { \ + if (LIKELY((dst) != (src))) { \ sv_setsv(dst, src); \ finally; \ } \ } STMT_END #define SvSetSV_nosteal_and(dst,src,finally) \ STMT_START { \ - if ((dst) != (src)) { \ + if (LIKELY((dst) != (src))) { \ sv_setsv_flags(dst, src, SV_GMAGIC | SV_NOSTEAL | SV_DO_COW_SVSETSV); \ finally; \ } \ @@ -2117,7 +2138,7 @@ See also C<PL_sv_yes> and C<PL_sv_no>. == (SVt_PVLV|SVf_FAKE)) -#ifdef PERL_NEW_COPY_ON_WRITE +#ifdef PERL_ANY_COW # define SvGROW(sv,len) \ (SvIsCOW(sv) || SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX(sv)) #else @@ -2143,7 +2164,8 @@ struct clone_params { /* =for apidoc Am|SV*|newSVpvn_utf8|NULLOK const char* s|STRLEN len|U32 utf8 -Creates a new SV and copies a string into it. If utf8 is true, calls +Creates a new SV and copies a string (which may contain C<NUL> (C<\0>) +characters) into it. If utf8 is true, calls C<SvUTF8_on> on the new SV. Implemented as a wrapper around C<newSVpvn_flags>. =cut @@ -2220,6 +2242,54 @@ Evaluates I<sv> more than once. Sets I<len> to 0 if C<SvOOK(sv)> is false. #define newIO() MUTABLE_IO(newSV_type(SVt_PVIO)) +#define SV_CONST(name) \ + PL_sv_consts[SV_CONST_##name] \ + ? PL_sv_consts[SV_CONST_##name] \ + : (PL_sv_consts[SV_CONST_##name] = newSVpv_share(#name, 0)) + +#define SV_CONST_TIESCALAR 0 +#define SV_CONST_TIEARRAY 1 +#define SV_CONST_TIEHASH 2 +#define SV_CONST_TIEHANDLE 3 + +#define SV_CONST_FETCH 4 +#define SV_CONST_FETCHSIZE 5 +#define SV_CONST_STORE 6 +#define SV_CONST_STORESIZE 7 +#define SV_CONST_EXISTS 8 + +#define SV_CONST_PUSH 9 +#define SV_CONST_POP 10 +#define SV_CONST_SHIFT 11 +#define SV_CONST_UNSHIFT 12 +#define SV_CONST_SPLICE 13 +#define SV_CONST_EXTEND 14 + +#define SV_CONST_FIRSTKEY 15 +#define SV_CONST_NEXTKEY 16 +#define SV_CONST_SCALAR 17 + +#define SV_CONST_OPEN 18 +#define SV_CONST_WRITE 19 +#define SV_CONST_PRINT 20 +#define SV_CONST_PRINTF 21 +#define SV_CONST_READ 22 +#define SV_CONST_READLINE 23 +#define SV_CONST_GETC 24 +#define SV_CONST_SEEK 25 +#define SV_CONST_TELL 26 +#define SV_CONST_EOF 27 +#define SV_CONST_BINMODE 28 +#define SV_CONST_FILENO 29 +#define SV_CONST_CLOSE 30 + +#define SV_CONST_DELETE 31 +#define SV_CONST_CLEAR 32 +#define SV_CONST_UNTIE 33 +#define SV_CONST_DESTROY 34 + +#define SV_CONSTS_COUNT 35 + /* * Local variables: * c-indentation-style: bsd diff --git a/Master/tlpkg/tlperl/lib/CORE/sys/errno2.h b/Master/tlpkg/tlperl/lib/CORE/sys/errno2.h new file mode 100644 index 00000000000..3ca85e33ae7 --- /dev/null +++ b/Master/tlpkg/tlperl/lib/CORE/sys/errno2.h @@ -0,0 +1,178 @@ +#ifndef _INC_SYS_ERRNO2 +#define _INC_SYS_ERRNO2 + +/* Too late to include winsock2.h if winsock.h has already been loaded */ +#ifndef _WINSOCKAPI_ +# if defined(UNDER_CE) && UNDER_CE <= 300 + /* winsock2 only for 4.00+ */ +# include <winsock.h> +# else +# include <winsock2.h> +# endif +#endif + +/* Ensure all the Exxx constants required by convert_wsa_error_to_errno() in + * win32/win32sck.c are defined. Many are defined in <errno.h> already (more so + * in VC++ 2010 and above and some MinGW/gcc-4.8 and above, which have an extra + * "POSIX supplement") so, for the sake of compatibility with third-party code + * linked into XS modules, we must be careful not to redefine them; for the + * remainder we define our own values, namely the corresponding WSAExxx values. + * + * These definitions are also used as a supplement to the use of <errno.h> in + * the Errno and POSIX modules, both of which may be used to test the value of + * $!, which may have these values assigned to it (via code in win32/win32sck.c + * and the $! case in Perl_magic_set()). It also provides numerous otherwise + * missing values in the (hard-coded) list of Exxx constants exported by POSIX. + * Finally, three of the non-standard errno.h values (actually all now in the + * POSIX supplement in VC10+ and some MinGW/gcc-4.8+) are used in the perl core. + * + * This list is in the same order as that in convert_wsa_error_to_errno(). A + * handful of WSAExxx constants used by that function have no corresponding Exxx + * constant in any errno.h so there is no point in making up values for them; + * they are just returned unchanged by that function so we do not need to worry + * about them here. + */ + +/* EINTR is a standard errno.h value */ +/* EBADF is a standard errno.h value */ +/* EACCES is a standard errno.h value */ +/* EFAULT is a standard errno.h value */ +/* EINVAL is a standard errno.h value */ +/* EMFILE is a standard errno.h value */ + +#ifndef EWOULDBLOCK /* New in VC10 */ +# define EWOULDBLOCK WSAEWOULDBLOCK +#endif +#ifndef EINPROGRESS /* New in VC10 */ +# define EINPROGRESS WSAEINPROGRESS +#endif +#ifndef EALREADY /* New in VC10 */ +# define EALREADY WSAEALREADY +#endif +#ifndef ENOTSOCK /* New in VC10 and needed in doio.c */ +# define ENOTSOCK WSAENOTSOCK +#endif +#ifndef EDESTADDRREQ /* New in VC10 */ +# define EDESTADDRREQ WSAEDESTADDRREQ +#endif +#ifndef EMSGSIZE /* New in VC10 */ +# define EMSGSIZE WSAEMSGSIZE +#endif +#ifndef EPROTOTYPE /* New in VC10 */ +# define EPROTOTYPE WSAEPROTOTYPE +#endif +#ifndef ENOPROTOOPT /* New in VC10 */ +# define ENOPROTOOPT WSAENOPROTOOPT +#endif +#ifndef EPROTONOSUPPORT /* New in VC10 */ +# define EPROTONOSUPPORT WSAEPROTONOSUPPORT +#endif +#ifndef ESOCKTNOSUPPORT /* Not in errno.h but wanted by POSIX.pm */ +# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT +#endif +#ifndef EOPNOTSUPP /* New in VC10 */ +# define EOPNOTSUPP WSAEOPNOTSUPP +#endif +#ifndef EPFNOSUPPORT /* Not in errno.h but wanted by POSIX.pm */ +# define EPFNOSUPPORT WSAEPFNOSUPPORT +#endif +#ifndef EAFNOSUPPORT /* New in VC10 and needed in util.c */ +# define EAFNOSUPPORT WSAEAFNOSUPPORT +#endif +#ifndef EADDRINUSE /* New in VC10 */ +# define EADDRINUSE WSAEADDRINUSE +#endif +#ifndef EADDRNOTAVAIL /* New in VC10 */ +# define EADDRNOTAVAIL WSAEADDRNOTAVAIL +#endif +#ifndef ENETDOWN /* New in VC10 */ +# define ENETDOWN WSAENETDOWN +#endif +#ifndef ENETUNREACH /* New in VC10 */ +# define ENETUNREACH WSAENETUNREACH +#endif +#ifndef ENETRESET /* New in VC10 */ +# define ENETRESET WSAENETRESET +#endif +#ifndef ECONNABORTED /* New in VC10 and needed in util.c */ +# define ECONNABORTED WSAECONNABORTED +#endif +#ifndef ECONNRESET /* New in VC10 */ +# define ECONNRESET WSAECONNRESET +#endif +#ifndef ENOBUFS /* New in VC10 */ +# define ENOBUFS WSAENOBUFS +#endif +#ifndef EISCONN /* New in VC10 */ +# define EISCONN WSAEISCONN +#endif +#ifndef ENOTCONN /* New in VC10 */ +# define ENOTCONN WSAENOTCONN +#endif +#ifndef ESHUTDOWN /* Not in errno.h but wanted by POSIX.pm */ +# define ESHUTDOWN WSAESHUTDOWN +#endif +#ifndef ETOOMANYREFS /* Not in errno.h but wanted by POSIX.pm */ +# define ETOOMANYREFS WSAETOOMANYREFS +#endif +#ifndef ETIMEDOUT /* New in VC10 */ +# define ETIMEDOUT WSAETIMEDOUT +#endif +#ifndef ECONNREFUSED /* New in VC10 */ +# define ECONNREFUSED WSAECONNREFUSED +#endif +#ifndef ELOOP /* New in VC10 */ +# define ELOOP WSAELOOP +#endif + +/* ENAMETOOLONG is a standard errno.h value */ + +/* EHOSTDOWN is not in errno.h and despite being wanted by POSIX.pm we cannot + * provide any sane value since there is no WSAEHOSTDOWN */ + +#ifndef EHOSTUNREACH /* New in VC10 */ +# define EHOSTUNREACH WSAEHOSTUNREACH +#endif + +/* ENOTEMPTY is a standard errno.h value */ + +#ifndef EPROCLIM /* Not in errno.h but wanted by POSIX.pm */ +# define EPROCLIM WSAEPROCLIM +#endif +#ifndef EUSERS /* Not in errno.h but wanted by POSIX.pm */ +# define EUSERS WSAEUSERS +#endif +#ifndef EDQUOT /* Not in errno.h but wanted by POSIX.pm */ +# define EDQUOT WSAEDQUOT +#endif +#ifndef ESTALE /* Not in errno.h but wanted by POSIX.pm */ +# define ESTALE WSAESTALE +#endif +#ifndef EREMOTE /* Not in errno.h but wanted by POSIX.pm */ +# define EREMOTE WSAEREMOTE +#endif + +/* EDISCON is not an errno.h value at all */ +/* ENOMORE is not an errno.h value at all */ + +#ifndef ECANCELED /* New in VC10 */ +# ifdef WSAECANCELLED /* New in WinSock2 */ +# define ECANCELED WSAECANCELLED +# endif +#endif + +/* EINVALIDPROCTABLE is not an errno.h value at all */ +/* EINVALIDPROVIDER is not an errno.h value at all */ +/* EPROVIDERFAILEDINIT is not an errno.h value at all */ +/* EREFUSED is not an errno.h value at all */ + +/* Set a flag indicating whether <errno.h> has the POSIX supplement (the first + * constant in which is EADDRINUSE). If so then we won't have just defined it as + * WSAEADDRINUSE above. + */ +#undef ERRNO_HAS_POSIX_SUPPLEMENT +#if EADDRINUSE != WSAEADDRINUSE +# define ERRNO_HAS_POSIX_SUPPLEMENT +#endif + +#endif /* _INC_SYS_ERRNO2 */ diff --git a/Master/tlpkg/tlperl/lib/CORE/sys/socket.h b/Master/tlpkg/tlperl/lib/CORE/sys/socket.h index 6009572725b..d658913f8b4 100644 --- a/Master/tlpkg/tlperl/lib/CORE/sys/socket.h +++ b/Master/tlpkg/tlperl/lib/CORE/sys/socket.h @@ -177,23 +177,11 @@ # define EAI_NODATA WSANO_DATA #endif -#include "win32.h" - #ifdef __cplusplus extern "C" { #endif -#undef ENOTSOCK -#define ENOTSOCK WSAENOTSOCK - -#undef ECONNABORTED -#define ECONNABORTED WSAECONNABORTED - -#undef ECONNRESET -#define ECONNRESET WSAECONNRESET - -#undef EAFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT +#include "errno2.h" #ifndef PERL_FD_SETSIZE #define PERL_FD_SETSIZE 64 diff --git a/Master/tlpkg/tlperl/lib/CORE/thread.h b/Master/tlpkg/tlperl/lib/CORE/thread.h index 03965c8b52f..43932fbb3b3 100644 --- a/Master/tlpkg/tlperl/lib/CORE/thread.h +++ b/Master/tlpkg/tlperl/lib/CORE/thread.h @@ -91,10 +91,6 @@ # endif #endif -#ifdef DGUX -# define THREAD_CREATE_NEEDS_STACK (32*1024) -#endif - #ifdef __VMS /* Default is 1024 on VAX, 8192 otherwise */ # ifdef __ia64 @@ -340,7 +336,7 @@ # define ALLOC_THREAD_KEY \ STMT_START { \ if (pthread_key_create(&PL_thr_key, 0)) { \ - write(2, STR_WITH_LEN("panic: pthread_key_create failed\n")); \ + PERL_UNUSED_RESULT(write(2, STR_WITH_LEN("panic: pthread_key_create failed\n"))); \ exit(1); \ } \ } STMT_END diff --git a/Master/tlpkg/tlperl/lib/CORE/time64.h b/Master/tlpkg/tlperl/lib/CORE/time64.h index 07bb33fd849..b7306d01fb4 100644 --- a/Master/tlpkg/tlperl/lib/CORE/time64.h +++ b/Master/tlpkg/tlperl/lib/CORE/time64.h @@ -28,11 +28,14 @@ struct TM64 { #endif #ifdef HAS_TM_TM_ZONE -# ifdef __GLIBC__ - const char *tm_zone; -# else - char *tm_zone; +/* If glibc is defined or we are on QNX, use const. + * Otherwise, if we are on android, use const but + * not with g++. + */ +# if defined(__GLIBC__) || (defined(__ANDROID__) && !defined(__cplusplus)) || defined(__QNX__) + const # endif + char *tm_zone; #endif }; diff --git a/Master/tlpkg/tlperl/lib/CORE/uconfig.h b/Master/tlpkg/tlperl/lib/CORE/uconfig.h index 82664c47a48..e5cca088d84 100644 --- a/Master/tlpkg/tlperl/lib/CORE/uconfig.h +++ b/Master/tlpkg/tlperl/lib/CORE/uconfig.h @@ -703,12 +703,6 @@ */ /*#define I_NETINET_IN / **/ -/* I_SFIO: - * This symbol, if defined, indicates to the C program that it should - * include <sfio.h>. - */ -/*#define I_SFIO / **/ - /* I_STDDEF: * This symbol, if defined, indicates that <stddef.h> exists and should * be included. @@ -811,26 +805,6 @@ */ /*#define I_SYS_WAIT / **/ -/* I_TERMIO: - * This symbol, if defined, indicates that the program should include - * <termio.h> rather than <sgtty.h>. There are also differences in - * the ioctl() calls that depend on the value of this symbol. - */ -/* I_TERMIOS: - * This symbol, if defined, indicates that the program should include - * the POSIX termios.h rather than sgtty.h or termio.h. - * There are also differences in the ioctl() calls that depend on the - * value of this symbol. - */ -/* I_SGTTY: - * This symbol, if defined, indicates that the program should include - * <sgtty.h> rather than <termio.h>. There are also differences in - * the ioctl() calls that depend on the value of this symbol. - */ -/*#define I_TERMIO / **/ -/*#define I_TERMIOS / **/ -/*#define I_SGTTY / **/ - /* I_UNISTD: * This symbol, if defined, indicates to the C program that it should * include <unistd.h>. @@ -892,18 +866,6 @@ #define OSNAME "unknown" /**/ #define OSVERS "unknown" /**/ -/* USE_CROSS_COMPILE: - * This symbol, if defined, indicates that Perl is being cross-compiled. - */ -/* PERL_TARGETARCH: - * This symbol, if defined, indicates the target architecture - * Perl has been cross-compiled to. Undefined if not a cross-compile. - */ -#ifndef USE_CROSS_COMPILE -/*#define USE_CROSS_COMPILE / **/ -#define PERL_TARGETARCH "" /**/ -#endif - /* MULTIARCH: * This symbol, if defined, signifies that the build * process will produce some binary files that are going to be @@ -934,8 +896,8 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -/*#define ARCHLIB "/usr/local/lib/perl5/5.18/unknown" / **/ -/*#define ARCHLIB_EXP "/usr/local/lib/perl5/5.18/unknown" / **/ +/*#define ARCHLIB "/usr/local/lib/perl5/5.20/unknown" / **/ +/*#define ARCHLIB_EXP "/usr/local/lib/perl5/5.20/unknown" / **/ /* ARCHNAME: * This symbol holds a string representing the architecture name. @@ -993,7 +955,7 @@ * so the default case (for NeXT) is big endian to catch them. * This might matter for NeXT 3.0. */ -#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH) +#if defined(MULTIARCH) # ifdef __LITTLE_ENDIAN__ # if LONGSIZE == 4 # define BYTEORDER 0x1234 @@ -3045,8 +3007,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "/usr/local/lib/perl5/5.18" /**/ -#define PRIVLIB_EXP "/usr/local/lib/perl5/5.18" /**/ +#define PRIVLIB "/usr/local/lib/perl5/5.20" /**/ +#define PRIVLIB_EXP "/usr/local/lib/perl5/5.20" /**/ /* CAN_PROTOTYPE: * If defined, this macro indicates that the C compiler can handle @@ -3112,9 +3074,9 @@ * function used to generate normalized random numbers. * Values include 15, 16, 31, and 48. */ -#define Drand01() ((rand() & 0x7FFF) / (double) ((unsigned long)1 << 15)) /**/ -#define Rand_seed_t int /**/ -#define seedDrand01(x) srand((Rand_seed_t)x) /**/ +#define Drand01() Perl_drand48() /**/ +#define Rand_seed_t U32 /**/ +#define seedDrand01(x) Perl_drand48_init((Rand_seed_t)x) /**/ #define RANDBITS 48 /**/ /* Select_fd_set_t: @@ -3189,8 +3151,8 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -/*#define SITEARCH "/usr/local/lib/perl5/5.18/unknown" / **/ -/*#define SITEARCH_EXP "/usr/local/lib/perl5/5.18/unknown" / **/ +/*#define SITEARCH "/usr/local/lib/perl5/5.20/unknown" / **/ +/*#define SITEARCH_EXP "/usr/local/lib/perl5/5.20/unknown" / **/ /* SITELIB: * This symbol contains the name of the private library for this package. @@ -3212,8 +3174,8 @@ * removed. The elements in inc_version_list (inc_version_list.U) can * be tacked onto this variable to generate a list of directories to search. */ -#define SITELIB "/usr/local/lib/perl5/5.18" /**/ -#define SITELIB_EXP "/usr/local/lib/perl5/5.18" /**/ +#define SITELIB "/usr/local/lib/perl5/5.20" /**/ +#define SITELIB_EXP "/usr/local/lib/perl5/5.20" /**/ #define SITELIB_STEM "/usr/local/lib/perl5" /**/ /* Size_t_size: @@ -3330,29 +3292,36 @@ /*#define PERL_VENDORLIB_EXP "" / **/ /*#define PERL_VENDORLIB_STEM "" / **/ -/* VOIDFLAGS: - * This symbol indicates how much support of the void type is given by this - * compiler. What various bits mean: - * - * 1 = supports declaration of void - * 2 = supports arrays of pointers to functions returning void - * 4 = supports comparisons between pointers to void functions and - * addresses of void functions - * 8 = supports declaration of generic void pointers - * - * The package designer should define VOIDUSED to indicate the requirements - * of the package. This can be done either by #defining VOIDUSED before - * including config.h, or by defining defvoidused in Myinit.U. If the - * latter approach is taken, only those flags will be tested. If the - * level of void support necessary is not present, defines void to int. - */ -#ifndef VOIDUSED -#define VOIDUSED 1 -#endif -#define VOIDFLAGS 1 -#if (VOIDFLAGS & VOIDUSED) != VOIDUSED -#define void int /* is void to be avoided? */ -#define M_VOID /* Xenix strikes again */ +/* I_TERMIO: + * This symbol, if defined, indicates that the program should include + * <termio.h> rather than <sgtty.h>. There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/* I_TERMIOS: + * This symbol, if defined, indicates that the program should include + * the POSIX termios.h rather than sgtty.h or termio.h. + * There are also differences in the ioctl() calls that depend on the + * value of this symbol. + */ +/* I_SGTTY: + * This symbol, if defined, indicates that the program should include + * <sgtty.h> rather than <termio.h>. There are also differences in + * the ioctl() calls that depend on the value of this symbol. + */ +/*#define I_TERMIO / **/ +/*#define I_TERMIOS / **/ +/*#define I_SGTTY / **/ + +/* USE_CROSS_COMPILE: + * This symbol, if defined, indicates that Perl is being cross-compiled. + */ +/* PERL_TARGETARCH: + * This symbol, if defined, indicates the target architecture + * Perl has been cross-compiled to. Undefined if not a cross-compile. + */ +#ifndef USE_CROSS_COMPILE +/*#define USE_CROSS_COMPILE / **/ +#define PERL_TARGETARCH "" /**/ #endif /* PERL_USE_DEVEL: @@ -3917,12 +3886,6 @@ */ /*#define HAS_SETPROCTITLE / **/ -/* USE_SFIO: - * This symbol, if defined, indicates that sfio should - * be used. - */ -/*#define USE_SFIO / **/ - /* HAS_SIGNBIT: * This symbol, if defined, indicates that the signbit routine is * available to check if the given number has the sign bit set. @@ -4188,8 +4151,10 @@ /*#define USE_DYNAMIC_LOADING / **/ /* FFLUSH_NULL: - * This symbol, if defined, tells that fflush(NULL) does flush - * all pending stdio output. + * This symbol, if defined, tells that fflush(NULL) correctly + * flushes all pending stdio output without side effects. In + * particular, on some platforms calling fflush(NULL) *still* + * corrupts STDIN if it is a pipe. */ /* FFLUSH_ALL: * This symbol, if defined, tells that to flush @@ -4753,6 +4718,6 @@ #endif /* Generated from: - * 2c9dc3f21d37b1665f6a59dfc6d79e6cb08bdf36a9c3e427d11d6b9ddffe2439 config_h.SH - * 26ab9b4aa382d32761cb91084ba59e7e4b190799502a43366ccb3d2f584783ca uconfig.sh + * 7557e985de18f71e80f627226b454bc8eaf20477dcf0c45b5b2c51ec792f5c89 config_h.SH + * dbc8d38ba52ae23e5423418bb3f56b1b6fcdaa82cf71ba0be3463e8221bfe0c0 uconfig.sh * ex: set ro: */ diff --git a/Master/tlpkg/tlperl/lib/CORE/unicode_constants.h b/Master/tlpkg/tlperl/lib/CORE/unicode_constants.h index 19f3acd33f9..2ae9d77646e 100755 --- a/Master/tlpkg/tlperl/lib/CORE/unicode_constants.h +++ b/Master/tlpkg/tlperl/lib/CORE/unicode_constants.h @@ -20,19 +20,26 @@ * "_TAIL" if instead it represents all but the first byte. This, and * with no additional suffix are both string constants */ +#define LATIN_SMALL_LETTER_LONG_S_UTF8 "\xC5\xBF" /* U+017F */ #define COMBINING_GRAVE_ACCENT_UTF8 "\xCC\x80" /* U+0300 */ -#define COMBINING_ACUTE_ACCENT_UTF8 "\xCC\x81" /* U+0301 */ -#define COMBINING_DIAERESIS_UTF8 "\xCC\x88" /* U+0308 */ -#define GREEK_SMALL_LETTER_IOTA_UTF8 "\xCE\xB9" /* U+03B9 */ +#define GREEK_CAPITAL_LETTER_IOTA_UTF8 "\xCE\x99" /* U+0399 */ +#define GREEK_SMALL_LETTER_MU_UTF8 "\xCE\xBC" /* U+03BC */ -#define GREEK_SMALL_LETTER_UPSILON_UTF8 "\xCF\x85" /* U+03C5 */ +#define LATIN_CAPITAL_LETTER_SHARP_S_UTF8 "\xE1\xBA\x9E" /* U+1E9E */ + +#define LATIN_SMALL_LIGATURE_LONG_S_T_UTF8 "\xEF\xAC\x85" /* U+FB05 */ +#define LATIN_SMALL_LIGATURE_ST_UTF8 "\xEF\xAC\x86" /* U+FB06 */ #define HYPHEN_UTF8 "\xE2\x80\x90" /* U+2010 */ #define FIRST_SURROGATE_UTF8_FIRST_BYTE 0xED /* U+D800 */ +#define BOM_UTF8_FIRST_BYTE 0xEF /* U+FEFF */ +#define BOM_UTF8_TAIL "\xBB\xBF" /* U+FEFF */ #define DEL_NATIVE 0x7F /* U+007F */ +#define CR_NATIVE 0x0D /* U+000D */ +#define LF_NATIVE 0x0A /* U+000A */ #define LATIN_SMALL_LETTER_SHARP_S_NATIVE 0xDF /* U+00DF */ #define LATIN_SMALL_LETTER_A_WITH_RING_ABOVE_NATIVE 0xE5 /* U+00E5 */ #define LATIN_CAPITAL_LETTER_A_WITH_RING_ABOVE_NATIVE 0xC5 /* U+00C5 */ diff --git a/Master/tlpkg/tlperl/lib/CORE/utf8.h b/Master/tlpkg/tlperl/lib/CORE/utf8.h index 01d8f5fa204..f0e9d56966a 100644 --- a/Master/tlpkg/tlperl/lib/CORE/utf8.h +++ b/Master/tlpkg/tlperl/lib/CORE/utf8.h @@ -26,6 +26,9 @@ # define USE_UTF8_IN_NAMES (PL_hints & HINT_UTF8) #endif +#include "regcharclass.h" +#include "unicode_constants.h" + /* For to_utf8_fold_flags, q.v. */ #define FOLD_FLAGS_LOCALE 0x1 #define FOLD_FLAGS_FULL 0x2 @@ -36,21 +39,26 @@ #define _CORE_SWASH_INIT_RETURN_IF_UNDEF 0x2 #define _CORE_SWASH_INIT_ACCEPT_INVLIST 0x4 +#define uvchr_to_utf8(a,b) uvchr_to_utf8_flags(a,b,0) +#define uvchr_to_utf8_flags(d,uv,flags) \ + uvoffuni_to_utf8_flags(d,NATIVE_TO_UNI(uv),flags) +#define utf8_to_uvchr_buf(s, e, lenp) \ + utf8n_to_uvchr(s, (U8*)(e) - (U8*)(s), lenp, \ + ckWARN_d(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY) + #define to_uni_fold(c, p, lenp) _to_uni_fold_flags(c, p, lenp, FOLD_FLAGS_FULL) -#define to_utf8_fold(c, p, lenp) _to_utf8_fold_flags(c, p, lenp, \ - FOLD_FLAGS_FULL, NULL) -#define to_utf8_lower(a,b,c) _to_utf8_lower_flags(a,b,c,0, NULL) -#define to_utf8_upper(a,b,c) _to_utf8_upper_flags(a,b,c,0, NULL) -#define to_utf8_title(a,b,c) _to_utf8_title_flags(a,b,c,0, NULL) +#define to_utf8_fold(c, p, lenp) _to_utf8_fold_flags(c, p, lenp, FOLD_FLAGS_FULL) +#define to_utf8_lower(a,b,c) _to_utf8_lower_flags(a,b,c,0) +#define to_utf8_upper(a,b,c) _to_utf8_upper_flags(a,b,c,0) +#define to_utf8_title(a,b,c) _to_utf8_title_flags(a,b,c,0) /* Source backward compatibility. */ -#define uvuni_to_utf8(d, uv) uvuni_to_utf8_flags(d, uv, 0) #define is_utf8_string_loc(s, len, ep) is_utf8_string_loclen(s, len, ep, 0) #define foldEQ_utf8(s1, pe1, l1, u1, s2, pe2, l2, u2) \ foldEQ_utf8_flags(s1, pe1, l1, u1, s2, pe2, l2, u2, 0) -#define FOLDEQ_UTF8_NOMIX_ASCII (1 << 0) -#define FOLDEQ_UTF8_LOCALE (1 << 1) +#define FOLDEQ_UTF8_NOMIX_ASCII (1 << 0) +#define FOLDEQ_LOCALE (1 << 1) #define FOLDEQ_S1_ALREADY_FOLDED (1 << 2) #define FOLDEQ_S2_ALREADY_FOLDED (1 << 3) @@ -102,28 +110,23 @@ EXTCONST unsigned char PL_utf8skip[]; END_EXTERN_C -#include "regcharclass.h" -#include "unicode_constants.h" +/* Native character to/from iso-8859-1. Are the identity functions on ASCII + * platforms */ +#define NATIVE_TO_LATIN1(ch) (ch) +#define LATIN1_TO_NATIVE(ch) (ch) + +/* I8 is an intermediate version of UTF-8 used only in UTF-EBCDIC. We thus + * consider it to be identical to UTF-8 on ASCII platforms. Strictly speaking + * UTF-8 and UTF-EBCDIC are two different things, but we often conflate them + * because they are 8-bit encodings that serve the same purpose in Perl, and + * rarely do we need to distinguish them. The term "NATIVE_UTF8" applies to + * whichever one is applicable on the current platform */ +#define NATIVE_UTF8_TO_I8(ch) (ch) +#define I8_TO_NATIVE_UTF8(ch) (ch) -/* Native character to iso-8859-1 */ -#define NATIVE_TO_ASCII(ch) (ch) -#define ASCII_TO_NATIVE(ch) (ch) -/* Transform after encoding */ -#define NATIVE_TO_UTF(ch) (ch) -#define NATIVE_TO_I8(ch) NATIVE_TO_UTF(ch) /* a clearer synonym */ -#define UTF_TO_NATIVE(ch) (ch) -#define I8_TO_NATIVE(ch) UTF_TO_NATIVE(ch) /* Transforms in wide UV chars */ #define UNI_TO_NATIVE(ch) (ch) #define NATIVE_TO_UNI(ch) (ch) -/* Transforms in invariant space */ -#define NATIVE_TO_NEED(enc,ch) (ch) -#define ASCII_TO_NEED(enc,ch) (ch) - -/* As there are no translations, avoid the function wrapper */ -#define utf8n_to_uvchr utf8n_to_uvuni -#define valid_utf8_to_uvchr valid_utf8_to_uvuni -#define uvchr_to_utf8 uvuni_to_utf8 /* @@ -201,12 +204,12 @@ Perl's extended UTF-8 means we can have start bytes up to FF. /* This defines the 1-bits that are to be in the first byte of a multi-byte * UTF-8 encoded character that give the number of bytes that comprise the - * character. - * */ -#define UTF_START_MARK(len) (((len) > 7) ? 0xFF : (0xFE << (7-(len)))) + * character. 'len' is the number of bytes in the multi-byte sequence. */ +#define UTF_START_MARK(len) (((len) > 7) ? 0xFF : (0xFF & (0xFE << (7-(len))))) /* Masks out the initial one bits in a start byte, leaving the real data ones. - * Doesn't work on an invariant byte */ + * Doesn't work on an invariant byte. 'len' is the number of bytes in the + * multi-byte sequence that comprises the character. */ #define UTF_START_MASK(len) (((len) >= 7) ? 0x00 : (0x1F >> ((len)-2))) /* This defines the bits that are to be in the continuation bytes of a multi-byte @@ -229,8 +232,11 @@ Perl's extended UTF-8 means we can have start bytes up to FF. (((UV) UTF_CONTINUATION_MASK) << ((sizeof(UV) * CHARBITS) \ - UTF_ACCUMULATION_SHIFT)) -#ifdef HAS_QUAD -#define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \ +#if UVSIZE >= 8 +# define UTF8_QUAD_MAX UINT64_C(0x1000000000) + +/* Input is a true Unicode (not-native) code point */ +#define OFFUNISKIP(uv) ( (uv) < 0x80 ? 1 : \ (uv) < 0x800 ? 2 : \ (uv) < 0x10000 ? 3 : \ (uv) < 0x200000 ? 4 : \ @@ -239,7 +245,7 @@ Perl's extended UTF-8 means we can have start bytes up to FF. (uv) < UTF8_QUAD_MAX ? 7 : 13 ) #else /* No, I'm not even going to *TRY* putting #ifdef inside a #define */ -#define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \ +#define OFFUNISKIP(uv) ( (uv) < 0x80 ? 1 : \ (uv) < 0x800 ? 2 : \ (uv) < 0x10000 ? 3 : \ (uv) < 0x200000 ? 4 : \ @@ -264,6 +270,8 @@ Perl's extended UTF-8 means we can have start bytes up to FF. #error UTF8_MAXBYTES must be at least 12 #endif +#define MAX_UTF8_TWO_BYTE 0x7FF + #define UTF8_MAXBYTES_CASE UTF8_MAXBYTES #endif /* EBCDIC vs ASCII */ @@ -273,27 +281,53 @@ Perl's extended UTF-8 means we can have start bytes up to FF. * this level; the macros that some of these call may have different * definitions in the two encodings */ -#define NATIVE8_TO_UNI(ch) NATIVE_TO_ASCII(ch) /* a clearer synonym */ +/* In domain restricted to ASCII, these may make more sense to the reader than + * the ones with Latin1 in the name */ +#define NATIVE_TO_ASCII(ch) NATIVE_TO_LATIN1(ch) +#define ASCII_TO_NATIVE(ch) LATIN1_TO_NATIVE(ch) + +/* More or less misleadingly-named defines, retained for back compat */ +#define NATIVE_TO_UTF(ch) NATIVE_UTF8_TO_I8(ch) +#define NATIVE_TO_I8(ch) NATIVE_UTF8_TO_I8(ch) +#define UTF_TO_NATIVE(ch) I8_TO_NATIVE_UTF8(ch) +#define I8_TO_NATIVE(ch) I8_TO_NATIVE_UTF8(ch) +#define NATIVE8_TO_UNI(ch) NATIVE_TO_LATIN1(ch) /* Adds a UTF8 continuation byte 'new' of information to a running total code * point 'old' of all the continuation bytes so far. This is designed to be - * used in a loop to convert from UTF-8 to the code point represented */ -#define UTF8_ACCUMULATE(old, new) (((old) << UTF_ACCUMULATION_SHIFT) \ - | (((U8)new) & UTF_CONTINUATION_MASK)) + * used in a loop to convert from UTF-8 to the code point represented. Note + * that this is asymmetric on EBCDIC platforms, in that the 'new' parameter is + * the UTF-EBCDIC byte, whereas the 'old' parameter is a Unicode (not EBCDIC) + * code point in process of being generated */ +#define UTF8_ACCUMULATE(old, new) (((old) << UTF_ACCUMULATION_SHIFT) \ + | ((NATIVE_UTF8_TO_I8((U8)new)) \ + & UTF_CONTINUATION_MASK)) /* This works in the face of malformed UTF-8. */ #define UTF8_IS_NEXT_CHAR_DOWNGRADEABLE(s, e) (UTF8_IS_DOWNGRADEABLE_START(*s) \ && ( (e) - (s) > 1) \ && UTF8_IS_CONTINUATION(*((s)+1))) -/* Convert a two (not one) byte utf8 character to a unicode code point value. +/* Number of bytes a code point occupies in UTF-8. */ +#define NATIVE_SKIP(uv) OFFUNISKIP(NATIVE_TO_UNI(uv)) + +/* Most code which says UNISKIP is really thinking in terms of native code + * points (0-255) plus all those beyond. This is an imprecise term, but having + * it means existing code continues to work. For precision, use NATIVE_SKIP + * and OFFUNISKIP */ +#define UNISKIP(uv) NATIVE_SKIP(uv) + +/* Convert a two (not one) byte utf8 character to a native code point value. * Needs just one iteration of accumulate. Should not be used unless it is * known that the two bytes are legal: 1) two-byte start, and 2) continuation. * Note that the result can be larger than 255 if the input character is not * downgradable */ -#define TWO_BYTE_UTF8_TO_UNI(HI, LO) \ - UTF8_ACCUMULATE((NATIVE_TO_UTF(HI) & UTF_START_MASK(2)), \ - NATIVE_TO_UTF(LO)) +#define TWO_BYTE_UTF8_TO_NATIVE(HI, LO) \ + UNI_TO_NATIVE(UTF8_ACCUMULATE((NATIVE_UTF8_TO_I8(HI) & UTF_START_MASK(2)), \ + (LO))) + +/* Should never be used, and be deprecated */ +#define TWO_BYTE_UTF8_TO_UNI(HI, LO) NATIVE_TO_UNI(TWO_BYTE_UTF8_TO_NATIVE(HI, LO)) /* How many bytes in the UTF-8 encoded character whose first (perhaps only) * byte is pointed to by 's' */ @@ -303,27 +337,63 @@ Perl's extended UTF-8 means we can have start bytes up to FF. * works on both UTF-8 encoded strings and non-encoded, as it returns TRUE in * each for the exact same set of bit patterns. (And it works on any byte in a * UTF-8 encoded string) */ -#define UTF8_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_TO_UTF(c)) +#define UTF8_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_UTF8_TO_I8(c)) -#define NATIVE_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE8_TO_UNI(c)) +/* Like the above, but its name implies a non-UTF8 input, and is implemented + * differently (for no particular reason) */ +#define NATIVE_BYTE_IS_INVARIANT(c) UNI_IS_INVARIANT(NATIVE_TO_LATIN1(c)) -#define MAX_PORTABLE_UTF8_TWO_BYTE 0x3FF /* constrained by EBCDIC */ - -/* The macros in the next sets are used to generate the two utf8 or utfebcdic - * bytes from an ordinal that is known to fit into two bytes; it must be less - * than 0x3FF to work across both encodings. */ -/* Nocast allows these to be used in the case label of a switch statement */ -#define UTF8_TWO_BYTE_HI_nocast(c) NATIVE_TO_I8(((c) \ - >> UTF_ACCUMULATION_SHIFT) | (0xFF & UTF_START_MARK(2))) -#define UTF8_TWO_BYTE_LO_nocast(c) NATIVE_TO_I8(((c) & UTF_CONTINUATION_MASK) \ - | UTF_CONTINUATION_MARK) +/* Like the above, but accepts any UV as input */ +#define UVCHR_IS_INVARIANT(uv) UNI_IS_INVARIANT(NATIVE_TO_UNI(uv)) -#define UTF8_TWO_BYTE_HI(c) ((U8) (UTF8_TWO_BYTE_HI_nocast(c))) -#define UTF8_TWO_BYTE_LO(c) ((U8) (UTF8_TWO_BYTE_LO_nocast(c))) +#define MAX_PORTABLE_UTF8_TWO_BYTE 0x3FF /* constrained by EBCDIC */ -/* This name is used when the source is a single byte */ -#define UTF8_EIGHT_BIT_HI(c) UTF8_TWO_BYTE_HI((U8)(c)) -#define UTF8_EIGHT_BIT_LO(c) UTF8_TWO_BYTE_LO((U8)(c)) +/* The macros in the next 4 sets are used to generate the two utf8 or utfebcdic + * bytes from an ordinal that is known to fit into exactly two (not one) bytes; + * it must be less than 0x3FF to work across both encodings. */ + +/* These two are helper macros for the other three sets, and should not be used + * directly anywhere else. 'translate_function' is either NATIVE_TO_LATIN1 + * (which works for code points up to 0xFF) or NATIVE_TO_UNI which works for any + * code point */ +#define __BASE_TWO_BYTE_HI(c, translate_function) \ + I8_TO_NATIVE_UTF8((translate_function(c) >> UTF_ACCUMULATION_SHIFT) \ + | UTF_START_MARK(2)) +#define __BASE_TWO_BYTE_LO(c, translate_function) \ + I8_TO_NATIVE_UTF8((translate_function(c) & UTF_CONTINUATION_MASK) \ + | UTF_CONTINUATION_MARK) + +/* The next two macros should not be used. They were designed to be usable as + * the case label of a switch statement, but this doesn't work for EBCDIC. Use + * regen/unicode_constants.pl instead */ +#define UTF8_TWO_BYTE_HI_nocast(c) __BASE_TWO_BYTE_HI(c, NATIVE_TO_UNI) +#define UTF8_TWO_BYTE_LO_nocast(c) __BASE_TWO_BYTE_LO(c, NATIVE_TO_UNI) + +/* The next two macros are used when the source should be a single byte + * character; checked for under DEBUGGING */ +#define UTF8_EIGHT_BIT_HI(c) (__ASSERT_(FITS_IN_8_BITS(c)) \ + ((U8) __BASE_TWO_BYTE_HI(c, NATIVE_TO_LATIN1))) +#define UTF8_EIGHT_BIT_LO(c) (__ASSERT_(FITS_IN_8_BITS(c)) \ + ((U8) __BASE_TWO_BYTE_LO(c, NATIVE_TO_LATIN1))) + +/* These final two macros in the series are used when the source can be any + * code point whose UTF-8 is known to occupy 2 bytes; they are less efficient + * than the EIGHT_BIT versions on EBCDIC platforms. We use the logical '~' + * operator instead of "<=" to avoid getting compiler warnings. + * MAX_PORTABLE_UTF8_TWO_BYTE should be exactly all one bits in the lower few + * places, so the ~ works */ +#define UTF8_TWO_BYTE_HI(c) \ + (__ASSERT_((sizeof(c) == 1) \ + || !(((WIDEST_UTYPE)(c)) & ~MAX_PORTABLE_UTF8_TWO_BYTE)) \ + ((U8) __BASE_TWO_BYTE_HI(c, NATIVE_TO_LATIN1))) +#define UTF8_TWO_BYTE_LO(c) \ + (__ASSERT_((sizeof(c) == 1) \ + || !(((WIDEST_UTYPE)(c)) & ~MAX_PORTABLE_UTF8_TWO_BYTE)) \ + ((U8) __BASE_TWO_BYTE_LO(c, NATIVE_TO_LATIN1))) + +/* This is illegal in any well-formed UTF-8 in both EBCDIC and ASCII + * as it is only in overlongs. */ +#define ILLEGAL_UTF8_BYTE I8_TO_NATIVE_UTF8(0xC1) /* * 'UTF' is whether or not p is encoded in UTF8. The names 'foo_lazy_if' stem @@ -376,7 +446,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF. #define UTF8_WARN_SUPER 0x0400 /* points above the legal max */ /* Code points which never were part of the original UTF-8 standard, the first - * byte of which is a FE or FF on ASCII platforms. */ + * byte of which is a FE or FF on ASCII platforms. If the first byte is FF, it + * will overflow a 32-bit word. If the first byte is FE, it will overflow a + * signed 32-bit word. */ #define UTF8_DISALLOW_FE_FF 0x0800 #define UTF8_WARN_FE_FF 0x1000 @@ -415,9 +487,9 @@ Perl's extended UTF-8 means we can have start bytes up to FF. * U+110001: \xF4\x90\x80\x81 \xF9\xA2\xA0\xA0\xA1 */ #ifdef EBCDIC /* Both versions assume well-formed UTF8 */ -# define UTF8_IS_SUPER(s) (NATIVE_TO_I8(* (U8*) (s)) >= 0xF9 \ - && (NATIVE_TO_I8(* (U8*) (s)) > 0xF9 \ - || (NATIVE_TO_I8(* (U8*) ((s)) + 1 >= 0xA2)))) +# define UTF8_IS_SUPER(s) (NATIVE_UTF8_TO_I8(* (U8*) (s)) >= 0xF9 \ + && (NATIVE_UTF8_TO_I8(* (U8*) (s)) > 0xF9 \ + || (NATIVE_UTF8_TO_I8(* ((U8*) (s) + 1)) >= 0xA2))) #else # define UTF8_IS_SUPER(s) (*(U8*) (s) >= 0xF4 \ && (*(U8*) (s) > 0xF4 || (*((U8*) (s) + 1) >= 0x90))) @@ -471,10 +543,6 @@ Perl's extended UTF-8 means we can have start bytes up to FF. #define UNICODE_IS_SUPER(c) ((c) > PERL_UNICODE_MAX) #define UNICODE_IS_FE_FF(c) ((c) > 0x7FFFFFFF) -#ifdef HAS_QUAD -# define UTF8_QUAD_MAX UINT64_C(0x1000000000) -#endif - #define LATIN_SMALL_LETTER_SHARP_S LATIN_SMALL_LETTER_SHARP_S_NATIVE #define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS \ LATIN_SMALL_LETTER_Y_WITH_DIAERESIS_NATIVE @@ -487,12 +555,15 @@ Perl's extended UTF-8 means we can have start bytes up to FF. #define UNICODE_GREEK_SMALL_LETTER_FINAL_SIGMA 0x03C2 #define UNICODE_GREEK_SMALL_LETTER_SIGMA 0x03C3 #define GREEK_SMALL_LETTER_MU 0x03BC -#define GREEK_CAPITAL_LETTER_MU 0x039C /* Upper and title case of MICRON */ -#define LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS 0x0178 /* Also is title case */ -#define LATIN_CAPITAL_LETTER_SHARP_S 0x1E9E -#define LATIN_SMALL_LETTER_LONG_S 0x017F -#define KELVIN_SIGN 0x212A -#define ANGSTROM_SIGN 0x212B +#define GREEK_CAPITAL_LETTER_MU 0x039C /* Upper and title case + of MICRON */ +#define LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS 0x0178 /* Also is title case */ +#define LATIN_CAPITAL_LETTER_SHARP_S 0x1E9E +#define LATIN_SMALL_LETTER_LONG_S 0x017F +#define LATIN_SMALL_LIGATURE_LONG_S_T 0xFB05 +#define LATIN_SMALL_LIGATURE_ST 0xFB06 +#define KELVIN_SIGN 0x212A +#define ANGSTROM_SIGN 0x212B #define UNI_DISPLAY_ISPRINT 0x0001 #define UNI_DISPLAY_BACKSLASH 0x0002 @@ -504,8 +575,8 @@ Perl's extended UTF-8 means we can have start bytes up to FF. (ANYOF_NONBITMAP(node)) && \ (ANYOF_FLAGS(node) & ANYOF_LOC_NONBITMAP_FOLD) && \ ((end) > (input) + 1) && \ - toLOWER((input)[0]) == 's' && \ - toLOWER((input)[1]) == 's') + toFOLD((input)[0]) == 's' && \ + toFOLD((input)[1]) == 's') #define SHARP_S_SKIP 2 /* If you want to exclude surrogates, and beyond legal Unicode, see the blame diff --git a/Master/tlpkg/tlperl/lib/CORE/utfebcdic.h b/Master/tlpkg/tlperl/lib/CORE/utfebcdic.h index e7f5f32c69f..54a3d2696e9 100644 --- a/Master/tlpkg/tlperl/lib/CORE/utfebcdic.h +++ b/Master/tlpkg/tlperl/lib/CORE/utfebcdic.h @@ -43,7 +43,7 @@ * first byte of the final form of a variant will always have its upper * bit set (at least in the encodings that Perl recognizes, and probably * all). But note that the upper bit of some invariants is also 1. - * + * * If you're starting from Unicode, skip step 1. For UTF-EBCDIC to straight * EBCDIC, reverse the steps. * @@ -51,19 +51,19 @@ * equivalents have ordinal numbers less than 160, that is the same characters * that are expressible in ASCII, plus the C1 controls. So there are 160 * invariants instead of the 128 in UTF-8. (My guess is that this is because - * the C1 control NEL (and maybe others) is important in IBM.) + * the C1 control NEL (and maybe others) is important in IBM.) * * The purpose of Step 3 is to make the encoding be invariant for the chosen * characters. This messes up the convenient patterns found in step 2, so * generally, one has to undo step 3 into a temporary to use them. However, * a "shadow", or parallel table, PL_utf8skip, has been constructed so that for - * each byte, it says how long the sequence is if that byte were to begin it + * each byte, it says how long the sequence is if that byte were to begin it * * There are actually 3 slightly different UTF-EBCDIC encodings in this file, * one for each of the code pages recognized by Perl. That means that there * are actually three different sets of tables, one for each code page. (If * Perl is compiled on platforms using another EBCDIC code page, it may not - * compile, or Perl may silently mistake it for one of the three.) + * compile, or Perl may silently mistake it for one of the three.) * * EBCDIC characters above 0xFF are the same as Unicode in Perl's * implementation of all 3 encodings, so for those Step 1 is trivial. @@ -85,7 +85,7 @@ START_EXTERN_C as length 1 here so that we can recover. */ #if '^' == 95 /* if defined(__MVS__) || defined(??) (VM/ESA?) 1047 */ -EXTCONST unsigned char PL_utf8skip[] = { +EXTCONST U8 PL_utf8skip[] = { 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, @@ -106,7 +106,7 @@ EXTCONST unsigned char PL_utf8skip[] = { #endif #if '^' == 106 /* if defined(_OSD_POSIX) POSIX-BC */ -unsigned char PL_utf8skip[] = { +U8 PL_utf8skip[] = { 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, @@ -127,7 +127,7 @@ unsigned char PL_utf8skip[] = { #endif #if '^' == 176 /* if defined(??) (OS/400?) 037 */ -unsigned char PL_utf8skip[] = { +U8 PL_utf8skip[] = { 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, @@ -152,7 +152,7 @@ unsigned char PL_utf8skip[] = { * remains 'A' */ #if '^' == 95 /* if defined(__MVS__) || defined(??) (VM/ESA?) 1047 */ -EXTCONST unsigned char PL_utf2e[] = { /* I8 to UTFEBCDIC (IBM-1047) */ +EXTCONST U8 PL_utf2e[] = { /* I8 to UTFEBCDIC (IBM-1047) */ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, @@ -171,7 +171,7 @@ EXTCONST unsigned char PL_utf2e[] = { /* I8 to UTFEBCDIC (IBM-1047) */ 0xDC, 0xDD, 0xDE, 0xDF, 0xE1, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE }; -EXTCONST unsigned char PL_e2utf[] = { /* UTFEBCDIC (IBM-1047) to I8 */ +EXTCONST U8 PL_e2utf[] = { /* UTFEBCDIC (IBM-1047) to I8 */ 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, @@ -192,7 +192,7 @@ EXTCONST unsigned char PL_e2utf[] = { /* UTFEBCDIC (IBM-1047) to I8 */ #endif /* 1047 */ #if '^' == 106 /* if defined(_OSD_POSIX) POSIX-BC */ -unsigned char PL_utf2e[] = { /* I8 to UTFEBCDIC (POSIX-BC) */ +U8 PL_utf2e[] = { /* I8 to UTFEBCDIC (POSIX-BC) */ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, @@ -211,7 +211,7 @@ unsigned char PL_utf2e[] = { /* I8 to UTFEBCDIC (POSIX-BC) */ 0xDC, 0xC0, 0xDE, 0xDF, 0xE1, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xFA, 0xDD, 0xFC, 0xE0, 0xFE }; -unsigned char PL_e2utf[] = { /* UTFEBCDIC (POSIX-BC) to I8 */ +U8 PL_e2utf[] = { /* UTFEBCDIC (POSIX-BC) to I8 */ 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, @@ -232,7 +232,7 @@ unsigned char PL_e2utf[] = { /* UTFEBCDIC (POSIX-BC) to I8 */ #endif /* POSIX-BC */ #if '^' == 176 /* if defined(??) (OS/400?) 037 */ -unsigned char PL_utf2e[] = { /* I8 to UTFEBCDIC (IBM-037) */ +U8 PL_utf2e[] = { /* I8 to UTFEBCDIC (IBM-037) */ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, @@ -251,7 +251,7 @@ unsigned char PL_utf2e[] = { /* I8 to UTFEBCDIC (IBM-037) */ 0xDC, 0xDD, 0xDE, 0xDF, 0xE1, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE }; -unsigned char PL_e2utf[] = { /* UTFEBCDIC (IBM-037) to I8 */ +U8 PL_e2utf[] = { /* UTFEBCDIC (IBM-037) to I8 */ 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, @@ -276,7 +276,7 @@ unsigned char PL_e2utf[] = { /* UTFEBCDIC (IBM-037) to I8 */ */ #if '^' == 95 /* if defined(__MVS__) || defined(??) (VM/ESA?) 1047 */ -EXTCONST unsigned char PL_a2e[] = { /* ASCII (iso-8859-1) to EBCDIC (IBM-1047) */ +EXTCONST U8 PL_a2e[] = { /* ASCII (iso-8859-1) to EBCDIC (IBM-1047) */ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, @@ -295,7 +295,7 @@ EXTCONST unsigned char PL_a2e[] = { /* ASCII (iso-8859-1) to EBCDIC (IBM-1047) * 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF }; -EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (IBM-1047) to ASCII (iso-8859-1) */ +EXTCONST U8 PL_e2a[] = { /* EBCDIC (IBM-1047) to ASCII (iso-8859-1) */ 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, @@ -314,8 +314,47 @@ EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (IBM-1047) to ASCII (iso-8859-1) * 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F }; -EXTCONST unsigned char PL_fold[] = { /* fast EBCDIC case folding table, 'A' => - 'a'; 'a' => 'A' */ +EXTCONST U8 PL_latin1_lc[] = { /* lowercasing */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, + 0x60, 0x61, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + 0x70, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9C, 0x9F, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0x8C, 0xAD, 0x8E, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0x8D, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xEA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xDB, 0xDC, 0xDD, 0xDE, 0xFF +}; + +EXTCONST U8 PL_mod_latin1_uc[] = { /* uppercasing */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, + 0x40, 0x41, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0xDF, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x80, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + 0x80, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0x8A, 0x8B, 0xAC, 0xBA, 0xAE, 0x8F, + 0x90, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0x9A, 0x9B, 0x9E, 0x9D, 0x9E, 0x9F, + 0xDF, 0xA1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xFB, 0xFC, 0xFD, 0xFE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF +}; + +EXTCONST U8 PL_fold_latin1[] = { /* fast EBCDIC case folding table, + 'A' => 'a'; 'a' => 'A'; full + 0-255 range */ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -352,7 +391,7 @@ EXTCONST unsigned char PL_fold[] = { /* fast EBCDIC case folding table, 'A' => #endif /* 1047 */ #if '^' == 106 /* if defined(_OSD_POSIX) POSIX-BC */ -EXTCONST unsigned char PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (POSIX-BC) */ +EXTCONST U8 PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (POSIX-BC) */ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x15, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, @@ -371,7 +410,7 @@ EXTCONST unsigned char PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (POSIX-BC) */ 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xC0, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF }; -EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (POSIX-BC) to ASCII (ISO8859-1) */ +EXTCONST U8 PL_e2a[] = { /* EBCDIC (POSIX-BC) to ASCII (ISO8859-1) */ 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x9D, 0x0A, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, @@ -390,8 +429,47 @@ EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (POSIX-BC) to ASCII (ISO8859-1) */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xB3, 0x7B, 0xDC, 0x7D, 0xDA, 0x7E }; -EXTCONST unsigned char PL_fold[] = { /* fast EBCDIC case folding table, 'A' => - 'a'; 'a' => 'A' */ +EXTCONST U8 PL_latin1_lc[] = { /* lowercasing */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, + 0x60, 0x61, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + 0x70, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9C, 0x9F, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0x8C, 0x8D, 0x8E, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0xDA, 0xDB, 0xDC, 0xDB, 0xDE, 0xDF, + 0xC0, 0xE1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xEA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xDC, 0xFD, 0xDE, 0xFF +}; + +EXTCONST U8 PL_mod_latin1_uc[] = { /* uppercasing */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, + 0x40, 0x41, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0xDF, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x80, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + 0x80, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0x8A, 0x8B, 0xAC, 0xAD, 0xAE, 0x8F, + 0x90, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0x9A, 0x9B, 0x9E, 0x9D, 0x9E, 0x9F, + 0xDF, 0xA1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xE0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xDD, 0xFC, 0xDD, 0xFE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF +}; + +EXTCONST U8 PL_fold_latin1[] = { /* fast EBCDIC case folding table, + 'A' => 'a'; 'a' => 'A'; full + 0-255 range */ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -428,7 +506,7 @@ EXTCONST unsigned char PL_fold[] = { /* fast EBCDIC case folding table, 'A' => #endif /* POSIX-BC */ #if '^' == 176 /* if defined(??) (OS/400?) 037 */ -EXTCONST unsigned char PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (IBM-037) */ +EXTCONST U8 PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (IBM-037) */ 0x00, 0x01, 0x02, 0x03, 0x37, 0x2D, 0x2E, 0x2F, 0x16, 0x05, 0x25, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x3C, 0x3D, 0x32, 0x26, 0x18, 0x19, 0x3F, 0x27, 0x1C, 0x1D, 0x1E, 0x1F, 0x40, 0x5A, 0x7F, 0x7B, 0x5B, 0x6C, 0x50, 0x7D, 0x4D, 0x5D, 0x5C, 0x4E, 0x6B, 0x60, 0x4B, 0x61, @@ -447,7 +525,7 @@ EXTCONST unsigned char PL_a2e[] = { /* ASCII (ISO8859-1) to EBCDIC (IBM-037) */ 0x8C, 0x49, 0xCD, 0xCE, 0xCB, 0xCF, 0xCC, 0xE1, 0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF }; -EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (IBM-037) to ASCII (ISO8859-1) */ +EXTCONST U8 PL_e2a[] = { /* EBCDIC (IBM-037) to ASCII (ISO8859-1) */ 0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F, 0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87, 0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F, 0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07, @@ -466,8 +544,47 @@ EXTCONST unsigned char PL_e2a[] = { /* EBCDIC (IBM-037) to ASCII (ISO8859-1) */ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F }; -EXTCONST unsigned char PL_fold[] = { /* fast EBCDIC case folding table, 'A' => - 'a'; 'a' => 'A' */ +EXTCONST U8 PL_latin1_lc[] = { /* lowercasing */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, + 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, + 0x60, 0x61, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x70, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + 0x70, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9C, 0x9F, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0x8C, 0x8D, 0x8E, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xD0, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0xDA, 0xDB, 0xDC, 0xDD, 0xDE, 0xDF, + 0xE0, 0xE1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xEA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xDB, 0xDC, 0xDD, 0xDE, 0xFF +}; + +EXTCONST U8 PL_mod_latin1_uc[] = { /* uppercasing */ + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, + 0x40, 0x41, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, + 0x50, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0xDF, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, + 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, + 0x80, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F, + 0x80, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0x8A, 0x8B, 0xAC, 0xAD, 0xAE, 0x8F, + 0x90, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0x9A, 0x9B, 0x9E, 0x9D, 0x9E, 0x9F, + 0xDF, 0xA1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, + 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xFB, 0xFC, 0xFD, 0xFE, 0xDF, + 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF, + 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE, 0xFF +}; + +EXTCONST U8 PL_fold_latin1[] = { /* fast EBCDIC case folding table, + 'A' => 'a'; 'a' => 'A'; full + 0-255 range */ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -503,38 +620,68 @@ EXTCONST unsigned char PL_fold[] = { /* fast EBCDIC case folding table, 'A' => }; #endif /* 037 */ -/* Since the EBCDIC code pages are isomorphic to Latin1, that table is merely a - * duplicate */ -EXTCONST unsigned char * PL_fold_latin1 = PL_fold; +/* This is the same in all code pages, as only A-Z, a-z are affected */ +EXTCONST U8 PL_fold[] = { /* fast EBCDIC case folding table, 'A' => + 'a'; 'a' => 'A' */ + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, + 128, 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 138, 139, 140, 141, 142, 143, + 144, 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 154, 155, 156, 157, 158, 159, + 160, 161, 'S', 'T', 'U', 'V', 'W', 'X', + 'Y', 'Z', 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, + 192, 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 202, 203, 204, 205, 206, 207, + 208, 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 218, 219, 220, 221, 222, 223, + 224, 225, 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255 +}; #else -EXTCONST unsigned char PL_utf8skip[]; -EXTCONST unsigned char PL_e2utf[]; -EXTCONST unsigned char PL_utf2e[]; -EXTCONST unsigned char PL_e2a[]; -EXTCONST unsigned char PL_a2e[]; -EXTCONST unsigned char PL_fold[]; -EXTCONST unsigned char * PL_fold_latin1; +EXTCONST U8 PL_utf8skip[]; +EXTCONST U8 PL_e2utf[]; +EXTCONST U8 PL_utf2e[]; +EXTCONST U8 PL_e2a[]; +EXTCONST U8 PL_a2e[]; +EXTCONST U8 PL_fold[]; +EXTCONST U8 PL_fold_latin1[]; +EXTCONST U8 PL_latin1_lc[]; +EXTCONST U8 PL_mod_latin1_uc[]; #endif END_EXTERN_C /* EBCDIC-happy ways of converting native code to UTF-8 */ -/* Native to iso-8859-1 */ -#define NATIVE_TO_ASCII(ch) PL_e2a[(U8)(ch)] -#define ASCII_TO_NATIVE(ch) PL_a2e[(U8)(ch)] -/* Transform after encoding, essentially converts to/from I8 */ -#define NATIVE_TO_UTF(ch) PL_e2utf[(U8)(ch)] /* to I8 */ -#define NATIVE_TO_I8(ch) NATIVE_TO_UTF(ch) /* synonym */ -#define UTF_TO_NATIVE(ch) PL_utf2e[(U8)(ch)] /* from I8 */ -#define I8_TO_NATIVE(ch) UTF_TO_NATIVE(ch) /* synonym */ -/* Transform in wide UV char space */ -#define NATIVE_TO_UNI(ch) (((ch) > 255) ? (ch) : NATIVE_TO_ASCII(ch)) -#define UNI_TO_NATIVE(ch) (((ch) > 255) ? (ch) : ASCII_TO_NATIVE(ch)) -/* Transform in invariant..byte space */ -#define NATIVE_TO_NEED(enc,ch) ((enc) ? UTF_TO_NATIVE(NATIVE_TO_ASCII(ch)) : (ch)) -#define ASCII_TO_NEED(enc,ch) ((enc) ? UTF_TO_NATIVE(ch) : ASCII_TO_NATIVE(ch)) +#define NATIVE_TO_LATIN1(ch) PL_e2a[(U8)(ch)] +#define LATIN1_TO_NATIVE(ch) PL_a2e[(U8)(ch)] + +#define NATIVE_UTF8_TO_I8(ch) PL_e2utf[(U8)(ch)] +#define I8_TO_NATIVE_UTF8(ch) PL_utf2e[(U8)(ch)] + +/* Transforms in wide UV chars */ +#define NATIVE_TO_UNI(ch) (((ch) > 255) ? (ch) : NATIVE_TO_LATIN1(ch)) +#define UNI_TO_NATIVE(ch) (((ch) > 255) ? (ch) : LATIN1_TO_NATIVE(ch)) /* The following table is adapted from tr16, it shows I8 encoding of Unicode code points. @@ -554,26 +701,37 @@ END_EXTERN_C */ -#define UNISKIP(uv) ( (uv) < 0xA0 ? 1 : \ +/* Input is a true Unicode (not-native) code point */ +#define OFFUNISKIP(uv) ( (uv) < 0xA0 ? 1 : \ (uv) < 0x400 ? 2 : \ (uv) < 0x4000 ? 3 : \ (uv) < 0x40000 ? 4 : \ (uv) < 0x400000 ? 5 : \ (uv) < 0x4000000 ? 6 : 7 ) -#define UNI_IS_INVARIANT(c) ((c) < 0xA0) +#define UNI_IS_INVARIANT(c) (((UV)(c)) < 0xA0) /* UTF-EBCDIC semantic macros - transform back into I8 and then compare * Comments as to the meaning of each are given at their corresponding utf8.h * definitions */ -#define UTF8_IS_START(c) (NATIVE_TO_UTF(c) >= 0xC5 && NATIVE_TO_UTF(c) != 0xE0) -#define UTF8_IS_CONTINUATION(c) ((NATIVE_TO_UTF(c) & 0xE0) == 0xA0) -#define UTF8_IS_CONTINUED(c) (NATIVE_TO_UTF(c) >= 0xA0) -#define UTF8_IS_DOWNGRADEABLE_START(c) (NATIVE_TO_UTF(c) >= 0xC5 && NATIVE_TO_UTF(c) <= 0xC7) -#define UTF8_IS_ABOVE_LATIN1(c) (NATIVE_TO_I8(c) >= 0xC8) +#define UTF8_IS_START(c) (NATIVE_UTF8_TO_I8(c) >= 0xC5 \ + && NATIVE_UTF8_TO_I8(c) != 0xE0) +#define UTF8_IS_CONTINUATION(c) ((NATIVE_UTF8_TO_I8(c) & 0xE0) == 0xA0) +#define UTF8_IS_CONTINUED(c) (NATIVE_UTF8_TO_I8(c) >= 0xA0) + +#define UTF8_IS_DOWNGRADEABLE_START(c) (NATIVE_UTF8_TO_I8(c) >= 0xC5 \ + && NATIVE_UTF8_TO_I8(c) <= 0xC7) +/* Saying it this way adds a runtime test, but removes 2 run-time lookups */ +/*#define UTF8_IS_DOWNGRADEABLE_START(c) ((c) == I8_TO_NATIVE_UTF8(0xC5) \ + || (c) == I8_TO_NATIVE_UTF8(0xC6) \ + || (c) == I8_TO_NATIVE_UTF8(0xC7)) +*/ +#define UTF8_IS_ABOVE_LATIN1(c) (NATIVE_UTF8_TO_I8(c) >= 0xC8) + +/* Can't exceed 7 on EBCDIC platforms */ +#define UTF_START_MARK(len) (0xFF & (0xFE << (7-(len)))) -#define UTF_START_MARK(len) (((len) > 7) ? 0xFF : ((U8)(0xFE << (7-(len))))) #define UTF_START_MASK(len) (((len) >= 6) ? 0x01 : (0x1F >> ((len)-2))) #define UTF_CONTINUATION_MARK 0xA0 #define UTF_CONTINUATION_MASK ((U8)0x1f) @@ -592,6 +750,8 @@ END_EXTERN_C * character occupies 5 bytes, therefore this number is 15 */ #define UTF8_MAXBYTES_CASE 15 +#define MAX_UTF8_TWO_BYTE 0x3FF + /* * Local variables: * c-indentation-style: bsd diff --git a/Master/tlpkg/tlperl/lib/CORE/util.h b/Master/tlpkg/tlperl/lib/CORE/util.h index ed133c464bd..08544f5600c 100644 --- a/Master/tlpkg/tlperl/lib/CORE/util.h +++ b/Master/tlpkg/tlperl/lib/CORE/util.h @@ -52,6 +52,36 @@ This is a synonym for (! foldEQ_locale()) #define ibcmp(s1, s2, len) cBOOL(! foldEQ(s1, s2, len)) #define ibcmp_locale(s1, s2, len) cBOOL(! foldEQ_locale(s1, s2, len)) +/* outside the core, perl.h undefs HAS_QUAD if IV isn't 64-bit + We can't swap this to HAS_QUAD, because the logic here affects the type of + perl_drand48_t below, and that is visible outside of the core. */ +#if defined(U64TYPE) && !defined(USING_MSVC6) +/* use a faster implementation when quads are available, + * but not with VC6 on Windows */ +# define PERL_DRAND48_QUAD +#endif + +#ifdef PERL_DRAND48_QUAD + +/* U64 is only defined under PERL_CORE, but this needs to be visible + * elsewhere so the definition of PerlInterpreter is complete. + */ +typedef U64TYPE perl_drand48_t; + +#else + +struct PERL_DRAND48_T { + U16 seed[3]; +}; + +typedef struct PERL_DRAND48_T perl_drand48_t; + +#endif + +#define PL_RANDOM_STATE_TYPE perl_drand48_t + +#define Perl_drand48_init(seed) (Perl_drand48_init_r(&PL_random_state, (seed))) +#define Perl_drand48() (Perl_drand48_r(&PL_random_state)) /* * Local variables: diff --git a/Master/tlpkg/tlperl/lib/CORE/vdir.h b/Master/tlpkg/tlperl/lib/CORE/vdir.h index db7ec8417fe..a4186a1ad9f 100644 --- a/Master/tlpkg/tlperl/lib/CORE/vdir.h +++ b/Master/tlpkg/tlperl/lib/CORE/vdir.h @@ -146,43 +146,21 @@ void VDir::Init(VDir* pDir, VMem *p) else { int bSave = bManageDirectory; DWORD driveBits = GetLogicalDrives(); - OSVERSIONINFO osver; - - memset(&osver, 0, sizeof(osver)); - osver.dwOSVersionInfoSize = sizeof(osver); - GetVersionEx(&osver); bManageDirectory = 0; - if (osver.dwMajorVersion < 5) { - char szBuffer[MAX_PATH*driveCount]; - if (GetLogicalDriveStringsA(sizeof(szBuffer), szBuffer)) { - char* pEnv = (char*)GetEnvironmentStringsA(); - char* ptr = szBuffer; - for (index = 0; index < driveCount; ++index) { - if (driveBits & (1<<index)) { - ptr += SetDirA(ptr, index) + 1; - FromEnvA(pEnv, index); - } - } - FreeEnvironmentStringsA(pEnv); - } - SetDefaultA("."); - } - else { /* Windows 2000 or later */ - WCHAR szBuffer[MAX_PATH*driveCount]; - if (GetLogicalDriveStringsW(sizeof(szBuffer), szBuffer)) { - WCHAR* pEnv = GetEnvironmentStringsW(); - WCHAR* ptr = szBuffer; - for (index = 0; index < driveCount; ++index) { - if (driveBits & (1<<index)) { - ptr += SetDirW(ptr, index) + 1; - FromEnvW(pEnv, index); - } + WCHAR szBuffer[MAX_PATH*driveCount]; + if (GetLogicalDriveStringsW(sizeof(szBuffer), szBuffer)) { + WCHAR* pEnv = GetEnvironmentStringsW(); + WCHAR* ptr = szBuffer; + for (index = 0; index < driveCount; ++index) { + if (driveBits & (1<<index)) { + ptr += SetDirW(ptr, index) + 1; + FromEnvW(pEnv, index); } - FreeEnvironmentStringsW(pEnv); } - SetDefaultW(L"."); + FreeEnvironmentStringsW(pEnv); } + SetDefaultW(L"."); bManageDirectory = bSave; } } diff --git a/Master/tlpkg/tlperl/lib/CORE/vutil.h b/Master/tlpkg/tlperl/lib/CORE/vutil.h new file mode 100644 index 00000000000..aaf2284e89c --- /dev/null +++ b/Master/tlpkg/tlperl/lib/CORE/vutil.h @@ -0,0 +1,241 @@ +/* This file is part of the "version" CPAN distribution. Please avoid + editing it in the perl core. */ + +#ifndef PERL_CORE +# include "ppport.h" +#endif + +/* The MUTABLE_*() macros cast pointers to the types shown, in such a way + * (compiler permitting) that casting away const-ness will give a warning; + * e.g.: + * + * const SV *sv = ...; + * AV *av1 = (AV*)sv; <== BAD: the const has been silently cast away + * AV *av2 = MUTABLE_AV(sv); <== GOOD: it may warn + */ + +#ifndef MUTABLE_PTR +# if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +# define MUTABLE_PTR(p) ({ void *_p = (p); _p; }) +# else +# define MUTABLE_PTR(p) ((void *) (p)) +# endif + +# define MUTABLE_AV(p) ((AV *)MUTABLE_PTR(p)) +# define MUTABLE_CV(p) ((CV *)MUTABLE_PTR(p)) +# define MUTABLE_GV(p) ((GV *)MUTABLE_PTR(p)) +# define MUTABLE_HV(p) ((HV *)MUTABLE_PTR(p)) +# define MUTABLE_IO(p) ((IO *)MUTABLE_PTR(p)) +# define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p)) +#endif + +#ifndef SvPVx_nolen_const +# if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +# define SvPVx_nolen_const(sv) ({SV *_sv = (sv); SvPV_nolen_const(_sv); }) +# else +# define SvPVx_nolen_const(sv) (SvPV_nolen_const(sv)) +# endif +#endif + +#ifndef PERL_ARGS_ASSERT_CK_WARNER +static void Perl_ck_warner(pTHX_ U32 err, const char* pat, ...); + +# ifdef vwarner +static +void +Perl_ck_warner(pTHX_ U32 err, const char* pat, ...) +{ + va_list args; + + PERL_UNUSED_ARG(err); + if (ckWARN(err)) { + va_list args; + va_start(args, pat); + vwarner(err, pat, &args); + va_end(args); + } +} +# else +/* yes this replicates my_warner */ +static +void +Perl_ck_warner(pTHX_ U32 err, const char* pat, ...) +{ + SV *sv; + va_list args; + + PERL_UNUSED_ARG(err); + + va_start(args, pat); + sv = vnewSVpvf(pat, &args); + va_end(args); + sv_2mortal(sv); + warn("%s", SvPV_nolen(sv)); +} +# endif +#endif + +#define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s) +#define PERL_DECIMAL_VERSION \ + PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION) +#define PERL_VERSION_LT(r,v,s) \ + (PERL_DECIMAL_VERSION < PERL_VERSION_DECIMAL(r,v,s)) +#define PERL_VERSION_GE(r,v,s) \ + (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s)) + +#if PERL_VERSION_LT(5,15,4) +# define ISA_VERSION_OBJ(v) (sv_isobject(v) && sv_derived_from(v,"version")) +#else +# define ISA_VERSION_OBJ(v) (sv_isobject(v) && sv_derived_from_pvn(v,"version",7,0)) +#endif + + +#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE +#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params) + +/* prototype to pass -Wmissing-prototypes */ +STATIC void +S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params); + +STATIC void +S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params) +{ + const GV *const gv = CvGV(cv); + + PERL_ARGS_ASSERT_CROAK_XS_USAGE; + + if (gv) { + const char *const gvname = GvNAME(gv); + const HV *const stash = GvSTASH(gv); + const char *const hvname = stash ? HvNAME(stash) : NULL; + + if (hvname) + Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params); + else + Perl_croak_nocontext("Usage: %s(%s)", gvname, params); + } else { + /* Pants. I don't think that it should be possible to get here. */ + Perl_croak_nocontext("Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params); + } +} + +#ifdef PERL_IMPLICIT_CONTEXT +#define croak_xs_usage(a,b) S_croak_xs_usage(aTHX_ a,b) +#else +#define croak_xs_usage S_croak_xs_usage +#endif + +#endif + +#if PERL_VERSION_GE(5,9,0) && !defined(PERL_CORE) + +# define VUTIL_REPLACE_CORE 1 + +const char * Perl_scan_version2(pTHX_ const char *s, SV *rv, bool qv); +SV * Perl_new_version2(pTHX_ SV *ver); +SV * Perl_upg_version2(pTHX_ SV *sv, bool qv); +SV * Perl_vstringify2(pTHX_ SV *vs); +SV * Perl_vverify2(pTHX_ SV *vs); +SV * Perl_vnumify2(pTHX_ SV *vs); +SV * Perl_vnormal2(pTHX_ SV *vs); +SV * Perl_vstringify2(pTHX_ SV *vs); +int Perl_vcmp2(pTHX_ SV *lsv, SV *rsv); +const char * Perl_prescan_version2(pTHX_ const char *s, bool strict, const char** errstr, bool *sqv, int *ssaw_decimal, int *swidth, bool *salpha); + +# define SCAN_VERSION(a,b,c) Perl_scan_version2(aTHX_ a,b,c) +# define NEW_VERSION(a) Perl_new_version2(aTHX_ a) +# define UPG_VERSION(a,b) Perl_upg_version2(aTHX_ a, b) +# define VSTRINGIFY(a) Perl_vstringify2(aTHX_ a) +# define VVERIFY(a) Perl_vverify2(aTHX_ a) +# define VNUMIFY(a) Perl_vnumify2(aTHX_ a) +# define VNORMAL(a) Perl_vnormal2(aTHX_ a) +# define VCMP(a,b) Perl_vcmp2(aTHX_ a,b) +# define PRESCAN_VERSION(a,b,c,d,e,f,g) Perl_prescan_version2(aTHX_ a,b,c,d,e,f,g) +# undef is_LAX_VERSION +# define is_LAX_VERSION(a,b) \ + (a != Perl_prescan_version2(aTHX_ a, FALSE, b, NULL, NULL, NULL, NULL)) +# undef is_STRICT_VERSION +# define is_STRICT_VERSION(a,b) \ + (a != Perl_prescan_version2(aTHX_ a, TRUE, b, NULL, NULL, NULL, NULL)) + +#else + +const char * Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv); +SV * Perl_new_version(pTHX_ SV *ver); +SV * Perl_upg_version(pTHX_ SV *sv, bool qv); +SV * Perl_vverify(pTHX_ SV *vs); +SV * Perl_vnumify(pTHX_ SV *vs); +SV * Perl_vnormal(pTHX_ SV *vs); +SV * Perl_vstringify(pTHX_ SV *vs); +int Perl_vcmp(pTHX_ SV *lsv, SV *rsv); +const char * Perl_prescan_version(pTHX_ const char *s, bool strict, const char** errstr, bool *sqv, int *ssaw_decimal, int *swidth, bool *salpha); + +# define SCAN_VERSION(a,b,c) Perl_scan_version(aTHX_ a,b,c) +# define NEW_VERSION(a) Perl_new_version(aTHX_ a) +# define UPG_VERSION(a,b) Perl_upg_version(aTHX_ a, b) +# define VSTRINGIFY(a) Perl_vstringify(aTHX_ a) +# define VVERIFY(a) Perl_vverify(aTHX_ a) +# define VNUMIFY(a) Perl_vnumify(aTHX_ a) +# define VNORMAL(a) Perl_vnormal(aTHX_ a) +# define VCMP(a,b) Perl_vcmp(aTHX_ a,b) + +# define PRESCAN_VERSION(a,b,c,d,e,f,g) Perl_prescan_version(aTHX_ a,b,c,d,e,f,g) +# ifndef is_LAX_VERSION +# define is_LAX_VERSION(a,b) \ + (a != Perl_prescan_version(aTHX_ a, FALSE, b, NULL, NULL, NULL, NULL)) +# endif +# ifndef is_STRICT_VERSION +# define is_STRICT_VERSION(a,b) \ + (a != Perl_prescan_version(aTHX_ a, TRUE, b, NULL, NULL, NULL, NULL)) +# endif + +#endif + +#if PERL_VERSION_LT(5,11,4) +# define BADVERSION(a,b,c) \ + if (b) { \ + *b = c; \ + } \ + return a; + +# define PERL_ARGS_ASSERT_PRESCAN_VERSION \ + assert(s); assert(sqv); assert(ssaw_decimal);\ + assert(swidth); assert(salpha); + +# define PERL_ARGS_ASSERT_SCAN_VERSION \ + assert(s); assert(rv) +# define PERL_ARGS_ASSERT_NEW_VERSION \ + assert(ver) +# define PERL_ARGS_ASSERT_UPG_VERSION \ + assert(ver) +# define PERL_ARGS_ASSERT_VVERIFY \ + assert(vs) +# define PERL_ARGS_ASSERT_VNUMIFY \ + assert(vs) +# define PERL_ARGS_ASSERT_VNORMAL \ + assert(vs) +# define PERL_ARGS_ASSERT_VSTRINGIFY \ + assert(vs) +# define PERL_ARGS_ASSERT_VCMP \ + assert(lhv); assert(rhv) +# define PERL_ARGS_ASSERT_CK_WARNER \ + assert(pat) +#endif + + +#if PERL_VERSION_LT(5,19,0) +# undef STORE_NUMERIC_LOCAL_SET_STANDARD +# undef RESTORE_NUMERIC_LOCAL +# ifdef USE_LOCALE +# define STORE_NUMERIC_LOCAL_SET_STANDARD()\ + char *loc = savepv(setlocale(LC_NUMERIC, NULL)); \ + SAVEFREEPV(loc); \ + setlocale(LC_NUMERIC, "C"); + +# define RESTORE_NUMERIC_LOCAL()\ + setlocale(LC_NUMERIC, loc); +# else +# define STORE_NUMERIC_LOCAL_SET_STANDARD() +# define RESTORE_NUMERIC_LOCAL() +# endif +#endif diff --git a/Master/tlpkg/tlperl/lib/CORE/warnings.h b/Master/tlpkg/tlperl/lib/CORE/warnings.h index 5c40d5c398b..66e4153d6b9 100644 --- a/Master/tlpkg/tlperl/lib/CORE/warnings.h +++ b/Master/tlpkg/tlperl/lib/CORE/warnings.h @@ -95,9 +95,16 @@ #define WARN_EXPERIMENTAL__REGEX_SETS 54 #define WARN_EXPERIMENTAL__SMARTMATCH 55 -#define WARNsize 14 -#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125" -#define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0\0\0" +/* Warnings Categories added in Perl 5.019 */ + +#define WARN_EXPERIMENTAL__AUTODEREF 56 +#define WARN_EXPERIMENTAL__POSTDEREF 57 +#define WARN_EXPERIMENTAL__SIGNATURES 58 +#define WARN_SYSCALLS 59 + +#define WARNsize 15 +#define WARN_ALLstring "\125\125\125\125\125\125\125\125\125\125\125\125\125\125\125" +#define WARN_NONEstring "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" #define isLEXWARN_on (PL_curcop->cop_warnings != pWARN_STD) #define isLEXWARN_off (PL_curcop->cop_warnings == pWARN_STD) @@ -111,6 +118,10 @@ char)) #define ckWARN(w) Perl_ckwarn(aTHX_ packWARN(w)) + +/* The w1, w2 ... should be independent warnings categories; one shouldn't be + * a subcategory of any other */ + #define ckWARN2(w1,w2) Perl_ckwarn(aTHX_ packWARN2(w1,w2)) #define ckWARN3(w1,w2,w3) Perl_ckwarn(aTHX_ packWARN3(w1,w2,w3)) #define ckWARN4(w1,w2,w3,w4) Perl_ckwarn(aTHX_ packWARN4(w1,w2,w3,w4)) @@ -123,6 +134,10 @@ #define WARNshift 8 #define packWARN(a) (a ) + +/* The a, b, ... should be independent warnings categories; one shouldn't be + * a subcategory of any other */ + #define packWARN2(a,b) ((a) | ((b)<<8) ) #define packWARN3(a,b,c) ((a) | ((b)<<8) | ((c)<<16) ) #define packWARN4(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d) <<24)) diff --git a/Master/tlpkg/tlperl/lib/CORE/win32.h b/Master/tlpkg/tlperl/lib/CORE/win32.h index 3065867bd28..735c4503e27 100644 --- a/Master/tlpkg/tlperl/lib/CORE/win32.h +++ b/Master/tlpkg/tlperl/lib/CORE/win32.h @@ -13,6 +13,7 @@ # define _WIN32_WINNT 0x0500 /* needed for CreateHardlink() etc. */ #endif +/* Win32 only optimizations for faster building */ #ifdef PERL_IS_MINIPERL /* this macro will remove Winsock only on miniperl, PERL_IMPLICIT_SYS and * makedef.pl create dependencies that will keep Winsock linked in even with @@ -20,6 +21,8 @@ * level in full perl */ # define WIN32_NO_SOCKETS +/* less I/O calls during each require */ +# define PERL_DISABLE_PMC #endif #ifdef WIN32_NO_SOCKETS @@ -242,13 +245,18 @@ typedef unsigned short mode_t; #pragma warning(disable: 4102) /* "unreferenced label" */ -#define isnan _isnan +#if _MSC_VER < 1800 +#define isnan _isnan /* Defined already in VC++ 12.0 */ +#endif +#ifdef UNDER_CE /* revisit what function this becomes celib vs corelibc, prv warning here*/ +# undef snprintf +#endif #define snprintf _snprintf #define vsnprintf _vsnprintf -#if _MSC_VER < 1300 -/* VC6 has broken NaN semantics: NaN == NaN returns true instead of false */ -#define NAN_COMPARE_BROKEN 1 +/* on VC2003, msvcrt.lib is missing these symbols */ +#if _MSC_VER >= 1300 && _MSC_VER < 1400 +# pragma intrinsic(_rotl64,_rotr64) #endif #endif /* _MSC_VER */ @@ -312,7 +320,6 @@ extern gid_t getegid(void); extern int setuid(uid_t uid); extern int setgid(gid_t gid); extern int kill(int pid, int sig); -extern int killpg(int pid, int sig); #ifndef USE_PERL_SBRK extern void *sbrk(ptrdiff_t need); # define HAS_SBRK_PROTO @@ -369,6 +376,8 @@ extern char * win32_get_vendorlib(const char *pl, STRLEN *const len); extern void win32_delete_internal_host(void *h); #endif +extern int win32_get_errno(int err); + extern const char * const staticlinkmodules[]; END_EXTERN_C @@ -383,8 +392,8 @@ typedef char * caddr_t; /* In malloc.c (core address). */ #ifdef MYMALLOC #define EMBEDMYMALLOC /**/ -/* #define USE_PERL_SBRK /**/ -/* #define PERL_SBRK_VIA_MALLOC /**/ +/* #define USE_PERL_SBRK / **/ +/* #define PERL_SBRK_VIA_MALLOC / **/ #endif #ifdef PERL_TEXTMODE_SCRIPTS @@ -500,6 +509,100 @@ void win32_wait_for_children(pTHX); # define PERL_WAIT_FOR_CHILDREN win32_wait_for_children(aTHX) #endif +#ifdef PERL_CORE +/* C doesn't like repeat struct definitions */ +#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION>=3) +#undef _CRTIMP +#endif +#ifndef _CRTIMP +#define _CRTIMP __declspec(dllimport) +#endif + + +/* VV 2005 has multiple ioinfo struct definitions through VC 2005's release life + * VC 2008-2012 have been stable but do not assume future VCs will have the + * same ioinfo struct, just because past struct stability. If research is done + * on the CRTs of future VS, the version check can be bumped up so the newer + * VC uses a fixed ioinfo size. + */ +#if ! (_MSC_VER < 1400 || (_MSC_VER >= 1500 && _MSC_VER <= 1700) \ + || defined(__MINGW32__)) +/* size of ioinfo struct is determined at runtime */ +# define WIN32_DYN_IOINFO_SIZE +#endif + +#ifndef WIN32_DYN_IOINFO_SIZE +/* + * Control structure for lowio file handles + */ +typedef struct { + intptr_t osfhnd;/* underlying OS file HANDLE */ + char osfile; /* attributes of file (e.g., open in text mode?) */ + char pipech; /* one char buffer for handles opened on pipes */ + int lockinitflag; + CRITICAL_SECTION lock; +/* this struct defintion breaks ABI compatibility with + * not using, cl.exe's native VS version specitfic CRT. */ +# if _MSC_VER >= 1400 && _MSC_VER < 1500 +# error "This ioinfo struct is incomplete for Visual C 2005" +# endif +/* VC 2005 CRT has atleast 3 different definitions of this struct based on the + * CRT DLL's build number. */ +# if _MSC_VER >= 1500 +# ifndef _SAFECRT_IMPL + /* Not used in the safecrt downlevel. We do not define them, so we cannot + * use them accidentally */ + char textmode : 7;/* __IOINFO_TM_ANSI or __IOINFO_TM_UTF8 or __IOINFO_TM_UTF16LE */ + char unicode : 1; /* Was the file opened as unicode? */ + char pipech2[2]; /* 2 more peak ahead chars for UNICODE mode */ + __int64 startpos; /* File position that matches buffer start */ + BOOL utf8translations; /* Buffer contains translations other than CRLF*/ + char dbcsBuffer; /* Buffer for the lead byte of dbcs when converting from dbcs to unicode */ + BOOL dbcsBufferUsed; /* Bool for the lead byte buffer is used or not */ +# endif +# endif +} ioinfo; +#else +typedef intptr_t ioinfo; +#endif + +/* + * Array of arrays of control structures for lowio files. + */ +EXTERN_C _CRTIMP ioinfo* __pioinfo[]; + +/* + * Definition of IOINFO_L2E, the log base 2 of the number of elements in each + * array of ioinfo structs. + */ +#define IOINFO_L2E 5 + +/* + * Definition of IOINFO_ARRAY_ELTS, the number of elements in ioinfo array + */ +#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) + +/* + * Access macros for getting at an ioinfo struct and its fields from a + * file handle + */ +#ifdef WIN32_DYN_IOINFO_SIZE +# define _pioinfo(i) ((intptr_t *) \ + (((Size_t)__pioinfo[(i) >> IOINFO_L2E])/* * to head of array ioinfo [] */\ + /* offset to the head of a particular ioinfo struct */ \ + + (((i) & (IOINFO_ARRAY_ELTS - 1)) * w32_ioinfo_size)) \ + ) +/* first slice of ioinfo is always the OS handle */ +# define _osfhnd(i) (*(_pioinfo(i))) +#else +# define _pioinfo(i) (__pioinfo[(i) >> IOINFO_L2E] + ((i) & (IOINFO_ARRAY_ELTS - 1))) +# define _osfhnd(i) (_pioinfo(i)->osfhnd) +#endif + +/* since we are not doing a dup2(), this works fine */ +# define _set_osfhnd(fh, osfh) (void)(_osfhnd(fh) = (intptr_t)osfh) +#endif /* PERL_CORE */ + /* IO.xs and POSIX.xs define PERLIO_NOT_STDIO to 1 */ #if defined(PERL_EXT_IO) || defined(PERL_EXT_POSIX) #undef PERLIO_NOT_STDIO diff --git a/Master/tlpkg/tlperl/lib/CORE/win32iop.h b/Master/tlpkg/tlperl/lib/CORE/win32iop.h index 207c9176e56..246375faa32 100644 --- a/Master/tlpkg/tlperl/lib/CORE/win32iop.h +++ b/Master/tlpkg/tlperl/lib/CORE/win32iop.h @@ -207,75 +207,210 @@ END_EXTERN_C */ #undef fprintf #define fprintf win32_fprintf +#ifdef UNDER_CE /* celib also makes these be macros to celib's x* symbols */ +# undef vfprintf +#endif #define vfprintf win32_vfprintf +#ifdef UNDER_CE +# undef printf +#endif #define printf win32_printf +#ifdef UNDER_CE +# undef vprintf +#endif #define vprintf win32_vprintf +#ifdef UNDER_CE +# undef fread +#endif #define fread(buf,size,count,f) win32_fread(buf,size,count,f) +#ifdef UNDER_CE +# undef fwrite +#endif #define fwrite(buf,size,count,f) win32_fwrite(buf,size,count,f) +#ifdef UNDER_CE +# undef fopen +#endif #define fopen win32_fopen #undef fdopen #define fdopen win32_fdopen +#ifdef UNDER_CE +# undef freopen +#endif #define freopen win32_freopen #define fclose(f) win32_fclose(f) +#ifdef UNDER_CE +# undef fputs +#endif #define fputs(s,f) win32_fputs(s,f) +#ifdef UNDER_CE +# undef fputc +#endif #define fputc(c,f) win32_fputc(c,f) +#ifdef UNDER_CE +# undef ungetc +#endif #define ungetc(c,f) win32_ungetc(c,f) #undef getc #define getc(f) win32_getc(f) +#ifdef UNDER_CE +# undef fileno +#endif #define fileno(f) win32_fileno(f) +#ifdef UNDER_CE +# undef clearerr +#endif #define clearerr(f) win32_clearerr(f) +#ifdef UNDER_CE +# undef fflush +#endif #define fflush(f) win32_fflush(f) +#ifdef UNDER_CE +# undef ftell +#endif #define ftell(f) win32_ftell(f) +#ifdef UNDER_CE +# undef fseek +#endif #define fseek(f,o,w) win32_fseek(f,o,w) +#ifdef UNDER_CE +# undef fgetpos +#endif #define fgetpos(f,p) win32_fgetpos(f,p) +#ifdef UNDER_CE +# undef fsetpos +#endif #define fsetpos(f,p) win32_fsetpos(f,p) +#ifdef UNDER_CE +# undef rewind +#endif #define rewind(f) win32_rewind(f) #define tmpfile() win32_tmpfile() +#ifdef UNDER_CE +# undef abort +#endif #define abort() win32_abort() +#ifdef UNDER_CE +# undef fstat +#endif #define fstat(fd,bufptr) win32_fstat(fd,bufptr) +#ifdef UNDER_CE +# undef stat +#endif #define stat(pth,bufptr) win32_stat(pth,bufptr) #define longpath(pth) win32_longpath(pth) #define ansipath(pth) win32_ansipath(pth) +#ifdef UNDER_CE +# undef rename +#endif #define rename(old,new) win32_rename(old,new) +#ifdef UNDER_CE +# undef setmode +#endif #define setmode(fd,mode) win32_setmode(fd,mode) #define chsize(fd,sz) win32_chsize(fd,sz) +#ifdef UNDER_CE +# undef lseek +#endif #define lseek(fd,offset,orig) win32_lseek(fd,offset,orig) #define tell(fd) win32_tell(fd) +#ifdef UNDER_CE +# undef dup +#endif #define dup(fd) win32_dup(fd) +#ifdef UNDER_CE +# undef dup2 +#endif #define dup2(fd1,fd2) win32_dup2(fd1,fd2) +#ifdef UNDER_CE +# undef open +#endif #define open win32_open +#ifdef UNDER_CE +# undef close +#endif #define close(fd) win32_close(fd) #define eof(fd) win32_eof(fd) +#ifdef UNDER_CE +# undef isatty +#endif #define isatty(fd) win32_isatty(fd) +#ifdef UNDER_CE +# undef read +#endif #define read(fd,b,s) win32_read(fd,b,s) +#ifdef UNDER_CE +# undef write +#endif #define write(fd,b,s) win32_write(fd,b,s) #define _open_osfhandle win32_open_osfhandle +#ifdef UNDER_CE +# undef _get_osfhandle +#endif #define _get_osfhandle win32_get_osfhandle #define spawnvp win32_spawnvp +#ifdef UNDER_CE +# undef mkdir +#endif #define mkdir win32_mkdir +#ifdef UNDER_CE +# undef rmdir +#endif #define rmdir win32_rmdir +#ifdef UNDER_CE +# undef chdir +#endif #define chdir win32_chdir #define flock(fd,o) win32_flock(fd,o) +#ifdef UNDER_CE +# undef execv +#endif #define execv win32_execv +#ifdef UNDER_CE +# undef execvp +#endif #define execvp win32_execvp +#ifdef UNDER_CE +# undef perror +#endif #define perror win32_perror #define setbuf win32_setbuf +#ifdef UNDER_CE +# undef setvbuf +#endif #define setvbuf win32_setvbuf #undef flushall #define flushall win32_flushall #undef fcloseall #define fcloseall win32_fcloseall +#ifdef UNDER_CE +# undef fgets +#endif #define fgets win32_fgets +#ifdef UNDER_CE +# undef gets +#endif #define gets win32_gets +#ifdef UNDER_CE +# undef fgetc +#endif #define fgetc win32_fgetc #undef putc #define putc win32_putc +#ifdef UNDER_CE +# undef puts +#endif #define puts win32_puts #undef getchar #define getchar win32_getchar #undef putchar #define putchar win32_putchar +#ifdef UNDER_CE +# undef access +#endif #define access(p,m) win32_access(p,m) +#ifdef UNDER_CE +# undef chmod +#endif #define chmod(p,m) win32_chmod(p,m) @@ -302,19 +437,42 @@ END_EXTERN_C #define link win32_link #define unlink win32_unlink #define utime win32_utime +#ifdef UNDER_CE +# undef gettimeofday +#endif #define gettimeofday win32_gettimeofday #define uname win32_uname #define wait win32_wait #define waitpid win32_waitpid +#ifdef UNDER_CE +# undef kill +#endif #define kill win32_kill +#ifdef UNDER_CE +# undef killpg +#endif +#define killpg(pid, sig) win32_kill(pid, -(sig)) + +#ifdef UNDER_CE +# undef opendir +#endif #define opendir win32_opendir +#ifdef UNDER_CE +# undef readdir +#endif #define readdir win32_readdir #define telldir win32_telldir #define seekdir win32_seekdir #define rewinddir win32_rewinddir +#ifdef UNDER_CE +# undef closedir +#endif #define closedir win32_closedir #define os_id win32_os_id +#ifdef UNDER_CE +# undef getpid +#endif #define getpid win32_getpid #undef crypt |